Beans, cruciferous vegetables, dairy, certain fruits, and foods with artificial sweeteners are the most common gas-producing foods. The gas itself comes from bacteria in your large intestine fermenting carbohydrates your body can’t fully digest on its own. More than 99% of that gas is hydrogen, carbon dioxide, and methane, while less than 1% is the sulfur-containing compounds responsible for the smell.
Understanding which foods are most likely to cause gas, and why, can help you figure out your personal triggers and reduce the bloating without cutting out nutritious foods entirely.
Beans and Legumes
Beans are the most notorious gas producers for good reason. They’re loaded with a family of sugars called raffinose oligosaccharides that humans simply can’t break down. We lack the enzyme needed to split these sugars apart, so they pass intact into the large intestine where bacteria feast on them and release gas as a byproduct. Lentils are especially rich in these compounds, containing roughly 5,000 to 6,700 milligrams per 100 grams depending on the variety.
Red kidney beans, split peas, baked beans, and chickpeas are all high on the list. The good news: soaking beans before cooking significantly reduces these gas-causing sugars. Raffinose leaches into the soaking water faster than other oligosaccharides, so even a few hours of soaking (with the water discarded afterward) helps. Cooking presoaked lentils reduces their oligosaccharide content further, though the effect of cooking varies by legume. Chickpeas and soybeans, for example, don’t see as much reduction from cooking alone.
Your gut also adapts. Research from UCLA Health found that within three to four weeks of regularly eating beans, people returned to normal levels of gas production. The bacteria in your gut adjust to the new food source and the fermentation process becomes less dramatic over time.
Cruciferous and High-Fructan Vegetables
Broccoli, cabbage, cauliflower, Brussels sprouts, and asparagus all contain insoluble fiber and raffinose sugars that feed gut bacteria through fermentation. These vegetables pass through the stomach undigested and head straight to the large intestine, where microorganisms break them down and produce gas.
Onions, garlic, leeks, and artichokes cause gas for a slightly different reason. They’re rich in fructans, a type of carbohydrate that’s poorly absorbed in the small intestine. Mushrooms and celery contain mannitol, a sugar alcohol that works the same way. If you notice that onion and garlic consistently bother you more than other vegetables, fructans are likely your trigger.
Fruits That Cause Bloating
Not all fruit is equally gassy, and the culprits tend to be those high in fructose or sorbitol. Apples and pears are double offenders because they contain both. Other high-fructose fruits include mangoes, cherries, figs, and watermelon. Dried fruit concentrates these sugars into a smaller volume, making it easier to overdo it.
Peaches and plums are particularly rich in sorbitol, a naturally occurring sugar alcohol your body absorbs slowly. When sorbitol reaches the colon undigested, bacteria ferment it just like any other carbohydrate. If stone fruits consistently give you trouble, sorbitol sensitivity is the likely explanation.
Dairy Products
Milk, ice cream, soft cheeses, and other dairy products cause gas in people who don’t produce enough lactase, the enzyme that breaks down lactose (the sugar in milk). Without sufficient lactase, lactose moves undigested into the colon, where bacteria interact with it and produce gas, bloating, and sometimes cramping or diarrhea.
Lactose intolerance is extremely common worldwide, though the severity varies. Some people can handle a splash of milk in coffee but not a bowl of cereal. Hard aged cheeses like cheddar and Parmesan contain very little lactose and are usually tolerated well. Yogurt is often easier to digest too, because the bacterial cultures have already broken down some of the lactose during fermentation.
Whole Grains and Wheat Products
Whole wheat bread, rye bread, wheat pasta, and muesli containing wheat are all rich in fructans, the same compounds found in onions and garlic. Raffinose is also present in many cereals. The fiber content in whole grains adds to the effect: insoluble fiber passes through to the colon where it becomes fuel for gas-producing bacteria.
This doesn’t mean you should avoid whole grains. If you’ve recently increased your fiber intake and noticed more gas, that’s a predictable adjustment period. Introducing fiber gradually gives the bacteria in your gut time to adapt. Jumping from a low-fiber diet to large servings of whole grains and legumes in the same week is a reliable recipe for bloating.
Sugar-Free Foods and Artificial Sweeteners
Sugar alcohols like xylitol, sorbitol, and erythritol are used in sugar-free gum, candy, protein bars, and diet drinks. They’re poorly absorbed in the small intestine, so they travel to the colon and get fermented, producing gas. In higher amounts, they can also cause diarrhea and abdominal pain.
People’s tolerance varies based on body weight, overall gut health, and which specific sugar alcohol they’re consuming. The fix is usually straightforward: cutting back on the amount resolves the symptoms for most people. If you’re chewing several pieces of sugar-free gum a day or eating multiple protein bars sweetened with sugar alcohols, that alone could explain persistent bloating.
Carbonated Drinks
Soda, sparkling water, and beer introduce carbon dioxide directly into your digestive tract. Some of that gas gets released through burping, but the rest travels through your intestines. Beer adds a second layer because it’s carbonated and contains fermentable carbohydrates from grains. Soda sweetened with high-fructose corn syrup combines carbonation with excess fructose, hitting two gas-producing pathways at once.
How to Reduce Gas Without Eliminating Foods
The most effective approach is identifying your specific triggers rather than avoiding entire food groups. A few practical strategies that work:
- Soak beans and lentils for at least 3 hours, then discard the soaking water before cooking. Longer soaking (12 hours) removes more oligosaccharides.
- Increase fiber gradually. Add one new high-fiber food at a time and give your gut three to four weeks to adjust before increasing further.
- Try enzyme supplements. Over-the-counter products containing alpha-galactosidase can break down raffinose and related sugars before they reach the colon, reducing fermentation and gas production. These work best for bean and vegetable-related gas.
- Use lactase supplements before eating dairy if you’re lactose intolerant, or switch to lactose-free versions of milk and ice cream.
- Cut back on sugar alcohols gradually and observe which ones bother you most.
If your gas symptoms change suddenly, come with unexplained weight loss, or are accompanied by persistent abdominal pain, constipation, or diarrhea, those patterns are worth discussing with a doctor. For most people, though, gas is a normal byproduct of a healthy, fiber-rich diet, and the solutions are more about preparation and pacing than avoidance.

