Farts that smell like diarrhea are typically producing high levels of hydrogen sulfide, the same sulfur-based gas responsible for the smell of rotten eggs, sewage, and loose stool. The overlap in smell isn’t a coincidence: diarrhea and foul gas share many of the same chemical triggers in your gut. In most cases, the cause is dietary, but persistent changes in gas odor can signal a digestive issue worth investigating.
Why Diarrhea and Gas Smell the Same
The characteristic smell of both diarrhea and foul-smelling gas comes primarily from hydrogen sulfide and related sulfur compounds. Your colon is home to billions of bacteria, and certain species, particularly sulfate-reducing bacteria like Desulfovibrio and Bilophila, produce hydrogen sulfide as a byproduct of breaking down food. They use sulfate as fuel for their metabolism and release hydrogen sulfide gas in the process. Human flatulence contains anywhere from 0.2 to 30 parts per million of hydrogen sulfide, and even at the low end, it’s potent enough to smell terrible.
When something increases hydrogen sulfide production in your gut, or when food moves through your intestines faster than normal (as it does during a bout of diarrhea), you get that same sharp, sulfurous stench in your gas. So farts that smell like diarrhea often mean your gut is doing the same chemical work it does during diarrhea, just without the loose stool.
Sulfur-Rich Foods Are the Most Common Cause
The simplest explanation is your diet. Foods high in sulfur compounds give your gut bacteria more raw material to convert into hydrogen sulfide. The biggest offenders are members of the allium family: garlic, onions, leeks, and chives. More than half of the volatile compounds in these foods contain sulfur. Cruciferous vegetables like broccoli, cabbage, cauliflower, and Brussels sprouts are also high in sulfur.
But sulfur hides in less obvious places too. Eggs, red meat, cheese, and dairy products all contain sulfur-containing amino acids that gut bacteria readily convert into hydrogen sulfide. Even bread, potato products, nuts, and coffee contain sulfur compounds, especially after cooking. Heat treatment of milk creates additional sulfur-based flavor compounds, and the bacteria and yeast in aged cheese produce a compound called methanethiol, which has a particularly pungent smell.
If your gas suddenly smells worse than usual, think about what you’ve eaten in the last 12 to 24 hours. A meal heavy in garlic, red meat, and broccoli is practically a recipe for diarrhea-scented gas.
Undigested Food Fermenting in Your Colon
When your body can’t break down certain foods in the small intestine, they pass intact into the colon, where bacteria feast on them. This fermentation process produces large amounts of gas, including hydrogen sulfide, and the smell can be dramatically worse than what you’d get from normal digestion.
Lactose intolerance is one of the most common examples. If your body doesn’t produce enough lactase (the enzyme that breaks down milk sugar), lactose travels to the colon undigested. Bacteria interact with it there, producing bloating, cramps, and notably foul gas. The same thing happens with fructose malabsorption or difficulty digesting certain fibers and sugar alcohols found in processed foods.
A more serious version of this problem is exocrine pancreatic insufficiency, where your pancreas doesn’t produce enough digestive enzymes to break down fats, carbohydrates, and proteins properly. Undigested fat reaching the colon produces greasy, unusually foul-smelling stools and gas. People with this condition often notice their stool and their gas share that same offensive odor, which is exactly what the original question describes.
Bacterial Imbalances in the Gut
Your gut contains a complex ecosystem of bacteria, and the balance between different species matters. When hydrogen sulfide-producing bacteria become overrepresented, your gas output shifts toward that rotten, diarrhea-like smell. This can happen after a course of antibiotics, during periods of stress, or with dietary changes that favor sulfate-reducing bacteria over other species.
Small intestinal bacterial overgrowth (SIBO) is a condition where bacteria colonize parts of the small intestine where they don’t normally thrive. A hydrogen sulfide-dominant form of SIBO produces significant bloating, abdominal pain, and gas with a strong sulfur smell. In a registry of patients diagnosed with this form, 77% reported bloating as their primary symptom, along with constipation and abdominal pain.
Bile acid malabsorption is another condition that creates the exact combination this question describes. Normally, your body reabsorbs most bile acids in the small intestine. When too many escape into the colon, they irritate the lining, trigger extra fluid secretion, and speed up muscle contractions. The result is frequent, urgent diarrhea along with bloating and foul gas. If your gas smells like diarrhea and you’re also having more frequent loose stools, this is worth considering.
Infections That Cause Sulfurous Gas
Certain gut infections produce a distinctive sulfur smell in both gas and stool. Giardia, a waterborne parasite, is one of the most recognizable. The CDC lists its common symptoms as diarrhea, gas, smelly greasy stools that float, stomach cramps, and nausea. The combination of sulfurous gas and greasy, floating stool is considered a hallmark of giardia infection, often picked up from contaminated water during camping or travel.
Bacterial infections from organisms like Salmonella, Fusobacterium, and Enterobacter also produce hydrogen sulfide directly from the amino acid cysteine. These infections typically come with other symptoms like fever, cramping, and actual diarrhea, not just diarrhea-smelling gas.
When the Smell Signals Something Bigger
Occasional foul gas after a heavy meal is normal. But if your gas has smelled consistently like diarrhea for weeks and the smell doesn’t change with your diet, that pattern can point to an underlying condition. Inflammatory bowel diseases like Crohn’s disease and ulcerative colitis alter the gut environment in ways that increase hydrogen sulfide production. Colorectal cancer and bowel obstructions can also cause persistent changes in gas odor, though these come with additional symptoms like unexplained weight loss, blood in stool, or significant changes in bowel habits.
The practical test is straightforward. Cut back on high-sulfur foods for a few days: skip the garlic, onions, cruciferous vegetables, eggs, and red meat. If the smell improves, your diet was the driver. If it persists regardless of what you eat, or if it’s accompanied by ongoing bloating, pain, weight loss, or changes in your stool, that’s worth bringing up with a healthcare provider who can test for conditions like pancreatic insufficiency, bile acid malabsorption, or bacterial overgrowth.

