What are the uses of 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 1, 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.

Uses of Cotrimoxazole (Trimethoprim-Sulfamethoxazole)

Cotrimoxazole should be reserved for specific infections where it has proven superiority over single-agent therapy, particularly Pneumocystis jirovecii pneumonia, rather than being used routinely for common bacterial infections where trimethoprim alone is equally effective. 1, 2

FDA-Approved Indications

Cotrimoxazole is approved for the following conditions when caused by susceptible organisms 1:

  • Pneumocystis jirovecii pneumonia (PCP): Both treatment and prophylaxis in immunosuppressed patients at increased risk 1, 3
  • Urinary tract infections: Due to E. coli, Klebsiella, Enterobacter, Morganella morganii, Proteus mirabilis and Proteus vulgaris 1
  • Acute otitis media: In pediatric patients due to Streptococcus pneumoniae or Haemophilus influenzae when offering advantage over other agents 1
  • Acute exacerbations of chronic bronchitis: Due to S. pneumoniae or H. influenzae in adults 1
  • Shigellosis: Enteritis caused by Shigella flexneri and Shigella sonnei 1
  • Traveler's diarrhea: Due to enterotoxigenic E. coli in adults 1, 4

Specific Clinical Scenarios Where Cotrimoxazole is Superior

Pneumocystis jirovecii Pneumonia (Primary Indication)

High-dose cotrimoxazole (TMP 15-20 mg/kg/day plus SMX 75-100 mg/kg/day IV) is the first-line treatment for PCP in immunosuppressed patients, administered for at least 2 weeks. 4, 3

  • Treatment should be initiated immediately after obtaining diagnostic samples, as delay increases mortality 3
  • Dosing is divided every 6-8 hours, with IV route preferred for moderate-to-severe cases 3
  • Clinical improvement typically occurs within 8 days 3, 5
  • Alternative agents (atovaquone, pentamidine, clindamycin-primaquine) are reserved for treatment failure or intolerance 3

Prophylaxis in Immunosuppressed Patients

Cotrimoxazole prophylaxis is indicated in specific high-risk populations 3:

  • Triple immunosuppression: Standard prophylaxis if tolerated 3
  • Double immunosuppression: Especially when one agent is a calcineurin inhibitor 3
  • Liver transplant recipients: For 6-12 months post-transplant 3
  • Patients with prior corticosteroid therapy, organ transplantation, or purine analogue exposure predisposed to PCP 4

Other Proven Indications

Cotrimoxazole has demonstrated superiority in 6, 2:

  • Nocardiosis
  • Toxoplasmosis
  • Brucellosis
  • Stenotrophomonas maltophilia infections
  • Burkholderia infections
  • Listeria monocytogenes
  • Cyclospora and Isospora infections

Granulomatosis with Polyangiitis (Wegener's)

Long-term oral cotrimoxazole plus topical anti-staphylococcal creams are used for nasal manifestations, given the possible etiological role of Staphylococcus aureus 4

Important Limitations and When NOT to Use Cotrimoxazole

Common Bacterial Infections

For uncomplicated urinary tract infections and respiratory tract infections, trimethoprim alone is equally effective and safer than cotrimoxazole. 7, 2

  • Clinical trials show no benefit from the combination over trimethoprim alone for UTIs and respiratory infections 7, 8
  • The sulfonamide component adds unnecessary adverse effects without clinical benefit 7, 2
  • Cure rates are equivalent: trimethoprim alone (90%) vs cotrimoxazole (95%) for UTIs 8

Community-Acquired Pneumonia

Cotrimoxazole is inappropriate for typical community-acquired pneumonia and should never be used as first-line therapy. 5

  • Lacks adequate activity against penicillin-resistant Streptococcus pneumoniae 5
  • Patients with CAP mistakenly started on cotrimoxazole should be switched immediately to amoxicillin-based therapy 5
  • Only appropriate for PCP, not bacterial pneumonia 5

Pediatric Considerations

  • Not indicated for prophylaxis or prolonged administration in otitis media at any age 1
  • Limited safety data for repeated use in children under 2 years 1
  • For non-severe pneumonia in children, amoxicillin is preferred first-line regardless of cotrimoxazole prophylaxis status 4

Critical Safety Concerns

Antibiotic Resistance

Cotrimoxazole prophylaxis significantly increases antibiotic resistance 4:

  • Associated with amoxicillin resistance (concerning as amoxicillin is first-line for infant pneumonia) 4
  • Increases resistance to chloramphenicol, ciprofloxacin, nalidixic acid, and ampicillin 4
  • Resistance among common pathogens to sulfamethoxazole is already high 7

Adverse Effects

The adverse effect profile is a summation of both components 7, 2:

  • Common: Gastrointestinal disturbances and skin rashes (from sulfonamide) 7
  • Serious: Liver disorders, Stevens-Johnson syndrome (more common with combination than trimethoprim alone) 7
  • Microbiome disruption during critical infant developmental periods 4

Contraindications in Specific Populations

Cotrimoxazole is contraindicated in 9:

  • Infants less than 2 months of age (risk of kernicterus)
  • Premature infants
  • Jaundiced infants
  • Infants with G6PD deficiency (risk of hemolytic anemia)
  • During lactation in the above infant populations

Traveler's Diarrhea Context

While cotrimoxazole has proven efficacy for traveler's diarrhea, increasing bacterial resistance is compromising its use 4:

  • Quinolones are currently the empirical antimicrobials of choice for dysentery or identified infectious diarrhea 4
  • Cotrimoxazole remains a second-line option when quinolones are unavailable or contraindicated 4
  • Can be given as a short course (single dose to 2 days) 4

Key Clinical Pitfalls to Avoid

  1. Do not use cotrimoxazole routinely for common UTIs or respiratory infections when trimethoprim alone would suffice 7, 2
  2. Never use for typical community-acquired pneumonia - this is a treatment error requiring immediate correction 5
  3. Do not co-administer with leucovorin during PCP treatment 3
  4. Screen for G6PD deficiency before using in at-risk populations 3, 9
  5. Avoid in HIV-exposed uninfected infants where harms outweigh benefits given low infection rates with modern prevention of mother-to-child transmission 4

References

Research

Limitations of and indications for the use of co-trimoxazole.

Journal of chemotherapy (Florence, Italy), 1994

Guideline

Tratamiento de Neumonía en Pacientes Inmunosuprimidos

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Guideline Directed Topic Overview

Dr.Oracle Medical Advisory Board & Editors, 2025

Guideline

Management of Persistent Pneumonia After Cotrimoxazole Treatment

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2026

Research

Contemporary unconventional clinical use of co-trimoxazole.

Clinical microbiology and infection : the official publication of the European Society of Clinical Microbiology and Infectious Diseases, 2012

Guideline

Safety of Bactrim During Lactation

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

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.