Sulfamethoxazole-trimethoprim: what it treats, how to take it, side effects

Last updated September 3, 2026.

Sulfamethoxazole-trimethoprim is a two-part sulfa antibiotic that stops the growth of bacteria. You may know it as Bactrim, Septra, or co-trimoxazole. The two ingredients block two consecutive steps in the process bacteria use to build their proteins and DNA, which makes the combination stronger than either drug alone.

What does it treat?

It treats certain infections caused by bacteria, and it is also used for travelers' diarrhea. The label covers urinary tract infections, acute worsening of chronic bronchitis, shigellosis (a bacterial diarrhea), and ear infections in children. It does not kill viruses, so colds and flu are outside its reach.

How do you take it?

By mouth as a tablet or liquid, at the same times each day. MedlinePlus gives the general frame - two to four times a day, with your doctor setting the schedule for your infection - and the Bactrim label gives the common adult course: 1 double-strength (DS) tablet, or 2 regular tablets, every 12 hours for 10 to 14 days for a urinary tract infection, and 14 days for a bronchitis flare. Shake the liquid well. Drink plenty of fluids during treatment, finish the whole prescription, and if you miss a dose take it when you remember unless the next one is close - never double up. You should feel better within the first few days.

Questions about sulfamethoxazole-trimethoprim

Start a free AI doctor consult →

Side effects to know

Who should not take it?

Anyone allergic to sulfonamides or trimethoprim should not take it. MedlinePlus says your doctor may also rule it out if you have ever had low platelets from these drugs, abnormal red blood cells from low folic acid, PKU, or liver or kidney disease. Flag severe allergies, asthma, low folic acid, HIV, porphyria, thyroid disease, and G6PD deficiency. Pregnancy is a hard stop: MedlinePlus says co-trimoxazole can harm the fetus (the label cites an increased risk of birth defects including neural tube defects), so if you are pregnant or become pregnant while taking it, call your doctor immediately. It also makes skin sun-sensitive - protective clothing and sunscreen while on it.

When is it an emergency?

A spreading or blistering rash, especially with fever, is an emergency with this drug - get care immediately, do not take the next dose. The same goes for fainting or loss of consciousness, trouble breathing, and signs of severe allergic reaction with facial or throat swelling. For an overdose, call Poison Control at 1-800-222-1222. Pymander's escalation routing is built and tested specifically for this class of decision; see the safety architecture working paper.

What a Pymander AI doctor consult looks like

You are mid-course on the Bactrim for the UTI - is the burning better, and any sign of a rash?
Burning when I pee is almost gone after 3 days. No rash. The pill makes me a little queasy but it passes.
Thanks for giving me all this information. Based on what you've said, the UTI is responding on schedule and the queasiness is a common, mild effect; the rash watch stays active through the last dose. Here's your care note to share with your care team.
Care note
Bactrim course check
Day 3 of a Bactrim course for UTI; symptoms much improved. Mild queasiness after doses. No rash or fever. Completing full course.
View care note →

Illustrative example, not a real member's messages.

Common questions

Is Bactrim a sulfa drug, and why does that matter?

Yes - sulfamethoxazole is a sulfonamide, the class people mean by sulfa drugs. Anyone with a known sulfa allergy should not take it. And even without a prior allergy, any rash while taking it means calling your doctor immediately, because this class can rarely cause severe skin reactions that start as an ordinary-looking rash.

Why do I need to drink extra water with Bactrim?

MedlinePlus instructs drinking plenty of fluids during treatment with co-trimoxazole. The drug clears through the kidneys and urine, and good hydration helps it move through without irritating the urinary tract. Keep a water bottle nearby for the whole course.

Does Bactrim make you sensitive to the sun?

Yes. MedlinePlus advises avoiding unnecessary or prolonged sun exposure and wearing protective clothing, sunglasses, and sunscreen while taking it, because the drug makes skin more likely to burn.

How fast does Bactrim work for a UTI?

MedlinePlus says you should begin to feel better during the first few days of treatment. The label's adult course for a urinary tract infection is one double-strength tablet every 12 hours for 10 to 14 days - so expect early relief but plan to finish the full course regardless.

Can I take Bactrim while pregnant?

No. MedlinePlus says co-trimoxazole can harm the fetus and to call your doctor immediately if you become pregnant while taking it; the Bactrim label cites studies linking use during pregnancy to an increased risk of certain birth defects. If you could be pregnant, that conversation comes before the first dose.

Can I drink alcohol while taking Bactrim?

Neither the FDA label nor MedlinePlus lists a specific alcohol interaction for this combination. Alcohol can worsen nausea and dehydrate you while the drug asks for extra fluids, so many clinicians suggest skipping it during the course - ask your doctor about your situation.

Sources

Pymander is not a replacement for a physician and does not provide medical advice, diagnosis, or treatment.

Free AI doctor, 24/7 by textStart a free AI doctor consult