What Foods to Avoid While Taking Bactrim?

Bactrim is a commonly prescribed antibiotic that treats a range of bacterial infections. Like most antibiotics, it can be taken with food to help prevent an upset stomach or other gastrointestinal problems. However, what you eat can also cause some complications. 

Alcohol is the most important thing to avoid when taking Bactrim, and this includes alcohol used in your food. However, some people may also need to avoid potassium-rich foods. 

Continue reading to learn more about Bactrim and the foods to avoid while taking it.

Table of Contents

About Bactrim

Bactrim is the brand name of the antibiotic drug composed of sulfamethoxazole and trimethoprim. These drugs treat bacterial infections by blocking two steps in the production of nucleic acids and proteins needed by bacteria to survive. Individually, sulfamethoxazole and trimethoprim treat different bacterial strains and infections, but when combined, their reach extends, and they can treat more infections than either medication could on its own. 

Some of the bacterial infections which Bactrim is effective against include:

  • Urinary tract infections (UTIs)
  • Ear infections
  • Traveler’s diarrhea
  • Bronchitis
  • Pneumocystis jiroveci pneumonia
  • Shigellosis

There are some side effects associated with Bactrim, with the most common including stomach pain, nausea, and diarrhea, all conditions related to the stomach and gastrointestinal system. As with most antibiotics, the recommendation for easing these symptoms is taking Bactrim with food, but there are some considerations to keep in mind regarding Bactrim and your diet. 

How Can Your Diet Interfere With Bactrim?

Since Bactrim is often taken orally and thus travels through the gastrointestinal system, the foods you eat can affect it since they also travel through the same system. 

For the most part, taking Bactrim with food improves its effectiveness since the active ingredients of Bactrim, sulfamethoxazole and trimethoprim, are better absorbed when taken with food. Better absorption equates to more of the medication in your body and, thus, greater bacteria-fighting power. 

Furthermore, food slows down the absorption process of Bactrim, meaning the medication stays in your body longer and can be more evenly distributed. It isn’t always good that food increases the amount of time a drug stays in your body, which is why some medications must be taken on an empty stomach, but it is safe (and beneficial) with Bactrim. 

Beyond these benefits, though, there can be some negative interactions between Bactrim and certain foods and drinks, and it is crucial to be aware of this so you can avoid these foods throughout your treatment. 

What Foods Should You Avoid Eating While Taking Bactrim?

Most foods are safe to consume while taking Bactrim, so it is often easier to focus instead on the foods and beverages that should be avoided while taking Bactrim. 

There are two areas, in particular, that you want to be aware of. 


The most important thing to avoid while taking Bactrim is alcohol in any form, including alcohol found in foods and beverages. This is because alcohol can cause the side effects of Bactrim to become more severe. The term for the side effects resulting from mixing Bactrim and alcohol is a “disulfiram-like reaction”, and some of the symptoms include warmth or redness of the skin, fast heartbeats, nausea, vomiting, or tingling sensations.

It’s not just alcoholic beverages that you need to watch out for––foods cooked with alcohol can also retain more than you might expect. For example, adding alcohol to a sauce and then removing the sauce from heat can leave 85% of the alcohol content. Even foods baked for 30 minutes still retain 35% of their original alcohol content. So, if you’re on Bactrim, it’s best to avoid cooking with alcohol until you stop taking it. 

Potassium-Rich Foods

While taking Bactrim, it’s also best to avoid potassium-rich foods, especially if you have impaired kidney function. This is because Bactrim may increase potassium levels, and if your kidneys do not function optimally, this can result in too much potassium in your body. 

Some foods high in potassium include:

  • chocolate
  • bananas
  • cooked spinach
  • milk
  • pumpkin
  • potatoes

Check with your doctor to see if you are one of the people who need to avoid these foods while taking Bactrim. 


Is it OK to eat dairy with Bactrim?

While some antibiotics do not interact well with dairy, there have been no reports of adverse interactions between Bactrim and any dairy products. So, it is OK to eat dairy while on Bactrim. 

Can I drink coffee while taking Bactrim?

It is generally considered safe to take Bactrim and drink coffee. However, one thing to be aware of is that coffee can be dehydrating. Since Bactrim passes through the kidneys, too little water can cause kidney stones to develop. Coffee, by dehydrating you, can then contribute to their formation. The best practice is to avoid drinking too much coffee while on Bactrim, but you don’t have to avoid it entirely. 

When to See a Doctor?

If you’re ever feeling under the weather, visit a doctor to discuss your symptoms and receive an antibiotic, if needed. If you’re looking for a convenient way to get an antibiotic prescription, DrHouse can help you out entirely online. Visit with a doctor, discuss your symptoms, and receive your prescription, all through your mobile device. 

If you’re taking Bactrim and experiencing any unpleasant side effects, contact your doctor for tips on managing them. In addition to the common side effects of an upset stomach, Bactrim may also cause more severe side effects such as an allergic reaction, severe skin reaction, or liver problems. If you notice any concerning symptoms that align with these complications, be sure to seek immediate medical attention. 

Key Takeaways

Bactrim is an antibiotic combining trimethoprim and sulfamethoxazole, two drugs that fight bacterial infections. This is an antibiotic that can be taken with or without food, with the first option often helping those who are experiencing an upset stomach from the antibiotic. However, there are some things to be aware of and certain foods to avoid. 

Most importantly, those taking Bactrim should avoid alcohol. Not only does this include alcoholic beverages but also any alcohol used in the cooking process. Even cooking the alcohol can leave a good amount left behind, which can interact with the drug and cause more severe side effects. In addition to avoiding alcohol, those with impaired kidney function might also need to avoid potassium-rich foods and should speak to their doctor about how to safely take Bactrim. 

If you ever have a question about the foods you should avoid while taking an antibiotic, DrHouse can connect you with a doctor in just 15 minutes to answer your questions. 


Content on the DrHouse website is written by our medical content team and reviewed by qualified MDs, PhDs, NPs, and PharmDs. We follow strict content creation guidelines to ensure accurate medical information. However, this content is for informational purposes only and not a substitute for professional medical advice, diagnosis, or treatment. For more information read our medical disclaimer.

Always consult with your physician or other qualified health providers about medical concerns. Never disregard professional medical advice or delay seeking it based on what you read on this website.

If you are experiencing high fever (>103F/39.4C), shortness of breath, difficulty breathing, chest pain, heart palpitations, abnormal bruising, abnormal bleeding, extreme fatigue, dizziness, new weakness or paralysis, difficulty with speech, confusion, extreme pain in any body part, or inability to remain hydrated or keep down fluids or feel you may have any other life-threatening condition, please go to the emergency department or call 911 immediately.



on your schedule

Skip the unnecessary waiting room,
see a board-certified clinician now.

Start an Online Visit
Available in 50 states. No insurance needed.
Screenshot of DrHouse Mobile App: Virtual Doctor Appointment in Progress

Prescriptions as needed
Renew or get a new Rx.

On-demand virtual visits
See a physician 24/7.

24/7 care support
We are here to help you.

  • 1

    Download the DrHouse app.
    Set up your free account in a minute.

  • 2

    Start a visit with an online doctor. Wait time is less than 15 minutes.

  • 3

    Get an Rx from your preferred pharmacy. Pick up a Rx nearby or get it delivered to you.

Download our app
Image of a doctor wearing a white lab coat, representing the DrHouse telehealth service