Skip to main content
Medically Approved

Are there foods to avoid while taking Bactrim?

twitter share buttonfacebook share buttonlinkedin share buttonemail article button
Foods to avoidFoods to tryOther medicationsSummary
Foods and drinks to avoid while taking Bactrim include alcohol and foods high in potassium. In general, Bactrim does not have major food interactions. 
Medically reviewed by Alyssa Walton, PharmD
Written by Cathy Lovering
Updated on

Bactrim is a brand-name antibiotic. It kills bacteria in the body that causes illness. It’s available in a generic version called sulfamethoxazole/trimethoprim.

Some foods and beverages, like alcohol, can interact with certain antibiotics, reducing their efficacy or creating a risk of toxicity. With Bactrim, the risk of interaction is small unless you have specific medical conditions. 

Foods to avoid while taking Bactrim 

Different types of glasses with wine in them arranged on a pink background.
Viktor Solomin/Stocksy United

You can continue with your regular diet while taking Bactrim, and you can take it with or without food. However, if you experience an upset stomach, you may want to start taking the medication with food. 

It’s important to drink plenty of water while taking Bactrim (sulfamethoxazole/trimethoprim). This is because it may increase the risk of crystalluria, which is crystals forming in your urine. If these crystals clump together, they can form kidney stones.

Common side effects of Bactrim include:

  • nausea
  • vomiting
  • loss of appetite

Although your doctor may not advise you to change your diet, you may want to avoid or limit some foods and beverages to help prevent these and other side effects.

Let’s look at some of these in more detail.

Need a diagnosis or prescription quickly? Optum Perks offers personalized on-demand care in as little as 15 minutes. For $29, answer a few questions online and receive a diagnosis and treatment plan from a US-licensed healthcare professional. Get started here.

Man on phone in bed

100% online care

Treatment plans in 15 minutes or less for 40+ conditions.

Start consult now

Alcohol 

Many antibiotics come with a warning to avoid alcohol. The evidence regarding not taking Bactrim with alcohol is uncertain.

A 2020 review of studies looked at how alcohol affects the efficacy of specific antibiotics. The review also assessed whether alcohol created a toxic interaction or otherwise affected how the drug worked.

According to the review, some antibiotics have a negative interaction with alcohol. These include the following:

It’s important to avoid alcohol if you take any of these antibiotics.

However, the evidence around alcohol and Bactrim, in particular, is unclear. According to limited research, alcohol might cause facial flushing when consumed while taking Bactrim. 

Some people also experience indigestion if they consume too many alcoholic beverages. Because Bactrim may increase the risk of an upset stomach, you may want to avoid drinking alcohol if you’re concerned about indigestion or other digestive issues. 

Potassium-rich foods

Bactrim may increase the risk of developing hyperkalemia (high potassium) if you have a condition that affects how your body uses potassium or if you have weakened kidney function.

Bactrim can also raise the risk of hyperkalemia if you take angiotensin converting enzyme (ACE) inhibitors while you’re taking Bactrim. ACE inhibitors can also raise blood potassium levels. Talk with your doctor about the risks of Bactrim if you take ACE inhibitors such as:

If you’re at risk for hyperkalemia, ask your doctor whether you should limit high potassium foods while taking Bactrim. 

High potassium foods include:

  • lima beans
  • baked potatoes
  • yams
  • spinach
  • carrot juice

Foods that may upset your stomach 

Because Bactrim can cause digestive issues like nausea, vomiting, and loss of appetite, you might want to avoid taking it alongside foods that may also upset your stomach.

Some common foods that can lead to an upset stomach include:

  • caffeinated or fizzy beverages
  • spicy, fatty, or greasy foods
  • acidic foods like tomatoes or oranges

Foods not on this list can also cause digestive issues. If you know that certain foods can upset your stomach, try to avoid them while you’re taking Bactrim.

Pill bottle with text 'Starts at $4'

Free prescription coupons

Seriously … free. Explore prices that beat the competition 70% of the time.

Get free card

Foods to try 

Antibiotics like Bactrim can kill some of the good bacteria in the gut while killing the bad bacteria causing illness. Eating foods that contain good bacteria can help balance your gut.

Probiotics are foods that contain good bacteria. Prebiotic foods don’t contain good bacteria but have complex carbohydrates that help the good bacteria to grow in your gut. 

Probiotic foods include:

  • yogurt
  • kimchi
  • kefir
  • buttermilk
  • tempeh
  • pickles

Prebiotic foods include:

  • asparagus
  • whole grains
  • onions
  • garlic
  • soybeans

Download the free Optum Perks Discount Card to save up to 80% on many prescription medications. Plus, you can now get them delivered to your home in as little as 3 days. Search for your medication here.

Other medications 

If you’d prefer not to take Bactrim, your doctor can recommend a different type of antibiotic.

Alternatives to Bactrim depend on the condition you need to treat. Some examples include antibiotics in other classes, such as:

  • Penicillin antibiotics: One example is amoxicillin (Amoxil), which you can take with or without food. You can add another liquid, like milk or fruit juice, to the suspension version. You can continue your usual diet.
  • Cephalosporin antibiotics: An example is cephalexin (Keflex), which you can take with or without food. You can continue your usual diet.
  • Macrolide antibiotics: One example is azithromycin (Zithromax) in tablet form, which you can take with or without food. Azithromycin is also available as a suspension (Zmax), which you need to take on an empty stomach. If you take an antacid, ask a doctor or pharmacist how long to wait after the antacid for your azithromycin dose. You can continue your usual diet. 

A doctor might recommend a different antibiotic or other treatment not on this list as an alternative to Bactrim. 

Summary

Bactrim (trimethoprim/sulfamethoxazole) is an antibiotic that’s prescribed to treat many infections and conditions, including urinary tract infections (UTIs), chronic bronchitis, and pneumonia. 

It’s generally safe to take Bactrim with or without food. However, experts recommend drinking plenty of water while taking this medication to help reduce the risk of kidney stones. You may also want to avoid alcohol. If you have kidney disease or are taking ACE inhibitors, you may want to avoid foods that are high in potassium.

Prebiotic and probiotic foods can help restore healthy gut bacteria after you’ve finished your course of antibiotics. 

If you’re at risk for high potassium, talk with your doctor about whether Bactrim is safe for you.

Article resources