BACKGROUND: Hypnotherapy for irritable bowel syndrome (IBS) has been used primarily in patients with refractory symptoms in specialised departments and delivered on an individual basis. We aimed to test the hypothesis that hypnotherapy would be more effective than educational supportive therapy, and that group hypnotherapy would be non-inferior to individual hypnotherapy for patients with IBS referred from primary and secondary care. METHODS: We did a multicentre randomised controlled trial (IMAGINE) in 11 hospitals in the Netherlands. Patients with IBS, aged 18-65 years, who were referred from primary or secondary care were randomly allocated (3:3:1) in blocks of six using a computer-based random number table procedure by staff not involved in the treatment to receive six sessions of individual or group hypnotherapy or group educational supportive therapy (control group). The primary outcome was adequate relief of IBS symptoms, with responders defined as patients who reported adequate relief when asked once weekly on three or four occasions in 4 consecutive weeks. We compared hypnotherapy (both groups) with control in the intention-to-treat population (excluding individuals subsequently found to be ineligible for enrolment), and assessed non-inferiority of group hypnotherapy versus individual hypnotherapy in the per-protocol population (with a non-inferiority margin of 15%) at 3 months and 12 months. This trial is registered with ISRCTN, number ISRCTN22888906, and is completed. FINDINGS: Between May 31, 2011, and April 6, 2016, 494 patients referred for psychological treatment for IBS were assessed for eligibility, of whom 354 were randomly allocated to the three groups: 150 to individual hypnotherapy, 150 to group hypnotherapy, and 54 to educational supportive therapy. After exclusion of individuals subsequently found to be ineligible for enrolment, 142 patients in the individual hypnotherapy group, 146 in the group hypnotherapy group, and 54 in the control group were included in the intention-to-treat population. Of these, 22 (15%) patients in the individual hypnotherapy group, 22 (15%) in the group hypnotherapy group, and 11 (20%) in the control group dropped out before or during therapy. In the intention-to-treat analysis, the adequate response rate was 40·8% (95% CI 31·7-50·5) in the individual hypnotherapy group, 33·2% (24·3-43·5) in the group hypnotherapy group, and 16·7% (7·6-32·6) in the control group at 3 months. At 12 months, 40·8% (31·3-51·1) of patients in the individual hypnotherapy group, 49·5% (38·8-60·0) of patients in the group hypnotherapy group, and 22.6% (11·5-39·5) of patients in the control group reported adequate relief. Hypnotherapy was more effective than control at 3 months (odds ratio 2·9, 95% CI 1·2-7·4, p=0·0240) and 12 months (2·8, 1·2-6·7, p=0·0185). In the per-protocol analysis, 49·9% (39·2-60·6) in the individual hypnotherapy group and 42·7% (32·3-53·8) in the group hypnotherapy group had adequate relief at 3 months, and 55·5% (43·4-67·1) of individual and 51·7% (40·2-63·0) of group hypnotherapy patients reported adequate relief at 12 months. Group hypnotherapy was therefore non-inferior to individual hypnotherapy. Eight unexpected serious adverse reactions (six in the individual hypnotherapy group and two in the group hypnotherapy group) were reported, most of which were cancer or inflammatory bowel disease, and were judged by the medical ethics committee as not being related to the therapy. INTERPRETATION: Hypnotherapy should be considered as a possible treatment for patients with IBS in primary and secondary care. Furthermore, group therapy could allow many more patients to be treated for the same cost.None.