The foods most likely to cause bad gas fall into a few predictable categories: beans and legumes, cruciferous vegetables (broccoli, cabbage, Brussels sprouts), dairy products, high-protein foods like red meat, and anything sweetened with sugar alcohols. What they all share is some component your small intestine can’t fully break down, leaving bacteria in your colon to ferment the leftovers and produce gas.
But not all gas is the same. Volume and smell come from different sources, and understanding which foods drive each can help you figure out what’s actually behind the problem.
Why Some Foods Produce More Gas
Your small intestine handles most digestion, but certain carbohydrates, fibers, and sugars slip through undigested because you lack the enzymes to break them down. When these reach your large intestine, trillions of bacteria feast on them and release gases as byproducts: hydrogen, carbon dioxide, and in roughly one-third of people, methane. This is completely normal. The average person passes gas 14 to 23 times a day.
The smell is a separate issue. Foul-smelling gas comes primarily from hydrogen sulfide, produced when gut bacteria break down sulfur-containing compounds. Bacteria in the genera Desulfovibrio, Fusobacterium, and others generate hydrogen sulfide either by breaking apart sulfur-rich amino acids (like cysteine and methionine) or by reducing sulfate, a compound found naturally in many foods and drinking water. So the question isn’t just “what makes more gas?” but also “what makes gas smell worse?”
Beans, Legumes, and Lentils
Beans are the classic offender for a reason. They’re loaded with a complex sugar called raffinose, along with related sugars called stachyose and verbascose. Humans don’t produce the enzyme needed to break these down in the small intestine, so they arrive in the colon fully intact and ready for bacterial fermentation. The main fermentable carbohydrate in legumes and pulses is a group of sugars called galacto-oligosaccharides (GOS).
The good news: preparation makes a real difference. Soaking dried beans for 16 hours reduces raffinose content by about 55% and stachyose by a similar amount. Cooking them for 60 minutes drops raffinose by around 80% and stachyose by 87%. Canned beans, which have been both soaked and cooked during processing, tend to cause less gas than beans you cook from dry without a long soak. Rinsing canned beans also washes away some of the dissolved sugars in the liquid.
Cruciferous Vegetables
Broccoli, cabbage, Brussels sprouts, cauliflower, and kale all contain raffinose, the same sugar that makes beans gassy. They also contain sulfur compounds, which means they can contribute to both the volume and the smell of gas. Asparagus falls into the same category.
Cooking these vegetables breaks down some of the gas-producing sugars, so steamed broccoli will typically cause less trouble than raw broccoli in a salad. That said, overcooking cruciferous vegetables can actually release more sulfur compounds, which is why boiled cabbage has such a distinctive smell. A middle ground, like roasting or light steaming, tends to reduce gas production while preserving nutrients.
Dairy Products
Milk, ice cream, soft cheeses, and other dairy foods contain lactose, a sugar that requires a specific enzyme to digest. A significant portion of the global population produces less of this enzyme after childhood, which means lactose passes undigested into the colon where bacteria ferment it into gas. If you notice bloating and gas specifically after dairy, lactose is the likely culprit.
Not all dairy is equal, though. Hard aged cheeses like cheddar and Parmesan contain very little lactose because bacteria consumed most of it during aging. Butter is also very low in lactose. Yogurt falls somewhere in the middle: the bacterial cultures used to make it pre-digest some of the lactose, so many people who struggle with milk tolerate yogurt just fine.
High-Protein Foods and Sulfur
If your gas doesn’t just increase in volume but gets noticeably worse in smell, protein-rich foods are often the reason. Red meat, eggs, dairy, nuts, and soy all contain high amounts of the sulfur amino acids methionine and cysteine. When gut bacteria break these down, they produce hydrogen sulfide, the compound responsible for a rotten-egg smell.
This is why a high-protein diet, especially one heavy in red meat and eggs, can produce gas that’s lower in volume but significantly more pungent. The gas itself may not be more frequent, but each episode is harder to ignore. Garlic, onions, and wine also contain sulfur compounds that feed the same bacterial pathways.
Sugar Alcohols and Artificial Sweeteners
Sorbitol, xylitol, mannitol, and erythritol are sugar alcohols used to sweeten “sugar-free” gum, candy, protein bars, and diet drinks. Your small intestine absorbs them poorly, so they travel to the colon largely intact and get fermented by bacteria. The FDA actually requires products containing added sorbitol or mannitol to carry a warning that “excessive consumption can cause a laxative effect.”
Research suggests that up to 10 to 15 grams a day of sugar alcohols is generally tolerable for most people. To put that in perspective, a single sugar-free protein bar can contain 10 to 20 grams. A few pieces of sugar-free gum throughout the day might be fine, but combining multiple sugar-free products can easily push you past the threshold where gas and bloating kick in.
Sorbitol also occurs naturally in certain fruits, including apples, pears, cherries, and stone fruits like peaches and plums. If you notice gas after eating these fruits but not others, sorbitol is the likely explanation.
Wheat, Onions, and Other High-Fructan Foods
Fructans are a type of soluble fiber found in wheat, onions, garlic, artichokes, and leeks. They’re also present in many grain and cereal products. Like raffinose, fructans resist digestion in the small intestine and ferment rapidly once they reach the colon. Soluble fibers like fructans and inulin (a type of fructan added to many “high-fiber” processed foods) ferment quickly and produce high gas volumes. In lab studies, inulin generates peak fermentation in under six hours, producing roughly 305 milliliters of gas per gram.
This is worth knowing because inulin is increasingly added to yogurts, snack bars, and cereals to boost fiber content on the label. If you’ve started eating a new “high-fiber” product and noticed more gas, check the ingredients for inulin or chicory root fiber, which is the same thing.
Insoluble fiber, the kind found in whole wheat bran and vegetable skins, ferments more slowly and produces somewhat less gas overall. It still causes some, but the effect is more gradual and often better tolerated.
Carbonated Drinks
Soda, sparkling water, and beer introduce carbon dioxide directly into your digestive tract. Most of this exits as burping, but some travels through to the intestines. Carbonated drinks sweetened with high-fructose corn syrup deliver a double hit: the carbonation itself plus excess fructose, which is poorly absorbed by many people and ferments in the colon.
How to Narrow Down Your Triggers
Because gut bacteria vary so much between individuals, the same food can cause significant gas in one person and none in another. The most practical approach is an elimination strategy: remove the most likely offenders for two to three weeks, then reintroduce them one at a time, waiting a few days between each. This lets you identify your specific triggers rather than avoiding entire food groups unnecessarily.
A few patterns can help you sort things out. Gas that’s high in volume but not particularly smelly points toward fermentable carbohydrates: beans, cruciferous vegetables, dairy, or fructans. Gas that’s lower in volume but smells terrible suggests sulfur-rich foods: red meat, eggs, garlic, onions, or wine. And gas that comes with significant bloating but less actual flatulence can sometimes indicate that bacteria are fermenting food higher up in the digestive tract than normal, a condition called small intestinal bacterial overgrowth (SIBO), which tends to present more as bloating than pain.
If your gas is persistent, severe enough to disrupt daily life, or accompanied by bloody stools, unexplained weight loss, ongoing diarrhea or constipation, or recurrent nausea, those are signs that something beyond diet may be going on.

