What it is and how it works
Trimethoprim-sulfamethoxazole is a prescription medicine that combines two antibiotics. Sulfamethoxazole is the sulfonamide, or “sulfa,” part. The two medicines block different steps bacteria use to make and use folate, which they need to grow. You may see the ingredients in the opposite order on your label, as sulfamethoxazole/trimethoprim. Co-trimoxazole is another name for this combination. TMP-SMX is a common abbreviation for trimethoprim-sulfamethoxazole. [1][2][20]
The medicine comes as tablets and as an oral liquid. Tablets marked DS are double strength. They contain more of both ingredients than standard-strength tablets, so check with your pharmacist if the strength on your label differs from what you expected. [1][2][8]
What it's used for
Sulfamethoxazole and trimethoprim can treat some UTIs when the bacteria causing the infection are likely to respond to it. A urine culture, when one is done, can help the prescriber decide whether to keep you on this antibiotic or switch to another one. If your symptoms get worse or fail to improve, call the clinician treating you. [1][2]
Other uses include some bacterial flare-ups of chronic bronchitis in adults and certain causes of infectious diarrhea. It can also be prescribed for selected middle ear infections in children. When an antibiotic is needed for a middle ear infection, amoxicillin is usually the first choice if it is suitable. This medicine can also treat or prevent a lung infection called Pneumocystis pneumonia in people who need that protection, such as some people with weakened immune systems. [1][2][18]
This antibiotic won’t help a cold, the flu, or another viral infection. Use this antibiotic only when it was prescribed for you for your current infection. Do not take leftover antibiotics, use someone else’s prescription, or share your medicine. [1][2][19]
How to take it
Take the medicine exactly as directed on your prescription label. Follow the scheduled times and take it for the prescribed course, even if you feel better before it ends. If you develop a rash or another sign of a serious reaction, follow the safety advice below. If the instructions are unclear, ask your pharmacist to go over the schedule with you. [1][2][3]
- Food and water. You can take it with or without food. Try taking it with food if it upsets your stomach. Take it with a full glass of water and drink plenty of fluids during treatment. This helps prevent crystals from forming in your urine. If you have a fluid limit, ask your clinician how to follow it while taking this medicine. [1][2][3]
- Liquid medicine. Shake the bottle well before each use. Measure it with a marked oral syringe or other medicine-measuring device. A kitchen spoon can give you the wrong amount. Follow the storage directions on your bottle. The Sulfatrim label says to store the liquid at room temperature and protect it from light. [5][8]
- Sun exposure. This medicine can make your skin more sensitive to sunlight. Limit prolonged sun exposure and use sunscreen, protective clothing, and sunglasses when outdoors. [2]
If nausea or vomiting is making it hard to take the medicine, call your doctor or pharmacist. They can help you work out what to do if you’re having trouble keeping it down. [2][3]
If you miss a dose
Take the missed dose when you remember. If it’s almost time for your next dose, skip the missed dose and return to your usual schedule. Do not take two doses at once or take an extra dose to make up for the missed one. If you’re unsure how to get back on schedule, ask your pharmacist. [2][3]
Side effects
| Common | Serious - get help |
|---|---|
| Nausea. [1][2] | A new rash, especially one that spreads, hurts, blisters, or peels. [1][6] |
| Vomiting. [1][2] | Call 911 right away for trouble breathing, sudden swelling of the lips, mouth, tongue, or throat, or fainting with signs of an allergic reaction. Use your prescribed epinephrine right away if you have it. [7][13] |
| Loss of appetite. [1][2] | Watery or bloody diarrhea, with or without cramps or fever. [1][2][9] |
| Unusual bruising or bleeding, or yellow skin or eyes. [1][3] | |
| Muscle weakness or an irregular heartbeat, which can be signs of high potassium. [1][3] |
A new rash needs prompt attention. Stop taking the medicine and call your prescriber right away, even if the rash looks mild. Stevens-Johnson syndrome (SJS) is a rare, serious skin reaction that can start with fever or a sore throat. A painful rash, blisters, peeling skin, or sores around the mouth or eyes can follow. [1][6]
Get urgent care: Call 911 right away for trouble breathing, sudden swelling of the lips, mouth, tongue, or throat, or fainting with signs of an allergic reaction. Use your prescribed epinephrine right away if you have it. [7][13] Go to the emergency department right away if a rash is painful or spreads quickly, or if you develop blisters, peeling skin, or sores in your mouth or eyes. [6]
Diarrhea can start after treatment ends. Antibiotics can allow a germ called C. diff to grow in the gut and cause diarrhea. Call your doctor right away if you develop watery or bloody diarrhea while taking this medicine or after you finish it. Mention that you recently took an antibiotic, especially if you also have belly cramps or fever. [1][2][9]
Potassium can rise. The trimethoprim in this medicine can raise the potassium level in your blood. The risk is higher if you have kidney problems or take another medicine that raises potassium. Your doctor may order a blood test to check it. Get medical help promptly if you develop new muscle weakness or an irregular heartbeat. [1][3]
Interactions
Tell your prescriber and pharmacist about the prescription medicines, over-the-counter medicines, vitamins, and supplements you take. Some combinations require a blood test or a change in treatment. [1][2]
| Medicine or substance | Verdict | What to know |
|---|---|---|
| Alcohol | Caution | Skipping alcohol during treatment is a reasonable precaution. Flushing, headache, nausea, and a racing heartbeat have been reported after drinking alcohol with this medicine. The evidence that the combination caused these symptoms is limited. [4][17] |
| Birth control pills | OK | This antibiotic itself does not usually require backup contraception. If you vomit or have diarrhea, check the instructions for your specific pill or ask a pharmacist promptly. You may need backup contraception, and if you recently had sex without a condom, ask whether emergency contraception is appropriate. [10][11] |
| Warfarin | Ask first | The antibiotic can increase warfarin’s effect and raise bleeding risk. Your clinician may need to recheck your INR, a blood test that measures how quickly your blood clots. [1][3] |
| ACE inhibitors such as lisinopril | Avoid | The combination can cause dangerously high potassium. Contact your prescriber before starting this antibiotic so they can review your treatment. Keep taking your regular medicines as prescribed unless your clinician tells you to change them. [1] |
| Spironolactone | Avoid | Taking these together can cause dangerously high potassium. Contact your prescriber before starting this antibiotic so they can review your treatment. [1][12] |
| Dofetilide | Avoid | The combination can cause a dangerous heart rhythm. Contact your prescriber or pharmacist before taking this antibiotic. [1] |
| Methotrexate | Avoid | This antibiotic can increase the risk of methotrexate side effects. Contact your prescriber before taking them together. [1] |
| Phenytoin | Ask first | The antibiotic can slow how quickly your body clears this seizure medicine. Your clinician may need to check its blood level. [1][2] |
If you take warfarin, contact the clinician who manages it when you’re prescribed this antibiotic so they can decide when to check your INR. Get medical help right away for unusual bleeding, such as blood in your urine or black, tarry stools. [1][3]
Who should not take it / allergy
Do not take this medicine if you have a confirmed allergy to trimethoprim or a sulfonamide antibiotic such as sulfamethoxazole. If you were told you have a “sulfa allergy” and are unsure which medicine caused it, contact your prescriber or pharmacist before taking a dose. Tell them what you remember about the reaction. [1][2]
Do not take this medicine if trimethoprim or a sulfonamide antibiotic previously caused an immune reaction that lowered your platelet count. If you’re unsure why your platelets dropped, check with your prescriber before taking a dose. Other reasons to avoid it include certain types of anemia caused by low folate, marked liver damage, or severe kidney disease when kidney function can’t be monitored. It should not be given to infants younger than 2 months. [1]
If you’re pregnant or planning a pregnancy, contact your prescriber before starting this medicine. It may increase the risk of birth defects when taken early in pregnancy. For certain UTIs, your clinician may still prescribe it in the first trimester if no suitable alternative is available. [1][14][15]
If you’re breastfeeding, tell your prescriber if your baby is a newborn, was born prematurely, is ill or jaundiced, or has G6PD deficiency. Your clinician may recommend another antibiotic. Avoid this medicine while breastfeeding a baby with G6PD deficiency. [1][16]
Tell your prescriber before starting if you have kidney or liver disease or G6PD deficiency. Kidney disease may require a different dose or blood tests. This medicine can cause red blood cells to break down in people with G6PD deficiency. Older adults, especially those with kidney or liver problems or who take interacting medicines, may be more likely to have serious side effects. [1]
Frequently asked questions
Can I drink alcohol on Bactrim?
Skipping alcohol during treatment is a reasonable precaution. Flushing, headache, nausea, and a racing heartbeat have been reported after drinking alcohol with this medicine. The evidence that the combination caused these symptoms is limited. [4][17]
What does DS mean on sulfamethoxazole/trimethoprim?
DS stands for double strength. A DS tablet has more sulfamethoxazole and more trimethoprim than a standard-strength tablet. Follow your prescription label and ask your pharmacist if the tablet strength is unclear. [1][8]
Can I take trimethoprim-sulfamethoxazole for a UTI?
Yes, if it was prescribed for your UTI. It works against some of the bacteria that cause UTIs. If your clinician orders a urine culture, the result can help them decide whether this is the right antibiotic for you. [1][2]
Can I take Bactrim if I have a sulfa allergy?
Do not take Bactrim if you have a confirmed allergy to trimethoprim or a sulfonamide antibiotic such as sulfamethoxazole. If you were told you have a “sulfa allergy” and are unsure which medicine caused it, contact your prescriber or pharmacist before taking a dose. Tell them what you remember about the reaction. [1][2]
Should I stop taking Bactrim if I get a rash?
Yes. Stop taking it and call your prescriber right away. [1] Call 911 right away for trouble breathing, sudden swelling of the lips, mouth, tongue, or throat, or fainting with signs of an allergic reaction. Use your prescribed epinephrine right away if you have it. [7][13] Go to the emergency department right away if a rash is painful or spreads quickly, or if you develop blisters, peeling skin, or sores in your mouth or eyes. [6]
Sources
- Bactrim and Bactrim DS tablets prescribing information. DailyMed. https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=f59d0c04-9c66-4d53-a0e1-cb55570deb62
- Co-trimoxazole. MedlinePlus. https://medlineplus.gov/druginfo/meds/a684026.html
- Sulfamethoxazole and Trimethoprim. Memorial Sloan Kettering Cancer Center. https://www.mskcc.org/cancer-care/patient-education/medications/adult/sulfamethoxazole-and-trimethoprim
- Antibiotics and alcohol. Mayo Clinic. https://www.mayoclinic.org/healthy-lifestyle/consumer-health/expert-answers/antibiotics-and-alcohol/faq-20057946
- Sulfatrim oral suspension prescribing information. DailyMed. https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=cd4932ce-0856-4e99-8baf-70afce1d7ffd
- Stevens-Johnson syndrome. NHS. https://www.nhs.uk/conditions/stevens-johnson-syndrome/
- Anaphylaxis. NHS. https://www.nhs.uk/conditions/anaphylaxis/
- Sulfamethoxazole and trimethoprim (oral route). Mayo Clinic. https://www.mayoclinic.org/drugs-supplements/sulfamethoxazole-and-trimethoprim-oral-route/description/drg-20071899
- About C. diff. CDC. https://www.cdc.gov/c-diff/about/
- Appendix A: Summary of Classifications for U.S. Medical Eligibility Criteria for Contraceptive Use, 2024. CDC. https://www.cdc.gov/contraception/hcp/usspr/classifications-mec-contraception.html
- U.S. Selected Practice Recommendations for Contraceptive Use, 2024. CDC. https://www.cdc.gov/mmwr/volumes/73/rr/rr7303a1.htm
- Trimethoprim-sulfamethoxazole and risk of sudden death among patients taking spironolactone. CMAJ. https://pmc.ncbi.nlm.nih.gov/articles/PMC4347789/
- Anaphylaxis. MedlinePlus Medical Encyclopedia. https://medlineplus.gov/ency/article/000844.htm
- Urinary Tract Infections in Pregnant Individuals. American College of Obstetricians and Gynecologists. https://www.acog.org/clinical/clinical-guidance/clinical-consensus/articles/2023/08/urinary-tract-infections-in-pregnant-individuals
- First-Trimester Antibiotic Use for Urinary Tract Infection and Risk of Congenital Malformations. JAMA Network Open. https://pmc.ncbi.nlm.nih.gov/articles/PMC12242685/
- Trimethoprim-Sulfamethoxazole. Drugs and Lactation Database (LactMed). https://www.ncbi.nlm.nih.gov/books/NBK501289/
- Disulfiram-cotrimoxazole reaction. PubMed. https://pubmed.ncbi.nlm.nih.gov/9692665/
- Outpatient Clinical Care for Pediatric Populations. CDC. https://www.cdc.gov/antibiotic-use/hcp/clinical-care/pediatric-outpatient.html
- Healthy Habits: Antibiotic Do’s and Don’ts. CDC. https://www.cdc.gov/antibiotic-use/about/
- IDSA 2025 Guideline Update on Complicated Urinary Tract Infections. Infectious Diseases Society of America. https://www.idsociety.org/practice-guideline/complicated-urinary-tract-infections/
This guide is general information written from the sources listed above and checked in November 2026. It does not replace advice from your own doctor, dentist or pharmacist.
