Your farts smell bad because of sulfur-containing gases produced by bacteria in your large intestine. The main culprit is hydrogen sulfide, the same compound responsible for the smell of rotten eggs. Most of the gas you pass is actually odorless (nitrogen, oxygen, carbon dioxide, methane), but even tiny amounts of sulfur gases can make a big impression.
The Chemistry Behind the Smell
Your colon is home to trillions of bacteria, and certain species called sulfate-reducing bacteria break down sulfur-containing compounds from your food. One well-studied species, Bilophila wadsworthia, specializes in this process. As these bacteria feast on sulfur from your diet, they release hydrogen sulfide as a byproduct. Your intestinal lining also produces small amounts of hydrogen sulfide on its own, but the bacteria in your gut are the primary source.
Hydrogen sulfide isn’t the only smelly compound, though. When gut bacteria ferment amino acids from protein, they produce additional foul-smelling gases. Ammonia comes from general protein breakdown. A compound called skatole, which has a strong fecal odor, forms when bacteria transform the amino acid tryptophan. Together, these gases create the range of unpleasant smells you might notice.
Foods That Make It Worse
The simplest explanation for especially bad-smelling gas is what you ate in the last 12 to 24 hours. Foods high in sulfur compounds directly fuel the bacteria that produce hydrogen sulfide. The biggest offenders include:
- Cruciferous vegetables: broccoli, cabbage, cauliflower, Brussels sprouts
- Alliums: onions and garlic
- Animal protein: meat, poultry, and eggs
This doesn’t mean these foods are unhealthy. Cruciferous vegetables are packed with nutrients. But if you’ve had a heavy serving of broccoli and eggs for dinner, your gut bacteria have more sulfur to work with, and the result is predictably potent.
High-Protein Diets and Foul Gas
If you’ve recently increased your protein intake, whether from supplements, a keto diet, or just eating more meat, your gas may have gotten noticeably worse. There’s a straightforward reason: when your gut bacteria don’t have enough fermentable carbohydrates (fiber, basically), they shift toward fermenting protein instead. This produces more ammonia, more hydrogen sulfide, and more skatole than carbohydrate fermentation would.
The fix is often just adding more fiber-rich foods alongside your protein. Fiber gives your gut bacteria their preferred fuel source, which reduces how much protein they break down and lowers the production of those sulfur gases.
Food Intolerances and Malabsorption
Sometimes the problem isn’t what you’re eating but how well your body absorbs it. When sugars like lactose (from dairy) or fructose (from fruit, honey, and many processed foods) aren’t properly absorbed in your small intestine, they travel intact to your colon. There, bacteria ferment them aggressively, producing excess gas.
Fructose malabsorption happens when you don’t have enough carrier proteins in your intestinal cells to shuttle fructose where it needs to go. The unabsorbed fructose builds up in your large intestine and feeds gas-producing bacteria. Lactose intolerance works similarly: undigested lactose reaches the colon and becomes a bacterial buffet. If you notice that your gas is consistently worse after dairy, fruit, or foods sweetened with high-fructose corn syrup, one of these intolerances could be the underlying issue.
A broader category of poorly absorbed carbohydrates, known as FODMAPs (which includes fructose, lactose, and several other fermentable sugars), can trigger the same pattern. Some people find that temporarily reducing high-FODMAP foods and then reintroducing them one at a time helps identify the specific trigger.
Bacterial Overgrowth and Gut Conditions
Passing gas 14 to 23 times a day is considered normal. If you’re well beyond that range, or if the smell has changed dramatically and stayed that way, something in your gut ecosystem may have shifted.
Small intestinal bacterial overgrowth, or SIBO, occurs when bacteria that normally live in your large intestine colonize the small intestine instead. These misplaced bacteria start digesting carbohydrates before your body has a chance to absorb them, producing extra gas and short-chain fatty acids. The result is bloating, excessive flatulence, and often a change in odor. SIBO can be diagnosed with a breath test that measures hydrogen and methane levels.
Irritable bowel syndrome (IBS) can also alter your gas profile, partly because it changes how quickly food moves through your digestive tract. Slower transit means food sits longer in the colon, giving bacteria more time to ferment it and produce smelly byproducts. Constipation works the same way: when stool lingers in the colon for days, bacteria have extended access to whatever’s in there, and the gas that builds up tends to be more concentrated with sulfur compounds.
What You Can Do About It
Start with your diet. Cutting back on high-sulfur foods for a few days is the fastest way to test whether food is the main driver. If you eat a lot of protein, add more fiber-rich carbohydrates like oats, sweet potatoes, or legumes to give your gut bacteria an alternative fuel source. If you suspect a specific intolerance, try eliminating that food for two to three weeks and see if the smell improves.
One over-the-counter option with surprisingly strong evidence is bismuth subsalicylate (the active ingredient in Pepto-Bismol). In a study of healthy adults, taking it for three to seven days reduced hydrogen sulfide production in the colon by more than 95%. The bismuth component binds directly to hydrogen sulfide and neutralizes it. This isn’t a long-term solution, but it can be useful for short stretches when you need relief.
Eating more slowly and chewing thoroughly reduces the amount of air you swallow, which won’t change the smell but can reduce the volume of gas. Staying hydrated and physically active both support regular bowel movements, which means less time for bacteria to ferment food in your colon.
Signs Something More Serious Is Going On
Bad-smelling gas on its own is almost never dangerous. But if it comes with persistent diarrhea, constipation, unintentional weight loss, blood in your stool, or vomiting, those symptoms together point to something worth investigating. Conditions like celiac disease, inflammatory bowel disease, and chronic infections can all change the way your gut processes food and alter the smell and frequency of your gas.

