Compare Bactrim vs. Keflex

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

ADVERTISEMENT
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.

3.6/ 5 average rating with 473 reviewsforBactrim
Treats bacterial infections.

Keflex (cephalexin) is good for treating many bacterial infections, and is available as a generic.

3.7/ 5 average rating with 686 reviewsforKeflex
Upsides
  • Widely available as a generic product and in a variety of formulations (tablet, capsule, suspension).
  • Works well to treat many types of bacterial infections
  • 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.
Downsides
  • 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
  • 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.
ADVERTISEMENT
Used for
Dosage forms
  • Pill
  • Liquid
  • Pill
  • Liquid
Price
Want to save even more money?
Sign up now for a 30-day trial and save up to 95% at CVS, Kroger, Albertsons, and other pharmacies.
Learn more
Reviews
473 reviews so far
59%
saidit'sworth it
49%
saiditworked well
22%
saidit'sa big hassle

Have you used Bactrim (sulfamethoxazole / trimethoprim)?

Leave a review
686 reviews so far
64%
saidit'sworth it
48%
saiditworked well
14%
saidit'sa big hassle

Have you used Keflex (cephalexin)?

Leave a review
Side effects
The Bactrim (sulfamethoxazole / trimethoprim) FDA package insert doesn’t have numbers about how common side effects are.
The Keflex (cephalexin) FDA package insert doesn’t have numbers about how common side effects are.
Risks and risk factors
  • Diarrhea
  • Sunburn
  • Rash
  • Harm to fetus
  • Lower kidney function
    • Elderly
    • Taking other medicines that lower kidney function
See more detailed risks and warnings
  • Diarrhea
  • New infections while taking Keflex (cephalexin)
    • Weakened immune system
    • Not taking Keflex (cephalexin) correctly
  • Allergic reaction
    • History of penicillin or cephalosporin allergies
See more detailed risks and warnings