Bactrim is an antibiotic used to treat a wide range of bacterial infections, most commonly urinary tract infections (UTIs), ear infections, bronchitis, traveler’s diarrhea, and certain types of pneumonia. It combines two active ingredients, sulfamethoxazole and trimethoprim, which work together to block bacteria from producing folate, a nutrient they need to grow and multiply. This one-two punch makes Bactrim effective against many common bacteria, and it remains one of the most frequently prescribed antibiotics in the United States.
How Bactrim Works
Most antibiotics attack bacteria through a single mechanism. Bactrim is different because it hits the same bacterial pathway at two separate points. Sulfamethoxazole blocks an early step in folate production, while trimethoprim blocks a later step. By disrupting this process twice, the combination kills bacteria more effectively than either ingredient alone and makes it harder for bacteria to develop resistance.
Bactrim comes in two tablet strengths. The regular-strength tablet contains 400 mg of sulfamethoxazole and 80 mg of trimethoprim. The double-strength (DS) tablet, which is the version most adults are prescribed, contains 800 mg of sulfamethoxazole and 160 mg of trimethoprim.
Urinary Tract Infections
UTIs are one of the most common reasons Bactrim is prescribed. The Infectious Diseases Society of America lists it as an appropriate first-line treatment for uncomplicated bladder infections in women, typically taken twice daily for three days. That short course is one reason it’s a popular choice for straightforward UTIs.
There’s an important caveat, though. Bactrim works well only when the bacteria causing the infection are susceptible to it. Guidelines recommend it for empiric treatment (meaning before lab results come back) only in areas where local resistance rates among UTI-causing bacteria stay below 20%. In some regions, resistance has climbed above that threshold, which means your provider may choose a different antibiotic depending on where you live or send a urine sample to the lab first.
Skin and Soft Tissue Infections, Including MRSA
Bactrim is the most commonly used oral antibiotic for community-acquired MRSA (methicillin-resistant Staphylococcus aureus) infections in the United States. MRSA is a type of staph bacteria that resists many standard antibiotics, but Bactrim remains effective against most community-acquired strains. Lab studies suggest it has stronger bacteria-killing activity against community MRSA than several alternative antibiotics, including clindamycin and minocycline.
If you’ve been diagnosed with an abscess, infected wound, or cellulitis caused by MRSA, Bactrim is often the go-to oral treatment. One limitation: Bactrim may not adequately cover group A strep, a different bacterium that can cause similar-looking skin infections. When the specific bacteria hasn’t been identified yet, your provider may pair Bactrim with another antibiotic to cover both possibilities.
Other Approved Uses
Beyond UTIs and skin infections, Bactrim is approved for several other conditions:
- Acute middle ear infections (otitis media) in children, typically when first-line antibiotics aren’t appropriate.
- Acute flare-ups of chronic bronchitis in adults when bacterial infection is suspected.
- Traveler’s diarrhea caused by certain strains of E. coli.
- Pneumocystis pneumonia (PCP), a serious lung infection that mainly affects people with weakened immune systems, including those with HIV/AIDS. Bactrim is used both to treat and prevent PCP.
- Shigellosis, a bacterial intestinal infection that causes severe diarrhea.
Off-Label Uses
Doctors sometimes prescribe Bactrim for conditions it’s not officially FDA-approved to treat. One of the more common off-label uses is for moderate to severe acne that hasn’t responded to other oral antibiotics. It’s not a first-line acne treatment, but for patients who’ve tried and failed standard options like doxycycline or minocycline, Bactrim can be an effective alternative. It’s also used off-label to prevent certain opportunistic infections in transplant patients and people on immunosuppressive therapy.
Common Side Effects
Most people tolerate Bactrim without major problems. The most frequently reported side effects are nausea, vomiting, and loss of appetite. These are usually mild and resolve once you finish the course. Taking the medication with food and a full glass of water can help reduce stomach upset.
Skin rash is another relatively common reaction. A mild rash doesn’t always mean you need to stop the medication, but any rash that blisters, peels, or involves the inside of your mouth is a red flag. Bactrim belongs to the sulfonamide (sulfa) class of antibiotics, and sulfonamides are one of the drug classes most strongly associated with Stevens-Johnson syndrome and toxic epidermal necrolysis, two rare but serious skin reactions. A 2023 meta-analysis of 38 studies found that sulfonamides were linked to about 32% of all antibiotic-associated cases of these conditions. While the absolute risk to any individual patient is very low, it’s the reason you should pay attention to skin changes while taking this drug.
Who Should Not Take Bactrim
Bactrim is not safe for everyone. It’s contraindicated if you have a known allergy to sulfa drugs or trimethoprim, and it should not be given to infants younger than two months old. People with severe kidney disease, significant liver damage, or a type of anemia caused by folate deficiency also need to avoid it.
If you have a genetic condition called G6PD deficiency (glucose-6-phosphate dehydrogenase deficiency), which affects how your red blood cells handle oxidative stress, Bactrim can trigger a breakdown of red blood cells. G6PD deficiency is more common in people of African, Mediterranean, and Southeast Asian descent, and many people don’t know they have it until a medication like Bactrim causes a reaction.
Bactrim can also raise potassium levels, particularly in older adults or anyone with kidney problems. People taking certain heart medications should let their provider know before starting Bactrim, as the combination can cause dangerous interactions. The elderly, people with chronic alcohol use, and anyone on seizure medications may be at higher risk for folate-related side effects because Bactrim interferes with folate metabolism, and these groups are already more likely to be folate-depleted.
What to Expect During Treatment
For most infections, Bactrim is taken twice a day, and treatment courses range from 3 days for a simple UTI to 14 days or longer for more serious infections. PCP prevention in immunocompromised patients can involve taking it daily or three times a week on an ongoing basis. You’ll want to stay well hydrated while on Bactrim, as adequate fluid intake helps protect your kidneys and reduces the risk of crystal formation in urine.
Bactrim can increase your skin’s sensitivity to sunlight, so sunburn may happen more easily than usual. This is true even on cloudy days or during short periods of exposure. Using sunscreen and limiting direct sun while you’re on the medication is a practical step worth taking.

