What Foods Cause Excessive Gas and Bloating?

Beans, cruciferous vegetables, dairy products, and sugar-free sweeteners are among the most common foods that cause excessive gas. Most people pass gas up to 25 times a day, which is normal. But certain foods dramatically increase that number because they contain sugars and fibers your body can’t fully break down on its own.

The pattern is consistent: when your small intestine can’t digest something, it passes into your large intestine, where trillions of bacteria ferment it. That fermentation produces hydrogen, carbon dioxide, and methane. The more undigested material that reaches your colon, the more gas you produce.

Beans and Legumes

Beans are the most notorious gas-producing food for a straightforward reason. They’re loaded with raffinose, a complex sugar your body literally cannot digest. You don’t produce the enzyme needed to break raffinose down in your small intestine, so it travels intact to your colon, where bacteria feast on it and release gas. More than 20% of the population experiences abdominal pain specifically from the gas produced by beans and similar foods.

Lentils, chickpeas, black beans, kidney beans, and split peas all contain significant amounts of these indigestible sugars. The good news is that preparation matters enormously. Boiling beans for two to three minutes, then letting them soak overnight, can dissolve 75 to 90 percent of the gas-causing sugars into the water. Drain that water, rinse the beans until the water runs clear, and cook them in fresh water. Canned beans that have been sitting in liquid have already lost some of these sugars, which is why many people tolerate them better than dried beans cooked without soaking.

Cruciferous Vegetables

Broccoli, Brussels sprouts, cabbage, cauliflower, and kale all contain the same raffinose found in beans, plus high amounts of insoluble fiber. That’s a double hit. The raffinose ferments in your colon, and the insoluble fiber does too, since it passes through your stomach completely undigested and becomes food for gut bacteria. The fermentation byproduct is gas.

Cooking these vegetables breaks down some of the fiber and makes them easier to digest than eating them raw. Steaming tends to preserve more nutrients than boiling while still softening the fiber enough to reduce gas production. If you find that one cruciferous vegetable bothers you more than others, that’s common. Brussels sprouts and cabbage tend to cause more gas than broccoli for many people, though individual responses vary based on your unique gut bacteria.

Dairy Products

Milk, ice cream, soft cheeses, and yogurt cause gas in people who don’t produce enough lactase, the enzyme that breaks down lactose (the sugar in milk). Without lactase, undigested lactose pulls extra water into your intestines through osmosis, which speeds up transit through your gut and increases the amount of lactose that reaches your colon undigested. Once there, bacteria ferment it into short-chain fatty acids and hydrogen gas. The combination of extra water, faster transit, and gas production explains why lactose intolerance causes bloating, cramps, gas, and sometimes diarrhea all at once.

Aged hard cheeses like cheddar and Parmesan contain very little lactose and rarely cause problems. Butter is also low in lactose. Yogurt, despite being a dairy product, is often better tolerated because the bacterial cultures used to make it have already broken down some of the lactose. If dairy consistently gives you gas, lactase enzyme supplements taken before eating can help by doing the digestive work your body skips.

Whole Grains and High-Fiber Foods

Wheat, barley, rye, and oats all contain fructans, a type of fermentable sugar that contributes to gas. Whole grain versions of these foods also pack substantial insoluble fiber, which your gut bacteria digest through fermentation. This is why switching suddenly from a low-fiber diet to whole grains, bran cereals, or high-fiber breads often causes a dramatic spike in gas.

The key distinction is between soluble and insoluble fiber. Soluble fiber dissolves in water and your body can absorb it. Insoluble fiber, found in whole grains, legumes, and many vegetables, cannot be broken down by your digestive enzymes. It passes straight to your large intestine, where bacteria do the work and produce gas as a byproduct. If you’re increasing your fiber intake, doing it gradually over two to three weeks gives your gut bacteria time to adjust, which typically reduces the severity of gas over time.

Onions, Garlic, and Artichokes

These foods are high in fructans, the same fermentable sugars found in wheat. Onions are one of the most concentrated dietary sources of fructans, which is why they bother so many people. Garlic, leeks, shallots, and artichokes fall into the same category. Even in small amounts used as seasoning, these foods can trigger noticeable gas in sensitive individuals.

Cooking reduces fructan content somewhat, and the green tops of spring onions contain far fewer fructans than the white bulb. Garlic-infused oil is another workaround: fructans are water-soluble but not fat-soluble, so they don’t transfer into oil during cooking.

Certain Fruits

Apples, pears, peaches, cherries, and mangoes are high in sorbitol or excess fructose, both of which are poorly absorbed in the small intestine. When these sugars reach your colon, fermentation follows. Dried fruits are particularly concentrated sources because removing water increases the sugar density per serving. A handful of dried apricots contains far more sorbitol than a single fresh apricot.

Bananas, blueberries, grapes, and citrus fruits tend to cause less gas because they contain lower levels of these fermentable sugars.

Sugar-Free and Diet Products

Sugar alcohols like sorbitol, xylitol, and mannitol are added to sugar-free gum, candy, protein bars, and diet drinks. Your body can’t fully digest them, and the gastrointestinal symptoms tend to show up quickly after eating them. In clinical studies, participants who consumed xylitol reported bloating, gas, upset stomach, and diarrhea. The FDA requires products containing added sorbitol or mannitol to carry a warning that “excessive consumption can cause a laxative effect.”

Research suggests that 10 to 15 grams a day of sugar alcohols is a safe threshold for most people, but many processed sugar-free products contain amounts well above that in a single serving. Erythritol appears to be gentler on the stomach than other sugar alcohols, causing noticeable symptoms mainly at higher doses. If sugar-free products consistently give you gas, checking ingredient labels for anything ending in “-ol” will help you identify the culprit.

Carbonated Drinks

Soda, sparkling water, and beer introduce gas directly into your digestive system. Some of it comes back up as burping, but whatever passes into your intestines adds to flatulence. Beer combines carbonation with fermentable grains, making it a particularly effective gas producer. Drinking through a straw or gulping beverages quickly also increases the amount of air you swallow, compounding the effect.

Reducing Gas From Food

An enzyme supplement containing alpha-galactosidase (sold as Beano) can help with beans and vegetables by breaking down the indigestible sugars before they reach your colon, where bacteria would otherwise ferment them. You take it with your first bite of the problem food. For gas that’s already formed, products containing simethicone (like Gas-X) work by breaking up gas bubbles in your stomach and intestines, making them easier to pass. Simethicone works best when taken after meals and should be chewed thoroughly if you’re using the tablet form.

Beyond supplements, the most effective strategies are practical. Soak beans overnight and discard the water. Cook vegetables rather than eating them raw. Increase fiber gradually rather than all at once. Identify your personal triggers by paying attention to which specific foods consistently precede your worst symptoms, since gut bacteria composition varies from person to person.

When Gas Signals Something Else

If your gas is accompanied by unintentional weight loss, persistent diarrhea, oily or floating stools, significant abdominal pain, or fatigue, the cause may not be dietary. Small intestinal bacterial overgrowth (SIBO) produces many of the same symptoms as food-related gas but involves an abnormal concentration of bacteria in the small intestine rather than the colon. A breath test that measures hydrogen and methane levels can identify it, and unlike irritable bowel syndrome, SIBO can be clinically verified and directly treated. Persistent, severe gas that doesn’t respond to dietary changes is worth investigating further.