Exclusion diets are becoming increasingly popular in the management of irritable bowel syndrome (IBS). Several mechanisms exist by which food items might cause gastrointestinal symptoms, such as direct osmotic effects of food in the gut lumen, changes to the gut microbiota and immune activation. These effects have been demonstrated in animal models and in human studies, particularly in the case of gluten-free diets and diets low in fermentable oligosaccharides, disaccharides, monosaccharides and polyols (FODMAPs). Indeed, randomized controlled trials (RCTs) suggest that gluten-free diets and low-FODMAP diets improve IBS symptoms, and guidelines recommend the latter approach for treating symptoms in some patients with IBS. Designing such RCTs is challenging as participants need to eat so an 'inert' placebo is not an option. Blinding is also an issue with these studies; in the future, new exclusion diets should not advertise what the diet consists of until it is proved to reduce symptoms. In this Review, we outline the advantages and disadvantages of each choice of control group and emphasize the importance of collecting mechanistic data (regarding direct effects of food on the gut lumen, changes in gut microbiota and intestinal inflammation) as well as symptom data in RCTs of exclusion diets in IBS.