Compare Keflex vs. Bactrim

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

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
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
Upsides
  • 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
  • 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
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.
Reviews
686 reviews so far
64%
saidit'sworth it
48%
saiditworked well
14%
saidit'sa big hassle

Have you used Keflex (cephalexin)?

Leave a review
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
Side effects
The Keflex (cephalexin) FDA package insert doesn’t have numbers about how common side effects are.
The Bactrim (sulfamethoxazole / trimethoprim) FDA package insert doesn’t have numbers about how common side effects are.
Risks and risk factors
  • 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
  • Diarrhea
  • Sunburn
  • Rash
  • Harm to fetus
  • Lower kidney function
    • Elderly
    • Taking other medicines that lower kidney function
See more detailed risks and warnings