Key takeaways:
Sulfamethoxazole / trimethoprim (Bactrim) is an antibiotic that can be used to treat infections of the urinary tract, skin, lungs, and gut.
Bactrim can cause side effects like upset stomach and diarrhea. Avoid spicy, acidic, and greasy foods while taking Bactrim because 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 that can treat several infections from urinary tract infections (UTIs) to skin, lung, and gut infections. 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.
There aren’t any foods you need to avoid while taking Bactrim to make sure the medication works properly. But Bactrim can cause an upset stomach. Limiting foods that can irritate your stomach may help you feel more comfortable while taking this antibiotic. Let’s look at some of the foods and drinks to avoid or limit while taking Bactrim.
1. Acidic foods
Bactrim is absorbed quickly in your gut, so it works well whether you take it with or without food. But it can sometimes irritate your stomach and cause nausea or stomach discomfort. Acidic foods can make this irritation worse, especially if your stomach is already sensitive.
If you notice that acidic foods bother your stomach, it may help to limit them while taking Bactrim.
2. Alcohol
It’s safest to avoid alcohol when you’re taking antibiotics. Most antibiotics, including Bactrim, can cause nausea or diarrhea. Adding alcohol to the mix can worsen those side effects.
Bactrim may also interfere with how your body processes alcohol, which can lead to high levels of acetaldehyde in your blood. This can lead to a serious condition called a disulfiram-like reaction.
Signs of a disulfiram-like reaction include:
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 avoiding alcohol while taking Bactrim.
3. Bananas and other potassium-rich foods
The trimethoprim component of Bactrim can make it harder for your kidneys to remove potassium from your body. This can raise potassium levels in your blood.
For most people taking Bactrim, this won’t cause any problems. But if you have kidney disease or take other medications that also raise potassium levels, you may be at risk for developing high potassium levels (hyperkalemia).
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 before starting Bactrim if you have kidney problems or take medications that increase your potassium levels.
4. Caffeine
Caffeine doesn’t have a strong interaction with Bactrim, so you don’t need to avoid it completely. But it’s not a good idea to increase how much you drink while taking the medication.
Caffeine can make you urinate more often, which may lead to dehydration. For most people, this isn’t enough to cause dehydration. But if you’re already at risk for dehydration because you have a fever or aren’t eating and drinking much, it’s better to focus on other fluids to help 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
Take Bactrim with a full glass of water. In some people, Bactrim can cause crystals to form 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 your gut. Whole grains, fruits, and legumes are a good source of prebiotics, which 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, this 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. Dairy products with probiotics, like yogurt or kefir, 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’re sick and don’t feel like eating much.
Yes, you can take Bactrim on an empty stomach. But keep in mind that Bactrim can cause nausea or an upset stomach. Taking it with food and a full glass of water may help reduce these side effects.
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. Dairy products with probiotics, like yogurt or kefir, 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’re sick and don’t feel like eating much.
Yes, you can take Bactrim on an empty stomach. But keep in mind that Bactrim can cause nausea or an upset stomach. Taking it with food and a full glass of water may help reduce these side effects.
The bottom line
Bactrim is absorbed very quickly, so you don’t have to worry about foods and drinks making it less effective. But like with 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 also recommend avoiding alcohol while taking Bactrim. Drinking alcohol while taking Bactrim can increase your 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.
















