What are the contraindications for cotrimoxazole (trimethoprim‑sulfamethoxazole)?

Medical Advisory BoardAll articles are reviewed for accuracy by our Medical Advisory Board
Educational purpose only • Exercise caution as content is pending human review
Article Review Status
Submitted
Under Review
Approved

Last updated: February 15, 2026View editorial policy

Personalize

Help us tailor your experience

Which best describes you? Your choice helps us use language that's most understandable for you.

Contraindications to Cotrimoxazole (Trimethoprim-Sulfamethoxazole)

Cotrimoxazole is absolutely contraindicated in patients with known hypersensitivity to trimethoprim or sulfonamides, documented megaloblastic anemia due to folate deficiency, pregnancy, nursing mothers, infants under 2 months of age, marked hepatic damage, and severe renal insufficiency when renal function cannot be monitored. 1

Absolute Contraindications

Hypersensitivity Reactions

  • Known allergy to trimethoprim or any sulfonamide compound is an absolute contraindication due to risk of life-threatening reactions 1
  • Patients with prior Stevens-Johnson syndrome or toxic epidermal necrolysis from cotrimoxazole must never receive it again, as these carry mortality rates of approximately 1% and 30% respectively 2
  • Both immediate IgE-mediated reactions and delayed hypersensitivity reactions can occur to either component of the combination 3, 4

Hematologic Contraindications

  • Documented megaloblastic anemia due to folate deficiency is an absolute contraindication 1
  • The antifolate effects of both trimethoprim and sulfamethoxazole can worsen existing folate deficiency states 1

Age-Related Contraindications

  • Infants less than 2 months of age must not receive cotrimoxazole due to risk of kernicterus from sulfonamide displacement of bilirubin from albumin 1

Pregnancy and Lactation

  • All pregnant patients are contraindicated from receiving cotrimoxazole because sulfonamides cross the placenta 1
  • All nursing mothers must avoid cotrimoxazole as sulfonamides are excreted in breast milk and may cause kernicterus in the infant 1
  • The American College of Obstetricians and Gynecologists specifically recommends avoiding use at term 5

Hepatic and Renal Contraindications

  • Marked hepatic damage is an absolute contraindication 1
  • Severe renal insufficiency when renal function status cannot be monitored is contraindicated 1
  • This reflects the need for dose adjustment in renal impairment and the risk of accumulation leading to toxicity 1

Special Population Considerations

G6PD Deficiency

  • Patients with glucose-6-phosphate dehydrogenase (G6PD) deficiency should not receive cotrimoxazole due to risk of hemolytic anemia 5
  • This is particularly important as G6PD deficiency may be undiagnosed in certain ethnic populations 5

Drug Interaction Contraindications

  • Concurrent use with methotrexate at treatment doses should be avoided due to severe bone marrow suppression risk from combined antifolate effects 5, 6
  • Lower prophylactic doses of methotrexate are generally tolerated but require careful monitoring 5

High-Risk Situations Requiring Extreme Caution

HIV-Positive Patients

  • While not an absolute contraindication, HIV-positive patients experience hypersensitivity reactions in up to 60% of cases compared to 5% in HIV-negative patients 7
  • Risk factors include history of syphilis, higher total plasma protein concentration, and paradoxically higher CD4:CD8 ratios 7
  • Despite high reaction rates, cotrimoxazole may still be used in HIV patients for specific indications like PCP prophylaxis when benefits outweigh risks 7, 5

Patients with History of Severe Drug Reactions

  • The American Academy of Pediatrics notes that rare severe allergic reactions, particularly Stevens-Johnson syndrome, make cotrimoxazole undesirable when alternative treatments exist 8
  • Cotrimoxazole ranks in the upper third of drugs causing Lyell's syndrome (toxic epidermal necrolysis) based on German epidemiological data 2

Critical Monitoring Requirements When Contraindications Are Relative

When cotrimoxazole must be used despite relative contraindications:

  • Baseline complete blood count and monthly monitoring for hematologic toxicity, particularly thrombocytopenia 5
  • Serum potassium monitoring at baseline, 1-2 weeks after initiation, and every 4 months, especially in patients on ACE inhibitors or ARBs 6
  • Immediate discontinuation if any rash develops given the risk of progression to Stevens-Johnson syndrome or toxic epidermal necrolysis 6

References

Research

Skin reactions to co-trimoxazole.

Infection, 1987

Guideline

Maximum Daily Dosing of Septrin (Trimethoprim-Sulfamethoxazole)

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2026

Guideline

Drug Interaction Between Bactrim DS and Paromomycin

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Guideline Directed Topic Overview

Dr.Oracle Medical Advisory Board & Editors, 2025

Guideline

Adverse Reactions to Bactrim

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Related Questions

What is the diagnosis for a 2-year-old boy with a history of recurrent skin infections, including a perianal abscess and lymphadenitis, presenting with a painful, indurated, fluctuant mass on his right arm, with abnormal dihydrorhodamine flow cytometry and culture growth of Serratia marcescens?
What is the likely diagnosis for a 4-month-old boy with persistent fever, cough, and shortness of breath, who has multifocal pneumonia with cavitation and cultures positive for Nocardia, a filamentous, gram-positive rod, suggesting immunodeficiency?
Are there interactions between Cipralex (escitalopram) and Septra DS (sulfamethoxazole and trimethoprim)?
What is the recommended dosing for Bactrim (trimethoprim/sulfamethoxazole) in patients with bacterial infections and impaired renal function?
Can an 8-year-old female weighing 57 pounds take one Septra (trimethoprim/sulfamethoxazole) tablet twice daily?
Why is diabetes mellitus a risk factor for endometrial carcinoma in women, especially postmenopausal or obese patients?
What is the recommended protocol for managing hyperthyroidism, including initial beta‑blocker therapy, antithyroid drugs, treatment of thyroid storm, monitoring, and definitive therapy options?
What is the appropriate management of nausea and early satiety during refeeding in a patient with anorexia nervosa when dimenhydrinate (Gravol) should be avoided?
Is it safe to use topical retinol on the face of a patient with atopic dermatitis?
What is the appropriate acute and long‑term management for an adult with type 2 diabetes presenting with a random blood glucose of about 600 mg/dL (severe uncontrolled hyperglycemia, possible hyperosmolar hyperglycemic state)?
What are the common causes of vaginal spotting in the first trimester of pregnancy?

Professional Medical Disclaimer

This information is intended for healthcare professionals. Any medical decision-making should rely on clinical judgment and independently verified information. The content provided herein does not replace professional discretion and should be considered supplementary to established clinical guidelines. Healthcare providers should verify all information against primary literature and current practice standards before application in patient care. Dr.Oracle assumes no liability for clinical decisions based on this content.

Have a follow-up question?

Our Medical A.I. is used by practicing medical doctors at top research institutions around the world. Ask any follow up question and get world-class guideline-backed answers instantly.