What STDs Does Bactrim Treat (And What It Doesn’t)

Bactrim is not a go-to antibiotic for most sexually transmitted infections. The one STD it is specifically recommended for is granuloma inguinale, a rare bacterial infection also called donovanosis. While Bactrim is a powerful antibiotic used for many types of infections (urinary tract infections, certain pneumonias, traveler’s diarrhea), the major STDs like chlamydia, gonorrhea, syphilis, and trichomoniasis all require different antibiotics.

Granuloma Inguinale (Donovanosis)

Granuloma inguinale is caused by a bacterium called Klebsiella granulomatis. It’s uncommon in the United States but occurs more frequently in tropical and subtropical regions, including parts of India, South Africa, Papua New Guinea, and Brazil. The infection causes painless, slowly expanding ulcers on the genitals or around the anus. Left untreated, these ulcers can grow, destroy surrounding tissue, and increase vulnerability to other infections.

The CDC’s STI treatment guidelines list Bactrim as a recommended treatment: one double-strength tablet (160 mg/800 mg) taken twice daily for at least three weeks and continued until all lesions have completely healed. That last part is important. Unlike many antibiotic courses with a fixed end date, treatment for donovanosis continues based on how your body responds. Some people need longer than three weeks if their ulcers are slow to close.

Why Bactrim Doesn’t Work for Most STDs

Bactrim is a combination of two ingredients that work together to block bacteria from making folic acid, a nutrient bacteria need to build DNA and proteins. It disrupts two consecutive steps in that process, making it effective against a wide range of bacteria. But the organisms responsible for the most common STDs either aren’t susceptible to this mechanism or have developed resistance to it.

Gonorrhea is a clear example. Decades ago, sulfonamide drugs (the same class Bactrim belongs to) were used to treat gonorrhea, but the bacteria developed widespread resistance. Today, gonorrhea requires a different class of antibiotics entirely. Chlamydia is caused by an intracellular bacterium that Bactrim doesn’t effectively target. Syphilis is treated with penicillin. Trichomoniasis isn’t even caused by a bacterium; it’s a parasite, so antibiotics like Bactrim have no effect on it.

Why People Confuse Bactrim With STD Treatment

Bactrim is one of the most commonly prescribed antibiotics for urinary tract infections. Because UTI symptoms (burning during urination, frequent urge to urinate, pelvic discomfort) overlap with symptoms of chlamydia, gonorrhea, and other STDs, people sometimes assume that a Bactrim prescription is treating a possible STD. It isn’t. If you’re experiencing urinary symptoms and haven’t been tested for STDs, getting tested is the only way to rule them out, because Bactrim won’t clear a chlamydial or gonococcal infection even if it resolves your UTI symptoms.

Sulfa Allergy and Who Should Avoid Bactrim

Bactrim contains a sulfonamide compound, and sulfa allergies are relatively common. The most typical reaction is a skin rash or hives, sometimes with itching. More serious reactions can include throat swelling, difficulty breathing, fever, and skin blistering. In rare cases, a sulfa allergy can trigger anaphylaxis or a severe skin condition where blisters form on the skin, mouth, or genitals and the skin begins to peel.

Certain groups face higher risk. People living with HIV are more likely to develop a sulfa allergy. Those with a weakened immune system for other reasons also have increased risk. People with G6PD deficiency, a genetic condition affecting red blood cells, can develop hemolytic anemia from sulfa drugs.

Bactrim and Pregnancy

Bactrim carries meaningful risks during pregnancy. Because it interferes with folic acid metabolism, and folic acid is critical for early fetal development, use during the first trimester has been linked in some studies to an increased risk of neural tube defects, heart abnormalities, urinary tract defects, oral clefts, and clubfoot. For this reason, most guidelines recommend against using it in early pregnancy unless no safer alternative exists.

Late pregnancy brings a different concern. The sulfonamide component can displace bilirubin in a newborn’s blood, potentially causing jaundice or a more serious condition called kernicterus. Most experts recommend avoiding Bactrim in the final month of pregnancy as well. If you need treatment for granuloma inguinale while pregnant, your provider will typically choose a different antibiotic.

Getting the Right Treatment for STDs

If you suspect you have an STD, the most important step is getting tested for the specific infection rather than taking an antibiotic that may not match the organism causing your symptoms. STDs are treated with targeted antibiotics chosen for each pathogen: one drug for chlamydia, a different one for gonorrhea, yet another for syphilis. Taking the wrong antibiotic won’t clear the infection, can mask symptoms, and gives the bacteria time to spread to partners or cause complications like pelvic inflammatory disease or infertility.

Bactrim fills a narrow but important role in STD treatment. If you’ve been diagnosed with granuloma inguinale, it’s an effective and well-studied option. For everything else on the STD spectrum, a different antibiotic is what you need.