Foods to Avoid for Gas: 8 Common Triggers

DetoxWater Editorial Team•Published November 5, 2026

Beans, milk and onions are among the foods to limit if they cause you gas.

These 8 food groups are starting points for identifying your own triggers; the ai symptom analyzer can help you organize symptoms, but it cannot diagnose their cause. If you are also considering what to drink, see the best drinks for gas.

Gas after eating is normal, and a food that bothers one person may be comfortable for another. Rather than avoiding every food on this list, start with the one that seems most closely connected to your symptoms.

Which 8 foods are worth limiting for gas?

The strongest dietary evidence here concerns people with irritable bowel syndrome (IBS), not everyone with occasional gas. A 2022 review and network meta-analysis of IBS trials found that a low-FODMAP diet improved overall IBS symptoms and ranked well for bloating. FODMAPs are carbohydrates that may be poorly absorbed and fermented in the gut; the diet changes several foods at once, so it does not prove that any single food caused a person's symptoms.

1. Beans and lentils

Beans and lentils contain galacto-oligosaccharides, carbohydrates that are not fully digested in the small intestine. Bacteria ferment them in the colon, producing gas. A larger serving may be harder to tolerate than a smaller one, although responses vary.

If beans seem to be a trigger, try a smaller portion instead of cutting them out completely. You can also try canned beans that have been drained and rinsed, then see whether they are more comfortable for you. Keep the rest of the meal familiar so it is easier to judge the result.

Evidence strength: The fermentation mechanism is supported by a review of carbohydrate maldigestion. Evidence from IBS diet trials is indirect for beans specifically; it does not mean everyone needs to avoid them.

2. Milk and other lactose-containing dairy

Milk, ice cream and some other dairy foods contain lactose, a sugar that needs the enzyme lactase for digestion. When lactose is not well absorbed, bacteria can ferment it and produce gas. People with lactose intolerance may also notice bloating, abdominal discomfort or diarrhea after consuming it.

If you suspect lactose, compare your usual dairy food with a lactose-free version or try a smaller serving. Hard cheese and lactose-free milk are options for some people, while fortified alternatives can help replace nutrients if you avoid dairy. Lactose-free dairy is not suitable for someone with a milk allergy.

Evidence strength: A review of lactose intolerance supports the link between lactose malabsorption and symptoms, while noting that tolerance varies with the amount consumed and the individual. Dairy is not a gas trigger for everyone.

3. Onions and garlic

Onions and garlic contain fructans, fermentable carbohydrates that can reach the colon and produce gas. They can be easy to overlook because they appear in sauces, soups, seasoning blends and restaurant meals as well as in recognizable pieces.

If you notice symptoms after meals containing them, try leaving out onion and garlic while keeping the rest of the meal similar. Chives or the green parts of scallions can add flavor without relying on the same ingredients. Check labels if you are trying to identify whether onion or garlic is present.

Evidence strength: Research on fermentable carbohydrates supports the mechanism, and IBS trials provide moderate support for dietary approaches that reduce them. That evidence is indirect for onion or garlic alone, so a personal trial is more useful than assuming both are triggers.

4. Cabbage, broccoli and cauliflower

These vegetables contain carbohydrates and fiber that gut bacteria can ferment. Cauliflower also contains the sugar alcohol mannitol. The resulting gas may be noticeable in some people, but these vegetables are nutritious and do not need to be avoided automatically.

Try a smaller portion of the vegetable you suspect, or choose a different vegetable and compare how you feel. Cooking may make a vegetable easier for some people to eat, although it does not remove all fermentable carbohydrates. Avoid changing several parts of the meal at the same time.

Evidence strength: The fermentation mechanism is established, but the IBS diet evidence involves multiple food changes rather than a test of each vegetable on its own. It cannot predict whether cabbage, broccoli or cauliflower will bother you.

5. Wheat and rye foods

Wheat and rye contain fructans, which can be fermented in the colon. Foods such as bread, pasta and crackers may therefore contribute to gas for some people, particularly when eaten in larger amounts or alongside other fermentable ingredients.

If a particular wheat or rye food seems to bother you, try a smaller portion or compare it with a rice- or potato-based meal. Check other ingredients too: a sauce containing onion or garlic may be a more relevant trigger than the bread or pasta itself.

Evidence strength: The evidence for fermentable carbohydrates is stronger than the evidence for blaming wheat or rye alone in an individual. Gas after wheat does not by itself establish a gluten problem. If you may need testing for celiac disease, talk with a clinician before removing gluten, because doing so can affect test results.

6. Apples and pears

Apples and pears contain sugars that some people absorb incompletely, including fructose and sorbitol. When these carbohydrates reach the colon, bacteria can ferment them and produce gas. Symptoms can depend on the amount eaten and on the person's sensitivity.

If either fruit seems to cause gas, try a smaller serving or compare it with another fruit you usually tolerate. Notice whether the fruit was eaten on its own or as part of a meal containing other possible triggers. You do not need to avoid all fruit because one type causes discomfort.

Evidence strength: A review of carbohydrate intolerance describes how poorly absorbed sugars can lead to fermentation and symptoms. Evidence from broader IBS diets is indirect for apples and pears specifically.

7. Sugar-free sweets containing sugar alcohols

Some sugar-free sweets, gums and other products contain sugar alcohols such as sorbitol, mannitol, xylitol or maltitol. These can be incompletely absorbed and fermented, causing gas or bloating in susceptible people. Chewing gum can also lead to swallowing air, which may contribute to belching.

Check the ingredient list if symptoms follow a sugar-free product. Try reducing the suspected product and see whether symptoms change; not every item labeled sugar-free contains the same sweetener. If you use these products to manage blood sugar, consider suitable alternatives with your clinician or dietitian.

Evidence strength: The mechanism is supported by research on carbohydrate malabsorption, but response differs between people. The IBS diet trials do not establish that every sugar-free product causes gas.

8. Foods with added inulin or chicory root fiber

Inulin and chicory root fiber are fermentable fibers added to some bars, cereals, yogurts and other packaged foods. They can increase fermentation in the colon, which may be uncomfortable if you are sensitive to them or consume more than you usually do.

Look for these ingredients on products you eat regularly, especially if symptoms began after you added a fiber-enriched food. You could compare the product with a version without the added fiber while keeping other eating habits similar. This is a targeted test, not a reason to remove all fiber from your diet.

Evidence strength: Inulin is a fructan, and the evidence for fermentable carbohydrates explains why it may cause gas. Broader IBS diet studies do not show that every product containing inulin will cause symptoms for every person.

How should you limit foods that cause gas?

Start with the food that has the clearest connection to your symptoms. Record what you ate, roughly how much, and what you noticed afterward. Then try a smaller amount or leave out that food for a short period before reintroducing it and checking whether the pattern returns.

A food-and-symptom record is useful, but it cannot prove a diagnosis: meals contain several ingredients, and gas can have causes other than food. Some swaps to discuss or try are:

Suspected triggerPossible alternative
Milk containing lactoseLactose-free milk or a fortified dairy alternative
Onion or garlicChives or green scallion tops for flavor
A wheat- or rye-based mealA rice- or potato-based meal
A product with added inulinA similar product without added inulin

If several foods appear to be triggers, avoid cutting out entire food groups without a plan to replace their nutrients. A dietitian can help you choose targeted changes and maintain a varied diet.

A full low-FODMAP diet is more restrictive than simply testing one food. A review of its use in IBS notes both clinical benefits and changes in gut bacteria; work with a trained dietitian if considering it, and plan for reintroduction rather than remaining on a broadly restrictive diet indefinitely.

Who should be careful, and when should you see a doctor?

See a clinician if gas is persistent, worsening or accompanied by ongoing abdominal pain, diarrhea, constipation, vomiting, blood in the stool or unexplained weight loss. These symptoms need assessment rather than repeated food restrictions. Seek urgent care for severe abdominal pain, particularly with vomiting, a swollen abdomen or inability to pass stool or gas.

People who are pregnant, children, and anyone with a history of an eating disorder should get professional advice before following a restrictive diet. People with IBS, suspected celiac disease, diabetes or a food allergy may also need an individualized approach; do not rely on a food diary to diagnose these conditions.

If symptoms seem related to a medicine, speak with the prescribing clinician or pharmacist. Do not stop prescribed medication on your own.

Try the free tool

Ai Symptom Analyzer →

Frequently asked questions

Is gas after eating always a sign of a food intolerance?

No. Producing and passing some gas is a normal part of digestion. A recurring pattern may be worth discussing with a clinician, especially if other symptoms are present.

Can eating quickly cause gas?

Eating quickly can increase the amount of air you swallow, which may contribute to belching or gas. Slowing down may help you notice whether swallowed air is part of the problem.

Can the smell of gas identify the food that caused it?

Not reliably. Gas odor varies with the foods eaten and bacterial activity, and smell alone cannot identify a particular food intolerance or condition.

Sources

  1. Efficacy of a low FODMAP diet in irritable bowel syndrome: systematic review and network meta-analysis. Gut (2022). PubMed 34376515
  2. Update on lactose malabsorption and intolerance: pathogenesis, diagnosis and clinical management. Gut (2019). PubMed 31427404
  3. Carbohydrate Maldigestion and Intolerance. Nutrients (2022). PubMed 35565890
  4. The low FODMAP diet: recent advances in understanding its mechanisms and efficacy in IBS. Gut (2017). PubMed 28592442