Your gas stinks because of sulfur. Most of the gas you pass is odorless, made up of nitrogen, oxygen, carbon dioxide, hydrogen, and sometimes methane. But a tiny fraction, roughly 50 parts per million, consists of sulfur-containing compounds that are potent enough to dominate the smell even at trace concentrations. What you eat, the bacteria living in your gut, and how quickly food moves through your digestive system all influence how much of these compounds get produced.
The Compounds Behind the Smell
Three sulfur compounds do most of the damage. Hydrogen sulfide is the most common and produces the classic rotten egg smell. Methanethiol smells more like rotting vegetables or garlic. Dimethyl sulfide has a cabbage-like quality and can add an oddly sweet undertone to the overall odor. Researchers analyzing flatulence have identified nearly 300 different compounds in a single sample, but these three sulfur gases, along with two other molecules called indole and skatole (which carry a fecal smell), are the main offenders. Even at extremely low concentrations relative to the other gases, they overpower everything else.
Foods That Make It Worse
Sulfur-rich foods are the most direct route to foul-smelling gas. Cruciferous vegetables like broccoli, cauliflower, cabbage, and Brussels sprouts are high in sulfur compounds. So are garlic, onions, eggs, and red meat. Dried fruits and wine can also contribute because they contain sulfites. Beer, which is fermented, adds both sulfur compounds and fermentable carbohydrates to the mix.
High-protein diets are a common culprit that people overlook. When you eat more protein than your small intestine can fully absorb, the excess reaches your colon, where bacteria ferment it. This fermentation produces hydrogen sulfide, ammonia, and those indole and skatole compounds. One amino acid in particular, tryptophan (found in turkey, chicken, cheese, and nuts), gets broken down by specific gut bacteria into skatole and indole. The more undigested protein that reaches your colon, the more raw material those bacteria have to work with.
Your Gut Bacteria Are Doing the Work
The smell of your gas is ultimately determined by which bacteria dominate your colon and what you’re feeding them. Certain anaerobic bacteria, particularly those in a group called Desulfovibrio, produce hydrogen sulfide by converting sulfate, a compound found naturally in many foods and drinking water. Other common gut microbes, including species of Salmonella, E. coli, and Fusobacterium, generate hydrogen sulfide by breaking down sulfur-containing amino acids like cysteine.
Everyone’s microbiome is different, which is why two people can eat the same meal and produce very different results. If your gut happens to harbor a larger population of sulfate-reducing bacteria, you’ll produce more hydrogen sulfide from the same food. Factors that shift your microbiome, like antibiotics, illness, travel, or a sudden dietary change, can temporarily make your gas noticeably worse.
Constipation Concentrates the Problem
When food moves slowly through your digestive tract, bacteria have more time to ferment it. Constipation means stool sits in your colon longer, giving sulfate-reducing bacteria and protein-fermenting bacteria extra hours to produce smelly compounds. The gas that builds up during this time becomes more concentrated with sulfur. If you’ve noticed that your gas is worse during periods of constipation or irregular bowel habits, the extended fermentation time is likely the explanation. Increasing fiber intake and staying hydrated can help move things along, though adding fiber too quickly can temporarily increase gas volume before your gut adjusts.
When Smelly Gas Signals Something Else
Most of the time, foul-smelling gas reflects what you ate in the last day or two. But persistently terrible-smelling gas, especially combined with other symptoms, can point to a digestive condition. Celiac disease, for example, damages the lining of the small intestine and impairs nutrient absorption, sending more undigested food to the colon for bacterial fermentation. Lactose intolerance works similarly: undigested lactose reaches the colon and feeds gas-producing bacteria. Pancreatic insufficiency, where the pancreas doesn’t produce enough digestive enzymes, can cause the same pattern with fats and proteins.
Parasitic infections like giardia are another possible cause, particularly if the onset is sudden and accompanied by watery diarrhea. Pay attention if smelly gas comes alongside abdominal pain, diarrhea, unexplained weight loss, fever, blood in your stool, or a skin rash. These combinations suggest something beyond diet that’s worth investigating.
How To Reduce the Smell
The most effective approach is dietary. Cutting back on sulfur-heavy foods (cruciferous vegetables, eggs, red meat, garlic, onions) for a week or two will usually produce a noticeable difference. If you’re eating a high-protein diet, especially from animal sources, try moderating your portion sizes or spreading protein intake more evenly across meals so your small intestine has a better chance of absorbing it before it reaches the colon.
Bismuth subsalicylate, the active ingredient in Pepto-Bismol, directly binds to hydrogen sulfide in the colon and converts it into bismuth sulfide, an insoluble compound that can’t become gas. A study published in Gastroenterology found it markedly decreased hydrogen sulfide release. One side effect worth knowing: bismuth sulfide is black, so your stool will temporarily turn dark while you’re taking it. This is harmless but can be alarming if you’re not expecting it.
Probiotics may help over time by shifting the balance of your gut bacteria away from heavy sulfur producers, though results vary widely between individuals. Regular physical activity and adequate water intake support healthy transit time, reducing the window for fermentation. Most people pass gas around 14 or more times a day, and some odor is completely normal. The goal isn’t to eliminate it entirely but to bring it back to a baseline that doesn’t clear the room.

