Home / Pregnancy Medication Safety / Is Bactrim (Sulfamethoxazole/Trimethoprim) safe?

Is Bactrim (Sulfamethoxazole/Trimethoprim) safe in pregnancy?

Important: Always talk to your OB or pharmacist before starting, stopping, or changing any medication during pregnancy. This tool is general guidance — not a substitute for clinical advice.
Verdict
! With conditions
Avoid 1st trimester. Avoid near term.
FDA pregnancy category: C/D

Common uses

UTIs, MRSA, some pneumonias

How Bactrim (Sulfamethoxazole/Trimethoprim) works and why pregnancy changes the math

Bactrim (Sulfamethoxazole/Trimethoprim) is a sulfa antibiotic that works by blocking folate metabolism in bacteria. The "blocking folate" part is what makes the pregnancy decision tricky. Folate is critical for neural tube formation in the first trimester, and there have been signals in some studies linking first-trimester sulfa exposure to neural tube defects and cardiovascular defects.

There is a separate concern at the other end of pregnancy: sulfa drugs displace bilirubin from binding proteins, which can theoretically increase the risk of kernicterus (bilirubin-related brain damage) in newborns. Both concerns are why obstetricians generally avoid sulfa antibiotics in the first trimester and near term, even though use in the second trimester is widely considered acceptable for specific indications like resistant UTIs.

How Bactrim (Sulfamethoxazole/Trimethoprim) risk changes by trimester

First trimesterGenerally avoided due to folate antagonism and possible association with neural tube defects, urinary tract abnormalities, and cardiovascular defects. If absolutely needed, folate supplementation should be confirmed.
Second trimesterWidely accepted as safe for specific indications like resistant UTIs. The teratogenic windows have passed and the near-term concerns have not yet kicked in. This is the workable window if a sulfa antibiotic is truly the best choice.
Third trimester (especially near term)Avoided due to risk of kernicterus in the newborn. Sulfa drugs displace bilirubin from binding proteins, which can elevate free bilirubin levels in a baby who cannot yet handle that load.

The clinical reasoning behind the verdict

Folate antagonist — 1st trimester risk for neural tube defects. Near term: bilirubin displacement / kernicterus risk.

Dosing and what to do if symptoms keep going

If this medication has been prescribed during pregnancy, the dosing follows the prescriber's guidance rather than over-the-counter direction. These are medications where the pregnancy decision involves a specific risk-benefit conversation about why an alternative was not chosen.

If symptoms persist after starting the medication, contact the prescriber rather than self-adjusting. Many of the pregnancy concerns with these drug classes are dose- or duration-dependent, so prolonged use without provider awareness amplifies the risks. Persistent symptoms may also point to a need for a different antimicrobial choice or further diagnostic work-up.

Safer alternatives and how to choose between them

Amoxicillin, nitrofurantoin for UTIs.

The right alternative depends on what Bactrim (Sulfamethoxazole/Trimethoprim) was being used to treat. For mild symptoms, non-medication approaches often work — saline rinses for congestion, ice for swelling, heat for muscle pain, rest for fatigue. For ongoing conditions, pregnancy-safe medications usually exist and are best identified with your provider's input.

The trap to avoid is stopping a needed medication abruptly without a replacement plan, especially for chronic conditions like hypertension, diabetes, depression, or autoimmune disease. Untreated maternal conditions usually carry pregnancy risks of their own, sometimes larger than the risks of the medication being avoided. A pregnancy-aware substitute usually beats stopping treatment.

How to bring this up with your OB, midwife, or pharmacist

The most useful conversation with a provider about Bactrim (Sulfamethoxazole/Trimethoprim) starts with what you actually want to know rather than a yes-or-no question. Try one of these:

  • "I take Bactrim (Sulfamethoxazole/Trimethoprim) sometimes for [symptom]. Is the dose I am using fine, or would you adjust it for pregnancy?" This invites a specific answer rather than a generic "talk to your provider."
  • "What is your default for [the symptom]? If your default does not work for me, what is the next step?" Knowing the escalation plan ahead of time saves time when you actually need it.
  • "I have been on Bactrim (Sulfamethoxazole/Trimethoprim) for [condition] since before I got pregnant. What is your read on continuing versus switching?" For chronic medications, this is the most important question, and the answer is rarely "just stop."

Pharmacists are an underused resource here. The pharmacist at your usual pharmacy can pull up your records, check interactions, and answer pregnancy-medication questions without a co-pay or an appointment. For over-the-counter products especially, a pharmacist conversation is often faster than waiting for an obstetric callback.

What recent research has been saying about Bactrim (Sulfamethoxazole/Trimethoprim)

The literature on Bactrim (Sulfamethoxazole/Trimethoprim) in pregnancy continues to evolve as more population-level data accumulates and as researchers control more carefully for confounding factors. The pregnancy-specific evidence base for any given medication is rarely as deep as the general adult evidence base, so cautious clinical interpretation and individualized provider conversation remain the right approach as guidance updates.

Sources and further reading

ACOG Antibiotics 2024

One more time, because this is medical territory: Always talk to your OB, midwife, or pharmacist before starting, stopping, or changing any medication during pregnancy. The summary on this page is general education, not personalized clinical advice for your specific pregnancy or medical history. If you have a same-day concern about a medication you have taken, call your provider; if you have a symptom that worries you, do not wait.

Check another medication

Tylenol (Acetaminophen)Ibuprofen (Motrin / Advil)Aspirin (Bayer)Naproxen (Aleve)Benadryl (Diphenhydramine)Zyrtec (Cetirizine)Claritin (Loratadine)Allegra (Fexofenadine)Sudafed (Pseudoephedrine)Phenylephrine (Sudafed PE)Afrin (Oxymetazoline)Mucinex (Guaifenesin)Dextromethorphan (Robitussin DM)NyQuilDayQuilTums (Calcium Carbonate)Pepcid (Famotidine)Zantac (Ranitidine)Prilosec (Omeprazole)Pepto-Bismol (Bismuth Subsalicylate)Imodium (Loperamide)Miralax (Polyethylene Glycol)Colace (Docusate Sodium)Senna (Senokot)Dulcolax (Bisacodyl)MelatoninUnisom (Doxylamine)Diclegis (Doxylamine + B6)Zofran (Ondansetron)Reglan (Metoclopramide)Zoloft (Sertraline)Prozac (Fluoxetine)Lexapro (Escitalopram)Wellbutrin (Bupropion)Xanax (Alprazolam)Ativan (Lorazepam)Klonopin (Clonazepam)Adderall (Amphetamine)Ambien (Zolpidem)AmoxicillinAzithromycin (Z-pack)Cipro (Ciprofloxacin)Keflex (Cephalexin)Flagyl (Metronidazole)Diflucan (Fluconazole)Monistat (Miconazole)Tamiflu (Oseltamivir)Flu Vaccine (Inactivated)Tdap VaccineMMR VaccineLevothyroxine (Synthroid)MethimazoleInsulinMetforminGlyburideLisinopril (ACE Inhibitor)Losartan (ARB)LabetalolMethyldopaStatins (Lipitor, Crestor)Birth Control Pills (taken while pregnant)Plan B (Levonorgestrel)Misoprostol (Cytotec)MethotrexateAccutane (Isotretinoin)Retin-A / Tretinoin (Topical)Benzoyl PeroxideSalicylic Acid (Topical)Hydrocortisone (Topical)Triamcinolone (Topical)Prednisone (Oral)Albuterol (Inhaler)Flonase (Fluticasone Nasal)Nasacort (Triamcinolone Nasal)Singulair (Montelukast)Folic AcidPrenatal VitaminsIron Supplements (Ferrous Sulfate)Vitamin DOmega-3 / Fish OilBiotinCollagen PowderAshwagandhaSt. John's WortValerianCBD Oil / TinctureMarijuana / CannabisMelatonin SupplementValerian RootMagnesium SupplementVitamin B12Vitamin B6 (Pyridoxine)DexamethasoneHeparin / LovenoxWarfarin (Coumadin)Rh Immune Globulin (RhoGAM)HIV AntiretroviralsHepatitis B VaccineHPV VaccineChickenpox (Varicella) VaccineShingles (Shingrix) VaccineSSRIs (General)SNRIs (Effexor, Cymbalta)Triptans (Imitrex, etc.)Topamax (Topiramate)Valproic Acid (Depakote)Lamotrigine (Lamictal)Levonorgestrel IUD (Mirena, Skyla)Paxil (Paroxetine)

Other pregnancy safety lookups

Or visit the Pregnancy Safety Guide to search across all 460+ lookups.