Compare Keflex vs. Bactrim

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

Keflex
(Cephalexin)

Bactrim
(Sulfamethoxazole / Trimethoprim)

Kills bacteria. Keflex (Cephalexin) is good for treating many bacterial infections and is available as generic. However, if you are on medications to thin your blood, you can be more likely to bleed.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. Also, it can cause birth defects, so talk to your doctor if you're pregnant.
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.
Reviews & ratings
Button Group. All currently active
Button Group. All currently active
5.0662739322533135Keflex
Reviews for Keflex (Cephalexin)
63%
of people say Keflex (Cephalexin) is worth it
48%
say it works well
14%
say it's a big hassle
Reviews for Bactrim (Sulfamethoxazole / Trimethoprim)
59%
4% vs. Keflex (Cephalexin)
50%
+2% vs. Keflex (Cephalexin)
22%
8% vs. Keflex (Cephalexin)
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 by preventing them from making proteins and other chemicals that keep them alive.
Type of medication
KeflexBactrim
Antibiotic
Cephalosporin
Prescription only
Antibiotic
Sulfonamide
Prescription only
Available as
KeflexBactrim
  • Pill
  • Powder for oral suspension
  • Pill
  • Liquid
Used for (click to learn more)
KeflexBactrim
Risk factors for serious side effects
KeflexBactrim
    Detailed Keflex (Cephalexin) risks & warnings »
            Detailed Bactrim (Sulfamethoxazole / Trimethoprim) risks & warnings »
            Pregnancy category
            KeflexBactrim
            BFDA pregnancy category (Probably safe)

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

            See the FDA package insert
            DFDA pregnancy category (Weigh risks vs. benefits)

            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.

            See the FDA package insert
            Alcohol
            No specific alcohol-related info.No specific alcohol-related info.
            Food
            • Can be taken with or without food.
            No specific food-related info.
            Kidneys and liver
            No specific kidneys and liver-related info.No specific kidneys and liver-related info.
            Sex
            No specific sex-related info.No specific sex-related info.
            Sleep
            No specific sleep-related info.No specific sleep-related info.
            Weight
            No specific weight-related info.No specific weight-related info.
            Upsides and benefits
            KeflexBactrim
            • Available in different forms: tablet, capsule, and suspension.
            • Less resistance seen in bacteria to this antibiotic. Your doctor may run tests to see which antibiotics will kill the bacteria causing your infection.
            • Can be taken with or without food.
            • Available in generic.
            • Used to treat many types of bacterial infections.
            • Available in different forms: tablet, capsule and suspension.
            • Less resistance seen to this antibiotic. Your doctor may run tests to see if Bactrim responds to your infection.
            • Available in generic.
            • Used to treat many types of bacterial infections.
            Downsides and risks
            KeflexBactrim
            • If you're on blood thinners (anticoagulants), talk to your doctor, it may make you more likely to bleed.
            • If you have to take any live vaccines, talk to your doctor. You may have to postpone it.
            • Can cause diarrhea.
            • Makes your skin more sensitive to the sun.
            • Has to be taken with plenty of liquids.
            • May cause birth defects.
            • Can cause diarrhea.
            Tips from our pharmacists for people taking the medication
            KeflexBactrim
            • Take this medication exactly as your doctor tells you to.
            • Store the suspension in the refrigerator. All other forms can be kept at room temperature.
            • Space out vitamins by a couple hours if you're taking this medication.
            • Take this medication exactly how your doctor tells you to.
            • Can make your skin more sensitive to the sun.
            • Drink plenty of liquids when taking the medication.
            • Can cause diarrhea, nausea or vomiting.
            • Can cause rash.
            Learn more
            More about KeflexSide effectsReviews & ratingsAlternativesFDA package insert
            More about BactrimSide effectsReviews & ratingsAlternativesFDA package insert