Skip to main content


Generic name: sulfamethoxazole and trimethoprimSUL-fa-meth-OX-a-zole-and-trye-METH-oh-prim ]
Brand names: Bactrim, Bactrim DS
Drug class: Sulfonamides

Medically reviewed by Philip Thornton, DipPharm. Last updated on Aug 15, 2023.

What is Bactrim?

Bactrim contains a combination of sulfamethoxazole and trimethoprim. Sulfamethoxazole and trimethoprim are are both antibiotics that treat different types of infection caused by bacteria.

Bactrim is a prescription medicine used to treat ear infections, urinary tract infections, bronchitis, traveler's diarrhea, shigellosis, and Pneumocystis jiroveci pneumonia.

To help reduce the development of drug-resistant bacteria and maintain the effectiveness of Bactrim, this medicine should be used only to treat infections that are proven, or strongly suspected, to be caused by susceptible bacteria.


You should not use Bactrim if you have severe liver disease, kidney disease that is not being monitored, anemia caused by folic acid deficiency, if you take dofetilide, or if you have had low platelets caused by using trimethoprim or a sulfa drug.

You should not take Bactrim if you are pregnant or breastfeeding.

Use Bactrim only as directed. Tell your doctor if you use other medicines or have other medical conditions or allergies.

Before taking this medicine

You should not use Bactrim if you are allergic to sulfamethoxazole or trimethoprim, or if you have:

  • severe liver disease;

  • kidney disease that is not being treated or monitored;

  • anemia (low red blood cells) caused by folic acid deficiency;

  • a history of low blood platelets after taking trimethoprim or any sulfa drug; or

  • if you take dofetilide.

Sulfamethoxazole and trimethoprim may cause birth defects. Do not use Bactrim if you are pregnant. Tell your doctor if you become pregnant.

Do not breastfeed.

Bactrim should not be given to a child younger than 2 months old.

To make sure you can safely take Bactrim, tell your doctor if you have ever had:

  • kidney or liver disease;

  • a folate (folic acid) deficiency;

  • asthma or severe allergies;

  • HIV or AIDS;

  • a thyroid disorder;

  • malnourishment;

  • alcoholism;

  • an electrolyte imbalance (such as low blood sodium or high potassium);

  • porphyria, or glucose-6-phosphate dehydrogenase (G6PD) deficiency; or

  • if you use a blood thinner (such as warfarin) and you have routine "INR" or prothrombin time tests.

How should I use Bactrim?

Take Bactrim exactly as prescribed by your doctor. Follow all directions on your prescription label and read all medication guides or instruction sheets.

Drink plenty of fluids to prevent kidney stones.

Antibiotic medicines can cause diarrhea. Tell your doctor if you have diarrhea that is watery or bloody.

Keep using Bactrim even if your symptoms quickly improve. Skipping doses could make your infection resistant to medication. Bactrim will not treat a viral infection (flu or a common cold).

You may need blood and urine tests, and this medicine may be stopped based on the results.

Store Bactrim at room temperature away from moisture, heat, and light. Do not refrigerate.

What happens if I miss a dose?

Use the medicine as soon as you can, but skip the missed dose if it is almost time for your next dose. Do not use two doses at one time.

What happens if I overdose?

Seek emergency medical attention or call the Poison Help line at 1-800-222-1222.

Overdose symptoms may include loss of appetite, vomiting, fever, blood in your urine, yellowing of your skin or eyes, confusion, or loss of consciousness.

What should I avoid while using Bactrim?

Bactrim could make you sunburn more easily. Avoid sunlight or tanning beds. Wear protective clothing and use sunscreen (SPF 30 or higher) when you are outdoors.

Bactrim side effects

Get emergency medical help if you have signs of an allergic reaction to Bactrim (hives, cough, chest pain, shortness of breath, swelling in your face or throat) or a severe skin reaction (fever, sore throat, burning eyes, skin pain, red or purple skin rash with blistering and peeling).

Seek medical treatment if you have a serious drug reaction that can affect many parts of your body. Symptoms may include: skin rash, fever, swollen glands, joint pain, muscle aches, severe weakness, pale skin, unusual bruising, or yellowing of your skin or eyes.

Call your doctor at once if you have:

  • severe stomach pain, diarrhea that is watery or bloody (even if it occurs months after your last dose);

  • any skin rash, no matter how mild;

  • yellowing of your skin or eyes;

  • a seizure;

  • new or unusual joint pain;

  • increased or decreased urination;

  • swelling, bruising, or irritation around the IV needle;

  • increased thirst, dry mouth, fruity breath odor;

  • new or worsening cough, fever, trouble breathing;

  • high blood potassium - nausea, weakness, tingly feeling, chest pain, irregular heartbeats, loss of movement;

  • low blood sodium - headache, confusion, problems with thinking or memory, weakness, feeling unsteady; or

  • low blood cell counts - fever, chills, mouth sores, skin sores, easy bruising, unusual bleeding, pale skin, cold hands and feet, feeling light-headed or short of breath.

Common Bactrim side effects may include:

  • nausea, vomiting, loss of appetite; or

  • skin rash.

This is not a complete list of side effects and others may occur. Call your doctor for medical advice about side effects. You may report side effects to FDA at 1-800-FDA-1088.

What other drugs will affect Bactrim?

You may need more frequent check-ups or medical tests if you also use medicine to treat depression, diabetes, seizures, or HIV.

Tell your doctor about all your current medicines. Many drugs can interact with sulfamethoxazole and trimethoprim, especially:

This list is not complete and many other drugs may interact with sulfamethoxazole and trimethoprim. This includes prescription and over-the-counter medicines, vitamins, and herbal products. Not all possible drug interactions are listed here.

Popular FAQ

Yes, Bactrim DS contains sulfamethoxazole and trimethoprim. It is in no way related to Penicillin. It is safe to take if you are allergic to Penicillin.

Bactrim DS is an antibiotic and belongs to a drug class called sulfonamides.

Yes, Bactrim is commonly used to treat UTIs. The usual adult dosage of Bactrim DS is 1 tablet every 12 hours, or 2 Bactrim tablets every 12 hours. The length of treatment may vary from 3 days to 14 days. Bactrim may also be prescribed to children over 2 months old, and the dosage is based on the child’s weight. Symptom relief is often seen within 3 days of starting treatment.

Bactrim stays in your system for about 2 days after a dose is taken. This amount will vary from person to person and depends on many different factors, including:

  • How well a drug is distributed throughout your body
  • Age
  • Diet
  • Weight
  • Certain medical conditions, such as kidney disease
  • If other medicines are being taken at the same time

Bactrim is made up of two drugs: sulfamethoxazole and trimethoprim. It belongs to the class of medications known as sulfonamide antibiotics. Bactrim stops the growth of certain types of bacteria that cause infections. It blocks two steps in the production of proteins and nucleic acids that bacteria need to survive.

People with a sulfa allergy typically need to avoid sulfonamide antibiotics (antibiotics containing sulfa), including:

  • Septra and Bactrim (sulfamethoxazole-trimethoprim)
  • Pediazole (erythromycin-sulfisoxazole)

Whether other nonantibiotic sulfa-containing drugs need to be avoided with sulfa allergy is unclear and considered on a case-by-case basis. Continue reading

Headache is a common side effect with Bactrim (sulfamethoxazole / trimethoprim) and may occur in up to 10% of patients. Low blood sugar, low sodium blood levels and rarely, aseptic meningitis are other side effects of Bactrim that may lead to a headache. Continue reading

More FAQ

View more FAQ

Further information

Remember, keep this and all other medicines out of the reach of children, never share your medicines with others, and use Bactrim only for the indication prescribed.

Always consult your healthcare provider to ensure the information displayed on this page applies to your personal circumstances.