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.
Save on related medications
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
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.
Dos and don’t of antibiotics: Hear from physicians about when you should and shouldn’t take an antibiotic.
How does it feel to take Bactrim? People share their thoughts about taking the antibiotic Bactrim (sulfamethoxazole / trimethoprim).
What’s the best antibiotic treatment for UTI? This is how Bactrim and Macrobid compare for treating urinary tract infections (UTIs).
3. Bananas and other potassium-rich foods
Potassium is an important electrolyte. 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. But if you have kidney disease or take other medicines that also raise potassium levels, you may be at risk for developing high potassium levels (hyperkalemia). Hyperkalemia can be dangerous.
Avoid taking in extra potassium by limiting high-potassium foods, such as:
Apricots
Avocados
Bananas
Beans
Beets
Leafy greens like spinach and kale
Sweet potatoes
Read more like this
Explore these related articles, suggested for readers like you.
Talk with your healthcare team 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, which means it can make you pee more often. Normally, 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 instead.
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
Take Bactrim with a full glass of water. Bactrim can cause development of crystals in the urine. These crystals can lead to kidney injury. Staying hydrated reduces the risk of crystal formation.
Eat foods to support a healthy gut
Any antibiotic, including Bactrim, can kill off good gut bacteria. Eating probiotic foods like yogurt and pickled vegetables can help restore healthy bacteria in the gut. Whole grains, fruits, and legumes are a good source of prebiotics. Prebiotics can also help keep your gut microbiome healthy.
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.
Frequently asked questions
Yes, you can eat chocolate while taking Bactrim. Chocolate isn’t a food you need to avoid when taking antibiotics.
Yes, you can eat dairy while taking Bactrim. Opt for dairy products that contain probiotics, like yogurt or kefir. Probiotics can help keep your gut microbiome healthy while you’re taking antibiotics.
Yes, you can eat eggs while taking Bactrim. Eggs are nutrient dense, which makes them a great choice when you are sick and don’t feel like eating much.
Yes, you can eat chocolate while taking Bactrim. Chocolate isn’t a food you need to avoid when taking antibiotics.
Yes, you can eat dairy while taking Bactrim. Opt for dairy products that contain probiotics, like yogurt or kefir. Probiotics can help keep your gut microbiome healthy while you’re taking antibiotics.
Yes, you can eat eggs while taking Bactrim. Eggs are nutrient dense, which makes them a great choice when you are sick and don’t feel like eating much.
The bottom line
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 while taking Bactrim by avoiding acidic or spicy foods. Most healthcare professionals advise people to avoid alcohol while on Bactrim. Drinking alcohol while taking Bactrim can increase the risk of serious side effects — but this is rare.
Why trust our experts?



References
Dietary Guidelines for Americans. (2019). Food sources of potassium.
Eumedica Pharmaceuticals GmbH. (2023). Bactrim tablets, sulfamethoxazole and trimethoprim [package insert].
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.














