Most E. coli infections resolve on their own without antibiotics, typically within five to seven days. The cornerstone of treatment is staying hydrated and letting your body clear the infection naturally. But the type of E. coli matters enormously: some strains can be treated with common medications, while others become more dangerous if you take the wrong ones.
Hydration Is the Primary Treatment
Diarrhea from E. coli pulls water and electrolytes out of your body fast. Replacing those fluids is the single most important thing you can do. Water alone helps, but oral rehydration solutions that contain electrolytes and a small amount of sugar are more effective because they help your intestines absorb fluid more efficiently. You can find these at any pharmacy, or make a basic version with water, salt, and sugar.
Sip fluids consistently rather than drinking large amounts at once, which can trigger more nausea. If you’re vomiting frequently, take small sips every few minutes. Signs that dehydration is becoming serious include dark urine, dizziness when standing, a dry mouth, and producing very little urine. Children and older adults dehydrate faster and need closer monitoring.
Why Antibiotics Can Make Things Worse
This is the most counterintuitive part of E. coli treatment. For the most common foodborne strain, Shiga toxin-producing E. coli (STEC, including the well-known O157:H7), antibiotics are not just unhelpful. They’re actively dangerous. Taking antibiotics during a STEC infection increases the chance of developing hemolytic uremic syndrome (HUS), a serious complication that damages the kidneys, destroys red blood cells, and drops platelet counts.
The reason is biological. STEC bacteria carry toxin genes inside dormant viruses embedded in their DNA. Certain antibiotics activate those viruses, ramping up toxin production. Even when the antibiotic successfully kills the bacteria, dying cells can release a large burst of toxin all at once. Up to 25% of STEC patients may develop HUS, and antibiotic use appears to push that risk higher.
Other strains of E. coli, like the type that causes traveler’s diarrhea (enterotoxigenic E. coli), can sometimes be treated with antibiotics. The critical distinction is knowing which strain you have, which is why getting a stool test matters before starting any medication.
Anti-Diarrheal Medications: Proceed With Caution
It’s tempting to reach for an over-the-counter anti-diarrheal like loperamide (Imodium) to stop the cramping and frequent bathroom trips. But these medications work by slowing your gut, which means toxin-producing bacteria and their toxins sit in your intestines longer instead of being flushed out.
The CDC is clear on the restrictions:
- Do not use anti-diarrheal medication if you have a high fever or bloody diarrhea.
- Do not use anti-diarrheal medication if you have or suspect a STEC infection, as it increases the risk of HUS.
- Do not give bismuth subsalicylate products (like Pepto-Bismol) to children under 12.
If your diarrhea is watery (not bloody) and you have no fever, talk to your healthcare provider before taking anything. In many cases, letting the diarrhea run its course while staying hydrated is safer than trying to suppress it.
What You Can Do at Home
Beyond fluids, rest is essential. Your immune system is doing the heavy lifting, and giving it energy to work speeds recovery. Eat bland, easy-to-digest foods as you’re able to tolerate them: rice, toast, bananas, plain crackers. Avoid dairy, fatty foods, caffeine, and alcohol until your digestion normalizes, which may take several days after your last symptoms.
Because STEC bacteria shed in stool for one to four weeks (even after you feel better), preventing spread to others in your household matters. Wash your hands thoroughly after every bathroom visit. Clean and disinfect bathroom surfaces, diaper-changing areas, and commonly touched objects like doorknobs and light switches frequently. Anyone preparing food should be especially careful with hand hygiene during this window.
Warning Signs That Need Medical Attention
Most E. coli infections stay uncomfortable but manageable. A smaller number turn serious. Contact a healthcare provider if you have loose stools for more than two days or if your stools are bloody. Bloody diarrhea is a hallmark of STEC infection and signals that you need a proper diagnosis to guide safe treatment.
Watch specifically for signs of HUS, which typically appears about a week after diarrhea starts, sometimes just as the diarrhea seems to be improving. The warning signs include producing very little urine, unexplained bruising or small red dots on the skin, extreme fatigue or pallor, and swelling in the face, hands, or feet. In children, unusual irritability or confusion can signal the condition. HUS is a medical emergency that requires hospital treatment, including IV fluids, blood transfusions, and in severe cases, dialysis to support the kidneys while they heal.
How Different E. Coli Strains Change the Approach
Not all E. coli infections are the same, and the treatment differences are significant. STEC (the strain behind most foodborne outbreaks linked to contaminated meat, leafy greens, or unpasteurized products) is the one where antibiotics and anti-diarrheal drugs are off the table. Treatment is purely supportive: fluids, rest, and monitoring for complications.
Enterotoxigenic E. coli (ETEC), the most common cause of traveler’s diarrhea, is a different story. This strain doesn’t produce the same dangerous toxins, and antibiotics can shorten the duration of illness. If you picked up E. coli while traveling abroad and your symptoms are watery diarrhea without blood, your doctor may prescribe a short course of antibiotics.
E. coli can also cause urinary tract infections, which are treated with antibiotics as a standard approach. The “no antibiotics” rule applies specifically to STEC gut infections, not to E. coli in other parts of the body.
The takeaway is simple but important: knowing which type of E. coli you’re dealing with determines whether medication helps or harms. A stool culture or urine test gives your provider that answer. Until you know, the safest approach is hydration, rest, and avoiding anti-diarrheal drugs, especially if there’s any blood in your stool.

