provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content
HomeWell-beingDiet and Nutrition

4 Food and Drinks to Avoid While Taking Sulfamethoxazole / trimethoprim (Bactrim)

Brian Clista, MDChristine Giordano, MD
Written by Brian Clista, MD | Reviewed by Christine Giordano, MD
Published on June 18, 2024

Key takeaways:

  • Sulfamethoxazole / trimethoprim (Bactrim) is an antibiotic that can be used to treat infections of the urinary tract, skin, lung, and gut. 

  • Bactrim can cause side effects like upset stomach and diarrhea. Avoid spicy, acidic, and greasy foods while taking Bactrim as they may increase your risk of these side effects. 

  • Bactrim can interact with alcohol. It’s best to avoid drinking alcohol while taking Bactrim. 

Access savings on related medications

A woman shops for fresh vegetables in the produce aisle.
Goodboy Picture Company/E+ via Getty Images

Bactrim is an antibiotic often used to treat urinary tract infections (UTIs). It’s also used to treat infections of the skin, lung, and gut. Bactrim is actually a combination of two medications:  sulfamethoxazole and trimethoprim. It works by interfering with the DNA and protein production that bacteria use to grow. 

Bactrim can cause an upset stomach, so limiting foods that can irritate the stomach may make taking this antibiotic easier. That said, there aren’t many foods you need to avoid when taking Bactrim. Let’s look at some of the foods to avoid or limit while on Bactrim. 

1. Acidic foods

Most people like a glass of orange juice in the morning or enjoy a good slice of pizza. But some antibiotics don’t work as well when taken with acidic foods. So do you need to give them up when taking Bactrim? 

SPECIAL OFFER

Save over 40% on Qsymia with GoodRx

Discover the once daily Qsymia for weight management. Qsymia is for adults and children 12-17 in combination with a healthy diet and regular exercise.

Woman going for a run at sunset
Igor Alecsander/E+ via Getty Images Plus

Not necessarily. Bactrim is absorbed rapidly in the gut. This means that unlike some other antibiotics, Bactrim is easily digested regardless of what you drink or eat with it. So there aren’t any foods to avoid while taking Bactrim to make sure the medication works properly. 

But you may want to limit certain foods to reduce the risk of side effects. Bactrim can cause nausea or vomiting. If eating acidic foods bothers your stomach, avoid them while taking Bactrim.    

2. Alcohol

It’s never a great idea to drink alcohol when you’re taking antibiotics. Most antibiotics, including Bactrim, can cause nausea or diarrhea. Adding alcohol to the mix can worsen that side effect.    

In addition, Bactrim may interfere with how the body processes alcohol, leading to high levels of acetaldehyde in the blood. This can lead to a serious condition called a disulfiram-like reaction

Signs of a disulfiram-like reaction include:

  • Sweating

  • Flushing

  • Fast heart rate

  • Nausea and vomiting

Fortunately, the risk of this reaction may be lower than once thought. A recent review found only weak evidence to support the link between Bactrim, alcohol, and the disulfiram-like reaction. But most healthcare professionals still advise people to avoid alcohol while taking Bactrim.     

3. Bananas and other potassium-rich foods

Potassium is an electrolyte that helps move fluid into and out of our cells, and maintains our blood pressure. Too much potassium, called hyperkalemia, can be dangerous.

The trimethoprim component of Bactrim interferes with how the kidney eliminates potassium. That can raise potassium levels in the blood. For most people taking Bactrim, this won’t cause any problems. However if you have underlying kidney disease or take other medicines that also raise potassium levels, it could lead to an unsafe rise in potassium. 

Avoid taking in extra potassium by limiting high-potassium foods like:

  • Apricots

  • Avocados

  • Bananas

  • Beans

  • Beets

  • Leafy greens like spinach and kale

  • Sweet potatoes

Talk with your healthcare professional if you have kidney problems or take medications that increase your potassium before starting Bactrim.

4. Caffeine

Food and drinks with caffeine don’t interact strongly with Bactrim. But that doesn’t necessarily mean that you should drink a lot of caffeine when you’re taking Bactrim. 

Caffeine has a diuretic effect. That means you produce more urine after drinking it. 

Moderate consumption of caffeine doesn’t cause dehydration. So most people can still enjoy their usual tea or coffee drinks while taking Bactrim. But if you’re dehydrated because you have a fever and you aren’t eating much, then you should focus on noncaffeinated drinks to help you stay hydrated

What else can you do to make it easier to take sulfamethoxazole / trimethoprim (Bactrim)?

Apart from avoiding or limiting certain foods and drinks, there are other things you can do to make it easier to take Bactrim and reduce the risk of side effects.

  • Take Bactrim with food. Taking Bactrim with a meal or snack may reduce your risk of an upset stomach. If you do feel nauseated, try eating small, frequent meals. Pick bland, starchy foods like toast, crackers, and applesauce. 

  • Stay hydrated. Bactrim should be taken with a full glass of water. Rarely, people taking Bactrim can develop crystals in the urine. Staying hydrated reduces the risk of injury to the kidney. 

  • Eat foods to support a healthy gut. Any antibiotic, including Bactrim, can upset the stomach by killing off good bacteria. Eating probiotic foods like apple cider vinegar, yogurt, and pickled vegetables can help restore healthy bacteria in the gut. And prebiotics like whole grains, fruits, and legumes provide fuel that help that good bacteria grow. 

  • Avoid foods that upset your stomach. If Bactrim upsets your stomach, it’s best to stay away from foods that can worsen that side effect. For many people, that means limiting spicy or greasy foods.

The bottom line

There aren’t many foods to avoid while taking Bactrim. Bactrim is absorbed very quickly, so you don’t have to worry about foods and drinks making Bactrim less effective. However, like many antibiotics, Bactrim can cause nausea and vomiting. Reduce your chance of getting an upset stomach by avoiding acidic or spicy foods. Some people drinking alcohol while on Bactrim developed serious side effects — but this is rare. Most healthcare professionals advise people to avoid alcohol while on Bactrim.  

why trust our exports reliability shield

Why trust our experts?

Brian Clista, MD
Written by:
Brian Clista, MD
Dr. Clista is a board-certified pediatrician who works in private practice in Pittsburgh, Pennsylvania. He previously served as a National Health Service Corporation Scholar in the inner city of Pittsburgh for 11 years.
Patricia Pinto-Garcia, MD, MPH
Patricia Pinto-Garcia, MD, MPH, is a medical editor at GoodRx. She is a licensed, board-certified pediatrician with more than a decade of experience in academic medicine.
Christine Giordano, MD
Christine Giordano, MD, is board-certified in general internal medicine. She received her medical degree from Rutgers New Jersey Medical School and completed residency at Thomas Jefferson University.

References

Dietary Guidelines for Americans. (2019). Food sources of potassium

Eumedica Pharmaceuticals GmbH. (2023). Bactrim tablets, sulfamethoxazole and trimethoprim [package insert]

View All References (7)

Kemnic, T. R., et al. (2022). Trimethoprim sulfamethoxazole. StatPearls

Kesimli, B., et al. (2003). An interaction of caffeine and sulfamethoxazole: Studied by IR spectroscopy and PM3 method. Journal of Molecular Structure

Mergenhagen, K. A., et al. (2020). Fact versus fiction: A review of the evidence behind alcohol and antibiotic interactions. Antimicrobial Agents and Chemotherapy

Mohamed, N., et al. (2019). Clinically important and pharmacologically relevant drug interactions with alcohol. American Journal of Research in Medical Sciences

Mutual Pharmaceutical Company, Inc. (2013). Bactrim sulfamethoxazole and trimethoprim DS (double strength) tablets and tablets USP [package insert]

Singh, P., et al. (2016). Nausea: A review of pathophysiology and therapeutics. Therapeutic Advances in Gastroenterology

Velazquez, H., et al. (1993). Renal mechanism of trimethoprim-induced hyperkalemia. Annals of Internal Medicine.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Your Guide to Sustainable Weight Loss

Our 6-day newsletter series breaks down the latest medications and how you can achieve sustainable weight loss.

By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.