Skip to Content

Does E. coli make you gassy?

E. coli is a type of bacteria that normally lives in the intestines of people and animals. Most types of E. coli are harmless. However, some types can cause intestinal infections, leading to symptoms like diarrhea and gas.

Gas, or flatulence, refers to the buildup of gases in the gastrointestinal tract. It is a normal byproduct of digestion. However, excessive or smelly gas can be caused by an intestinal infection like E. coli. E. coli infections affect the digestive system in ways that can increase gas production.

What causes digestive gas?

Gas in the digestive tract comes primarily from:

– Swallowing air while eating and drinking
– Gas diffusion between the blood and the intestines
– Gas production by gut bacteria during fermentation and digestion

When we swallow food and liquids, we also tend to swallow small amounts of air. Much of this air is expelled through belching. The remaining air eventually makes its way through the gut and is released through flatulence.

The inner lining of the intestines is permeable to certain gases like oxygen, carbon dioxide, hydrogen, and methane. Some of these gases are exchanged between the blood and the intestinal lumen. This exchange of gases contributes to the gases that build up and are eventually released as flatulence.

The intestinal microbiota, consisting of trillions of bacteria and other microorganisms, plays a major role in digestive gas production. During digestion, gut bacteria ferment undigested carbohydrates into various gases like hydrogen, methane, and carbon dioxide. The types of gases produced depend on the specific bacteria present.

How E. coli infections cause gas

E. coli are a normal part of the gut microbiota. However, infection with pathogenic strains can disrupt the bacterial balance and digestive processes in ways that increase gas production:

Changes to microbiota

Pathogenic E. coli can suppress populations of beneficial bacteria through the release of bacteriocins and other compounds. This allows gas-producing bacteria like Clostridia and Enterobacteria to proliferate.

Malabsorption of nutrients

Diarrhea and intestinal inflammation from E. coli infection can impair nutrient absorption. More undigested carbohydrates reach the colon, providing fuel for bacterial fermentation and gas production.

Rapid transit time

E. coli infection speeds up intestinal transit time. Food has less time to get properly digested and absorbed before reaching the colon. This increases delivery of undigested material to gas-producing bacteria.

Intestinal inflammation

Inflammation from E. coli infection makes the intestinal lining more permeable to gases. More gas can diffuse between the intestines and the blood, contributing to flatulence.

Common gases in flatulence

The composition of digestive gases depends on diet and the gut microbiota. The main gases released in flatulence are:


Nitrogen makes up around 59% of flatus. It is not produced by bacterial fermentation. Nitrogen gas simply diffuses into the intestines from swallowed air.


Hydrogen gas comprises around 31% of flatus. It is produced when bacteria ferment undigested carbohydrates. High-fiber diets and carbohydrate malabsorption tend to increase hydrogen production.

Carbon dioxide

Carbon dioxide makes up about 10% of intestinal gas. It can be exchanged with the blood or created through bacterial fermentation. Certain beverages like beer and sparkling water can increase carbon dioxide levels.


Methane constitutes about 10% of flatus. It is generated exclusively by intestinal archaea like Methanobrevibacter smithii. Not everyone has these methane-producing organisms in their gut.

Oxygen, hydrogen sulfide, and others

Small amounts of oxygen, hydrogen sulfide, and other gases may also be present. Hydrogen sulfide contributes to the foul odor associated with flatus.

Signs and symptoms of excessive gas

Gas is considered excessive if it causes recurrent discomfort or distress. Signs and symptoms may include:

– Bloating and abdominal distension
– Flatulence over 20 times per day
– Passing gas more than 3 times per hour
– Noisy flatulence
– Foul-smelling flatulence
– Abdominal cramps or pain
– Burping
– Belching over 3 times per hour
– Sensation of gas trapped in rectum

Treatments for excessive gas

Dietary changes and over-the-counter products can help reduce excessive gas from E. coli or other causes:

Eliminate gas-producing foods

Avoid foods known to cause gas like beans, onions, celery, carrots, raisins, bananas, apricots, wheat, and certain dairy products.

Try a low FODMAP diet

A low FODMAP diet restricts fermentable carbs that can increase gas production. FODMAP stands for fermentable oligosaccharides, disaccharides, monosaccharides and polyols.

Take alpha-galactosidase

This enzyme breaks down oligosaccharides to reduce gas production. It is available as Beano and generic products.

Use simethicone

Simethicone helps consolidate gas bubbles in the gut so they can be passed more easily. Brand names include Gas-X, Phazyme, and Mylicon.

Take probiotics

Probiotic supplements help restore populations of beneficial bacteria. This may improve digestion and reduce gas production.

Try activated charcoal

Activated charcoal tablets can help adsorb gases. Charcoal supplements may also reduce the odor of flatulence.

When to see a doctor

Consult a doctor if excessive gas is accompanied by:

– Persistent diarrhea
– Blood in stool
– Fever and chills
– Significant weight loss
– Vomiting
– Constipation
– Persistent abdominal pain

These can indicate an underlying infection, inflammation, or other medical condition requiring diagnosis and treatment. A doctor can determine if E. coli or another condition is causing excessive gas.

E. coli infection diagnosis

If E. coli infection is suspected, a doctor may order:

– Stool culture to identify pathogenic strains
– Blood tests to check for signs of infection
– Endoscopy for direct visualization of the intestines
– Imaging tests like CT scans or X-rays

Stool samples are typically checked for E. coli O157:H7, although many other strains can also cause intestinal illness. Culture allows testing of E. coli for antibiotic resistance.

E. coli infection treatment

Most E. coli intestinal infections resolve on their own. However, antibiotics may be warranted if the infection is severe or the individual is at high risk for complications.

Rehydration to prevent dehydration is important. Over-the-counter anti-diarrheal medication may help slow transit time. A doctor can provide guidance on symptom management.

Probiotics and diet modification may help restore normal intestinal bacteria after antibiotics. Good hygiene can prevent spread to others.

Preventing E. coli infection

An E. coli infection is typically caused by ingesting contaminated food or water. Prevention involves:

– Thorough hand washing, especially before cooking and eating
– Avoiding cross-contamination in kitchens
– Cooking meats thoroughly to kill bacteria
– Avoiding unpasteurized dairy products
– Drinking only treated water
– Rinsing produce thoroughly
– Avoiding swallowing water when swimming

Vaccines are in development but not yet available to prevent E. coli infections.


E. coli is a common cause of intestinal infections that can increase gas production and cause flatulence. Symptoms like diarrhea, bloating, and abdominal cramps occur as the infection disrupts digestion and the intestinal microbiota.

While most E. coli are harmless, pathogenic strains can proliferate and release toxins that damage the intestinal lining. This impairs nutrient absorption, speeds up transit time, alters the microbiota, and increases inflammation.

Excessive gas from E. coli will typically resolve with supportive treatment and restoration of normal intestinal functioning. Preventing swallowing contaminated material is key to avoiding infection in the first place.