We’re looking for volunteer reviewers in pharmacy, medicine and pharmacology. How to volunteerWe’re looking for volunteer reviewers.

Sulfamethoxazole and trimethoprim

Sulfamethoxazole and trimethoprim block two steps in a row in how bacteria make folate. These blocks interfere with making the nucleic acids and proteins that many bacteria need. The Bactrim label lists the combination for urinary tract infections, acute otitis media in children, flare-ups of chronic bronchitis in adults, Shigella enteritis and traveler's diarrhea in adults, each caused by susceptible strains of the bacteria it names, and for Pneumocystis jirovecii pneumonia (PCP): treatment of documented PCP, and its prevention in people with weakened immunity who are at higher risk. It lists acute otitis media when a physician judges that the combination offers some advantage over other antimicrobial agents, the bronchitis flare-ups when a physician deems that it could offer some advantage over a single antimicrobial agent, and Shigella enteritis when antibacterial therapy is indicated. It says the combination is not indicated for preventive or prolonged use in otitis media at any age.

Acts on
Bacterial dihydrofolate synthesis, bacterial dihydrofolate reductase
Where
Bacterial folate production
Medicine type
Small molecule
Used for
Infections
Drug class
Antibiotics

Also called Bactrim.

Schematic drawing of how sulfamethoxazole and trimethoprim work: 1, sulfamethoxazole competes with PABA; 2, trimethoprim blocks DHFR; 3, two steps in a row are blocked; 4, less DNA, RNA and protein made.
How sulfamethoxazole and trimethoprim work. Schematic, not to scale. Dihydropteroate synthase outline from a crystal structure. Bacterial DHFR outline from an Escherichia coli structure. License CC BY-NC 4.0.
Key terms in this drawing (5)
DHFR
Dihydrofolate reductase. The enzyme that makes tetrahydrofolic acid from dihydrofolic acid; tetrahydrofolic acid helps make the building blocks of nucleic acids.
DHPS
Dihydropteroate synthase. A key enzyme in the folate pathway of bacteria and some parasites; PABA is one of the two molecules it works on.
DNA
Deoxyribonucleic acid. The molecule that stores genes.
PABA
Para-aminobenzoic acid. A building block bacteria use to make folate.
RNA
Ribonucleic acid. A molecule copied from DNA; messenger RNA carries a gene's instructions.

How it works

  1. Sulfamethoxazole competes with PABA. Sulfamethoxazole inhibits bacterial synthesis of dihydrofolic acid by competing with .1

  2. Trimethoprim blocks DHFR. Trimethoprim binds to and reversibly inhibits dihydrofolate reductase, the enzyme that makes tetrahydrofolic acid from dihydrofolic acid.1

  3. Two steps in a row are blocked. The two medicines block consecutive folate-biosynthesis steps.1

  4. Less DNA, RNA and protein made. These blocks interfere with biosynthesis of nucleic acids and proteins essential to many bacteria.1

For teachers: download this drawing or build a slide deck.

See also

Sources

  1. 1
    Bactrim (sulfamethoxazole and trimethoprim): FDA labelIndications and Usage; Microbiology
  2. 2
    ChEMBL CHEMBL443Target and action classification: Bacterial dihydropteroate synthase inhibitor

Also used for the drawing

The drawing also shows the other sulfonamides and dapsone at the first step, pyrimethamine and cycloguanil at the second, and the same two steps in malaria parasites; for Toxoplasma, the Daraprim label calls pyrimethamine a folic acid antagonist whose action is greatly enhanced with a sulfonamide. These sources support those parts; the steps above come from the sources listed above. The dihydropteroate synthase and bacterial DHFR outlines are traced from the crystal structures below.

  1. 3
    Daraprim (pyrimethamine): FDA labelClinical Pharmacology: Microbiology; Indications and Usage
  2. 4
    Catalysis and sulfa drug resistance in dihydropteroate synthaseYun MK et al., Science 2012 (abstract)
  3. 5
    Amino acids in the dihydrofolate reductase-thymidylate synthase gene of Plasmodium falciparum involved in cycloguanil resistance differ from those involved in pyrimethamine resistanceFoote SJ et al., Proc Natl Acad Sci U S A 1990 (abstract)
  4. 6
    Mutations in Plasmodium falciparum dihydrofolate reductase and dihydropteroate synthase and epidemiologic patterns of pyrimethamine-sulfadoxine use and resistancePlowe CV et al., J Infect Dis 1997 (abstract)
  5. 7
    Dapsone tablets: FDA labelIndications and Usage
  6. 8
    Sulfadiazine tablets: FDA labelIndications and Usage
  7. 9
    Structures and mechanism records: ChEMBL (sulfamethoxazole CHEMBL443, sulfadiazine CHEMBL439, sulfadoxine CHEMBL1539, dapsone CHEMBL1043, trimethoprim CHEMBL22, pyrimethamine CHEMBL36) and PubChem (PABA CID 978, dihydrofolic acid CID 135398604, tetrahydrofolic acid CID 135444742, cycloguanil CID 9049)canonical structures; dapsone's dihydropteroate synthase mechanism record
  8. 10
    Dihydropteroate synthase in complex with DHP-STZPDB 3TYE; Yun, M.K. et al. Science 2012; 335:1110-1114
  9. 11
    Escherichia coli dihydrofolate reductase with trimethoprimPDB 6XG5; Manna, M.S. et al. Nat Commun 2021; 12:2949

Spotted a mistake? Report an error (hello@openmechanism.com). Since launch, every published error we fix is listed on the corrections page.

Notes and limits
  • A schematic teaching drawing: not to scale, not exact structures, binding poses or a complete pathway, and not a guide to dosing, treatment or how a person will respond.
  • The steps are in the order that explains them; one step is said to cause the next only where the source says so.
  • Bacterial selectivity and susceptibility do not imply every microorganism is affected identically.
  • The Bactrim label recommends treating first episodes of uncomplicated urinary tract infections with a single effective antibacterial rather than the combination of sulfamethoxazole and trimethoprim.
  • Where it lists acute otitis media, the Bactrim label says that, to date, there are limited data on the safety of repeated use of the combination in children under two years of age.

All recorded limits are on the evidence page, and notes that apply to every page are on How to read a page. Version 1.0.1, medically reviewed by Daniel Tran, PharmD, on 6 November 2026.

Cite this page

Tran D. Sulfamethoxazole and trimethoprim [Internet]. OpenMechanism; 2026 [updated 2026 Nov 6; cited 2026 Nov 6]. Available from: https://openmechanism.com/medicines/sulfamethoxazole-plus-trimethoprim