Bactrim (sulfamethoxazole/trimethoprim) is a prescription drug used to treat or help prevent certain infections in adults and some children, including urinary tract infections (UTIs). Bactrim can cause side effects such as nausea and diarrhea.

Note: Bactrim is available as a regular-strength oral tablet and a double-strength oral tablet (called Bactrim DS). This article will generally use the term “Bactrim” to refer to both strengths of the drug unless otherwise noted.

Some people may experience mild to serious side effects during their Bactrim treatment. Examples of the drug’s commonly reported side effects include:

Mild side effects have been reported with Bactrim. These include:

In most cases, these side effects should be temporary. And some may be easily managed. But if you have symptoms that are ongoing or bothersome, talk with your doctor or pharmacist. And do not stop taking Bactrim unless your doctor recommends it.

Bactrim may cause mild side effects other than those listed above. See the drug’s prescribing information for details.

Serious side effects have been reported with Bactrim. These include:

If you develop serious side effects while taking Bactrim, call your doctor right away. If the side effects seem life threatening or you think you’re having a medical emergency, immediately call 911 or your local emergency number.

Note: After the Food and Drug Administration (FDA) approves a drug, it tracks and reviews side effects of the medication. If you’d like to notify the FDA about a side effect you’ve had with Bactrim, visit MedWatch.

* To learn more about this side effect, see the “Side effects explained” section below.

Allergic reaction

For some people, Bactrim can cause an allergic reaction.

This side effect was commonly reported in the drug’s studies.

In general, symptoms of allergic reaction can be mild or serious. You can learn more about possible symptoms in this article.

What might help

If you have mild symptoms of an allergic reaction, such as a mild rash, call your doctor right away. They may suggest a treatment to manage your symptoms and can determine whether you should keep taking Bactrim.

If you have symptoms of a severe allergic reaction, such as swelling or trouble breathing, call 911 or your local emergency number right away. These symptoms could be life threatening and require immediate medical care.

If your doctor confirms you’ve had a serious allergic reaction to Bactrim, they may have you switch to a different treatment.

Get answers to some frequently asked questions about Bactrim’s side effects.

Are older adults more likely to have side effects with Bactrim?

It’s unknown. There isn’t enough information from studies to determine whether older adults may have a higher risk of side effects from Bactrim.

But older adults — particularly those with certain conditions, such as kidney disease or liver disease — may have a higher risk of severe side effects. In studies, examples of severe side effects in older adults taking Bactrim included severe skin reactions and high potassium levels.

How long do Bactrim’s side effects last? Does it cause any long-term side effects?

The length of time that Bactrim’s side effects last can vary. Some side effects can go away within a few days. Others, including nausea, can last throughout your Bactrim treatment.

Bactrim is usually taken for 5 to 14 days, and the drug can stay in your system for 2 to 3 days after your last dose. This can be a longer period if you have kidney problems. But typically, most side effects should go away once you finish taking Bactrim or within a few days after your last dose.

It’s possible to develop long-term side effects from Bactrim. For example, diarrhea caused by Clostridioides difficile (C. diff) was a long-term side effect reported in studies of Bactrim. In some cases, this side effect can last for weeks or months after you stop taking Bactrim.

Talk with your doctor to learn more about possible side effects of Bactrim and how long they may last.

Are there any foods I should avoid while taking Bactrim to help prevent side effects?

No. There are currently no reports of Bactrim interacting with food. But some people may have food sensitivities or allergies that can worsen certain side effects of Bactrim, such as abdominal pain. In that case, you may want to avoid the foods that worsen these side effects for you.

If you have other questions about eating certain foods during your treatment with Bactrim, talk with your doctor.

Learn more about some of the side effects Bactrim may cause.

Tinnitus

Tinnitus (ringing in the ears) was a serious side effect reported in studies of Bactrim. Tinnitus may also cause you to hear certain sounds besides ringing, such as:

  • buzzing
  • clicking
  • hissing

What might help

If you experience tinnitus during your Bactrim treatment, avoiding loud noises or wearing ear protection can help manage it. For example, noise-canceling devices can help dull the ringing in your ears.

If you have tinnitus during your Bactrim treatment, talk with your doctor. They can recommend ways to manage this side effect.

Severe skin reaction

Severe and life threatening skin reactions were reported in studies of Bactrim. These include Stevens-Johnson syndrome and another type of skin reaction known as DRESS syndrome.

A severe skin reaction may cause symptoms such as:

  • skin rash
  • skin peeling or blistering
  • painful and discolored skin patches

What might help

If you develop symptoms of a severe skin reaction, talk with your doctor right away. They will likely stop your Bactrim treatment and prescribe another medication for the infection.

Keeping track of side effects

During your Bactrim treatment, consider taking notes on any side effects you’re having. You can then share this information with your doctor. This is especially helpful when you first start taking a new drug or using a combination of treatments.

Your side effect notes can include things such as:

  • what dose of the drug you were taking when you had the side effect
  • how soon you had the side effect after starting that dose
  • what your symptoms were
  • how your symptoms affected your daily activities
  • what other medications you were taking
  • any other information you feel is important

Keeping notes and sharing them with your doctor will help them learn more about how Bactrim affects you. They can then use this information to adjust your treatment plan if needed.

Below is important information you should consider before taking Bactrim.

Warnings

Bactrim can sometimes cause harmful effects in people who have certain conditions. This is known as a drug-condition interaction. Other factors may also affect whether Bactrim is a good treatment option for you.

Talk with your doctor about your health history before you take Bactrim. Be sure to tell them if any of the following factors apply to you:

Disclaimer: Healthline has made every effort to make certain that all information is factually correct, comprehensive, and up to date. However, this article should not be used as a substitute for the knowledge and expertise of a licensed healthcare professional. You should always consult your doctor or another healthcare professional before taking any medication. The drug information contained herein is subject to change and is not intended to cover all possible uses, directions, precautions, warnings, drug interactions, allergic reactions, or adverse effects. The absence of warnings or other information for a given drug does not indicate that the drug or drug combination is safe, effective, or appropriate for all patients or all specific uses.