Beans, cruciferous vegetables, dairy products, and carbonated drinks are among the most common gas-producing foods. Passing gas 14 to 23 times a day is normal, but certain foods can push you well beyond that range by feeding the bacteria in your large intestine, which produce hydrogen, methane, and carbon dioxide as byproducts of fermentation.
Understanding which foods are the biggest offenders, and why, can help you make small adjustments without cutting out nutritious foods entirely.
Why Food Creates Gas in the First Place
Gas in your intestines comes from two sources: swallowed air and bacterial fermentation. Swallowed air accounts for the nitrogen and oxygen in your gut, but the real driver of uncomfortable bloating is fermentation. When carbohydrates, fibers, or sugars escape digestion in the small intestine, bacteria in the large intestine break them down instead. That process generates hydrogen, methane, and carbon dioxide. These five gases make up more than 99% of all flatus.
The key factor is how much undigested material reaches your colon. Foods with complex sugars, certain fibers, or sugars your body lacks the enzymes to process will always produce more gas than simple, easily absorbed nutrients.
Beans and Legumes
Beans are the most notorious gas-producing food for good reason. They’re loaded with raffinose, a complex sugar that humans simply cannot break down on their own. Your small intestine doesn’t produce the enzyme needed to split raffinose apart, so it passes intact into the colon where bacteria ferment it aggressively, producing a surge of gas.
The biggest culprits include black beans, kidney beans, pinto beans, lentils, chickpeas (garbanzos), and even green beans. Split peas, baked beans, and falafel (made from chickpeas) are also high in a related compound called galacto-oligosaccharides, or GOS, which behaves the same way in your gut.
The good news: soaking helps. Research published in Cereal Chemistry found that soaking legumes in water significantly reduces their oligosaccharide content, with raffinose leaching out faster than other gas-causing sugars. A 12-hour soak is more effective than a 3-hour soak. Draining and rinsing the soaking water before cooking is essential, since that’s where the raffinose ends up. Interestingly, cooking after soaking doesn’t always reduce gas further. In lentils it does, but in chickpeas, peas, and soybeans, cooking sometimes increased oligosaccharide levels, likely because heat releases bound sugars from the food’s structure.
Cruciferous Vegetables
Broccoli, cabbage, Brussels sprouts, cauliflower, and asparagus all contain raffinose, the same complex sugar found in beans. They also contain sulfur compounds, which is why the gas they produce tends to smell worse than gas from other foods. The volume of gas may be lower than what beans produce, but the odor can be more noticeable.
Cooking these vegetables breaks down some of the fibrous cell walls and can reduce (though not eliminate) their gas-producing potential. Raw broccoli and cabbage are typically harder on your gut than steamed or roasted versions.
Onions, Garlic, and High-Fructan Foods
Fructans are a type of carbohydrate that ferments readily in the colon, and they’re concentrated in some of the most common flavoring ingredients. Garlic, onions, leeks, spring onions, and artichokes are all particularly rich in fructans. So are wheat-based foods: wholemeal bread, wheat pasta, rye bread, rye crispbread, and muesli containing wheat.
This catches many people off guard. You might not suspect bread or pasta as gas culprits, but for people sensitive to fructans, a large serving of wheat pasta can cause as much bloating as a bowl of beans. Cashews and pistachios are also high in fructans and GOS, making them surprisingly gassy snacks.
Dairy Products
Milk, ice cream, soft cheeses, and other lactose-rich dairy products cause significant gas in people who don’t produce enough lactase, the enzyme that breaks down milk sugar. Without sufficient lactase, lactose passes undigested into the colon, where bacteria ferment it and produce gas, bloating, and often cramping or diarrhea alongside it.
Lactose intolerance is especially common among people of African, Asian, Hispanic, and American Indian descent, but it can affect anyone and often develops gradually with age. Hard aged cheeses like cheddar and Parmesan contain very little lactose and are usually well tolerated. Yogurt is also easier to digest because the bacterial cultures have already broken down some of the lactose.
Sugar-Free Products
Sugar alcohols like sorbitol, xylitol, and mannitol are widely used in sugar-free gum, mints, candy, and protein bars. Your body absorbs them poorly, which is why they’re low in calories, but that also means they reach the colon mostly intact and get fermented by bacteria.
Sorbitol is the most common offender. At moderate to high doses it causes bloating, cramps, and diarrhea, and some people react to even small amounts. Sorbitol also occurs naturally in apricots, apples, pears, and avocados, which partly explains why these fruits can cause gas in sensitive individuals. If you chew several pieces of sugar-free gum a day, the cumulative sorbitol dose can be enough to cause real discomfort.
Carbonated Drinks
Soda, sparkling water, beer, and other carbonated beverages introduce carbon dioxide directly into your digestive tract. Some of it escapes as burping, but the rest travels through to the intestines. Combined with the swallowed air that comes from sipping any drink, carbonated beverages can contribute meaningfully to bloating, even though they don’t involve bacterial fermentation the way food does.
Fiber, Especially When You Add It Quickly
Fiber is healthy, but it’s also the primary fuel for gas-producing bacteria in the colon. Soluble fiber, the type found in oats, beans, and many fruits, is especially fermentable. Foods with added fiber ingredients like chicory root, inulin, cellulose, and pectin (commonly found in protein bars, fiber supplements, and “high fiber” packaged foods) are frequent complaints.
The bigger issue for most people isn’t fiber itself but how fast they increase their intake. Adding a lot of fiber to your diet all at once overwhelms your gut bacteria, producing excess gas and cramping. Increasing fiber gradually over a few weeks gives the bacterial population time to adjust, and gas production typically settles down. This is worth remembering if you’ve recently switched to a higher-fiber diet and feel worse before feeling better.
How to Reduce Gas Without Avoiding Healthy Foods
Most gas-producing foods are nutritious, so eliminating them entirely isn’t ideal. A few practical strategies can make a real difference:
- Soak beans for at least 12 hours and discard the soaking water before cooking. This removes a significant portion of the raffinose.
- Cook cruciferous vegetables rather than eating them raw. Steaming, roasting, or sautéing breaks down some of the compounds that cause gas.
- Increase fiber slowly. Add a few grams per week rather than doubling your intake overnight.
- Check labels for sugar alcohols. If you’re chewing sugar-free gum or eating sugar-free candy regularly, the sorbitol may be adding up.
- Try smaller portions of trigger foods. A quarter-cup of beans mixed into a grain bowl will produce less gas than a full cup as a side dish.
- Swap high-fructan ingredients. The green tops of spring onions are low in fructans even though the white bulb is high. Garlic-infused oil delivers flavor without the fructans, since fructans don’t dissolve in fat.
Passing gas is a normal, unavoidable part of digestion. If you’re consistently passing gas more than 23 times a day or experiencing pain, persistent bloating, or changes in your stool, that pattern may point to something beyond dietary triggers, such as irritable bowel syndrome or a food intolerance worth investigating.