Compare Keflex vs. Bactrim

Head-to-head comparisons of medication uses, side effects, ratings, and more.

Keflex
(cephalexin)

Bactrim
(sulfamethoxazole / trimethoprim)

Treats bacterial infections. Keflex (cephalexin) is good for treating many bacterial infections, and is available as a generic.Kills bacteria. Bactrim (sulfamethoxazole / trimethoprim) is good for treating many bacterial infections and is available as a generic. However, you can be more likely to sunburn.
Find lowest prices
Powered by GoodRxSave on your next prescription. Be sure you’re getting the lowest price for your medication, even if you have insurance.
Coupons for Keflex
Best available price for 40 (500mg) capsules of cephalexin
Coupons for Bactrim
Best available price for 20 (800mg/160mg) tablets of sulfamethoxazole / trimethoprim
Reviews & ratings
Filter group. All currently selected
Filter group. All currently selected
5.08Keflex
Reviews for Keflex (cephalexin)
64%
of people (All ages) say Keflex (cephalexin) is worth it
48%
say it works well
14%
say it's a big hassle
686 reviews
Have you used Keflex (cephalexin)?
Worth itNot sureNot worth it
Reviews for Bactrim (sulfamethoxazole / trimethoprim)
59%
-5% worse vs. Keflex (cephalexin)
49%
+1% better vs. Keflex (cephalexin)
22%
-8% worse vs. Keflex (cephalexin)
473 reviews
Have you used Bactrim (sulfamethoxazole / trimethoprim)?
Worth itNot sureNot worth it
Side effects
KeflexBactrim

The Keflex FDA package insert doesn’t have numbers about how common side effects are.

More about Keflex side effects »

The Bactrim FDA package insert doesn’t have numbers about how common side effects are.

More about Bactrim side effects »
How it works
KeflexBactrim
Keflex (cephalexin) is an antibiotic. It kills bacteria by preventing them from making their own protective covering.Bactrim (sulfamethoxazole / trimethoprim) is a combination antibiotic that contains sulfamethoxazole and trimethoprim. It kills bacteria.
Type of medication
KeflexBactrim
Prescription only
Prescription only
Available as
KeflexBactrim
  • Pill
  • Liquid
  • Pill
  • Liquid
Used for
KeflexBactrim
Risk factors for serious side effects
KeflexBactrim
  • Weakened immune system
  • Not taking Keflex (cephalexin) correctly
  • History of penicillin or cephalosporin allergies
Detailed Keflex (cephalexin) risks & warnings »
  • Elderly
  • Taking other medicines that lower kidney function
Detailed Bactrim (sulfamethoxazole / trimethoprim) risks & warnings »
Pregnancy

Research studies with animals haven’t found a risk to unborn babies, but it hasn’t been properly studied in humans.

Research studies with real people found harmful effects on unborn babies, but the benefits might outweigh the risks even if you’re pregnant. Talk with your doctor.

Food
KeflexBactrim
  • Can be taken with or without food.
  • Can take with or without food.
No food related info.
Kidneys and liver
KeflexBactrim
No kidneys and liver related info.
  • Bactrim (sulfamethoxazole / trimethoprim) can harm your kidneys, especially if you're taking anti-inflammatory pain relievers like Motrin or Advil or other medicines that also affect your kidneys. Make sure to drink plenty of water or fluids while you're taking Bactrim (sulfamethoxazole / trimethoprim).
Upsides and benefits
KeflexBactrim
  • Available in generic.
  • Available in different forms: tablet, capsule, and suspension.
  • Used to treat many types of bacterial infections.
  • Can be taken with or without food.
  • Generally few side effects compared with other antibiotics.
  • Widely available as a generic product and in a variety of formulations (tablet, capsule, suspension).
  • Works well to treat many types of bacterial infections
Downsides and risks
KeflexBactrim
  • Can cause diarrhea.
  • You may need to take Keflex (cephalexin) 2 to 4 times a day, which can be hard to remember.
  • If you're allergic to penicillins or other antibiotics, you might not be able to take this medicine.
  • Makes you sensitive to the sun.
  • Can upset your stomach
  • Drink plenty of water or fluids to avoid harming your kidneys
  • May cause birth defects
Tips from our pharmacists for people taking the medication
KeflexBactrim
  • Finish all of the medicine your doctor gives you, even if you start to feel better. Stopping it early can cause the bacteria to develop resistance.
  • Store the suspension in the refrigerator. Shake well before using, and discard the bottle after 14 days.
  • Can take with or without food.
  • Take Bactrim (sulfamethoxazole / trimethoprim) exactly the way your doctor tells you.
  • Can make you more sensitive to the sun. Keep out of the sun or wear protection while under the sun.
  • Drink plenty of water or liquids while on Bactrim (sulfamethoxazole / trimethoprim) to avoid harming your kidneys.
  • Can cause upset stomach.
  • Can cause an allergic reaction. Talk to your doctor if you notice skin rash or swelling of your face.
Learn more
More about KeflexSide effectsReviews & ratingsAlternativesFDA package insert
Have you used Keflex (cephalexin)?
Worth itNot sureNot worth it
More about BactrimSide effectsReviews & ratingsAlternativesFDA package insert
Have you used Bactrim (sulfamethoxazole / trimethoprim)?
Worth itNot sureNot worth it