Cephalexin is a common antibiotic that's used to treat many different bacterial infections including urinary tract infections (UTIs), ear infections, and sinus infections, to name a few. Cephalexin is a cephalosporin antibiotic that kills bacteria to fight the infection. It's safe to use in people over the age of 1, and it's typically taken by mouth 2 to 4 times per day. This medication is available as a lower-cost generic capsule, tablet, and suspension; the brand name Keflex is no longer available. Side effects can include nausea, vomiting, and diarrhea.
Skin infections
Bone infections
Urinary tract infections (UTIs)
Reproductive system infections
Cephalexin is a cephalosporin antibiotic. It kills bacteria by preventing the bacteria from making a covering around themselves for protection.
Source: DailyMed
Side effects that you should report to your care team as soon as possible:
Side effects that usually do not require medical attention (report to your care team if they continue or are bothersome):
Treats several common types of bacterial infections
Can use for adults and children over the age of 1
Available as a liquid for people who have trouble swallowing pills
Available as a lower-cost generic
Usually need to take a few times per day
Might not be able to take if you're allergic to penicillins or other cephalosporin antibiotics
Not recommended for the cold or flu (these are viral illnesses, not bacterial infections)
Take cephalexin exactly as prescribed. Make sure to finish your treatment course, even if you're feeling better. Stopping the medication earlier than prescribed can make your infection come back and become harder to treat.
You can take cephalexin with or without food. Taking the medication with food can help if it's upsetting your stomach.
If you're taking the cephalexin tablet or capsule, don't crush or chew it. This could damage the medication. Ask your prescriber to switch you to the cephalexin oral suspension (liquid) if you're having trouble swallowing pills.
Cephalexin can cause diarrhea, but it should go away when you stop taking it. Contact your healthcare team right away if you start to have watery or bloody diarrhea, fever, fatigue, or stomach cramps anytime during treatment or after stopping cephalexin. These might be signs of a type of infectious diarrhea, which needs to be treated right away.
Get medical attention as soon as possible if you have a rash, itchy skin, difficulty breathing, or swelling in your face or mouth. These could be signs of a severe allergic reaction.
Cephalexin is generally considered safe to take while pregnant. Based on available information in humans, this antibiotic doesn't appear to cause harm to unborn babies during pregnancy. Let your primary care provider or the urgent care team know that you're pregnant and discuss the risks and benefits of taking cephalexin.
Cephalexin is considered a safe antibiotic to take while breastfeeding. Low levels of the medication can be found in breast milk, but it's not expected to harm your baby. Tell the prescriber that you're nursing and discuss the risks and benefits of using cephalexin.
For the cephalexin oral suspension (liquid)
Shake the cephalexin oral suspension bottle well before measuring out the dose.
Make sure to only use a medication dose cup or syringe from the pharmacy to measure out your cephalexin dose. Don't use household spoons because they aren't accurate and might cause you to take the wrong dose. Ask the pharmacy for extras.
Store the cephalexin suspension in the refrigerator for up to 14 days. After 14 days, throw away the bottle, even if there's still some medication left.
Cephalexin can cause some serious health issues. This risk may be even higher for certain groups. If this worries you, talk to your doctor or pharmacist about other options.
Risk factors: Allergy to penicillin or other cephalosporin antibiotics
Allergic reactions to cephalexin are possible, including rash, hives, or more seriously, life-threatening reactions like facial swelling and anaphylaxis (closing of the throat). Let your healthcare team know if you have an allergy to antibiotics, especially penicillin or other cephalosporin antibiotics. Get medical attention immediately if you notice rash, hives, red skin, swelling of the lips or tongue, or difficulty breathing after you take cephalexin.
Antibiotics, including cephalexin, raise your risk of getting infected with a bacteria called Clostridioides difficile (C. diff). Antibiotics change the amount of normal bacteria in your stomach and intestines. This can cause C. diff to overgrow in your gut and lead to an infection. And C. diff infection can cause diarrhea that can sometimes be life-threatening.
It's important to recognize the difference between diarrhea as a side effect of cephalexin and this type of infectious diarrhea. C. diff-related diarrhea can cause rapid heart rate, foul-smelling diarrhea, fever, nausea, and frequent bowel movements (even up to 15 times per day) and is an emergency. Get medical attention right away if you experience any of these symptoms so you can get tested for C. diff infection and get appropriate treatment.
Take cephalexin exactly as prescribed. Using cephalexin for any shorter or longer periods of time or taking the antibiotic for other illnesses can raise your risk for developing infections caused by drug-resistant bacteria. This raises your risk for severe and life-threatening infections that might be difficult to treat.
Risk factors: Kidney problems | Taking high doses of cephalexin
Cephalexin might raise your risk of seizures, especially when the antibiotic is used at doses that are too high. You also might be at risk for seizures if you have kidney problems and the dose of cephalexin wasn't appropriately lowered to adjust for the fact that your kidneys can't help get rid of the medication from your body as well. Discuss with your primary care provider or the urgent care team if you've had a seizure before or if you have kidney problems to make sure cephalexin is safe for you.
Risk factors: Kidney problems | Liver problems | Poor nutrition | Taking blood-thinning medications
Cephalexin might raise your risk of bleeding. You're at a higher risk if you have kidney problems, liver problems, or poor nutrition or if you're taking an anticoagulant (blood thinner). Discuss your risk for bleeding with your primary care provider or the urgent care team, and watch out for signs of too much bleeding (e.g., unexplained bruising, blood in your urine or stool). If you're taking a blood-thinning medication, the prescriber might recommend that you follow up with the specialist who's monitoring your blood-thinning medication for blood testing or dose adjustments.
Cephalexin is available as capsules, tablets, and liquid suspensions.
Adults and children 15 years of age or older: The typical dose is 250 mg by mouth every 6 hours. An alternative dose is 500 mg by mouth every 12 hours. You'll typically need to take cephalexin for 7 to 14 days. For more severe infections, you might need a higher dose (up to 4 grams total per day).
Children age 1 to up to 15 years: The dose is based on your child's body weight. The typical total daily dose is 25 mg/kg to 50 mg/kg of body weight by mouth. This total dose is split up into smaller doses throughout the day, as directed by the prescriber. Your child will typically need to take cephalexin for 7 to 14 days. For more severe infections, such as an ear infection, your child might need a higher dose of up to 100 mg/kg per day.
Your dose might differ if you have kidney problems.
Severe allergy to other cephalosporin antibiotics or to beta-lactam antibiotics
Skin infections
Bone infections
Urinary tract infections (UTIs)
Reproductive system infections
Urinary tract infections (bladder infections)
Skin infections
Throat infections (strep throat)
Tonsil infections (tonsillitis)
Lung infections related to long-term bronchitis
Skin infections
By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.
American Health Packaging. (2023). Cephalexin capsule [package insert]. DailyMed.
Centers for Disease Control and Prevention. (2020). Spoons are for soup, milliliters are for medicine.
Centers for Disease Control and Prevention. (2022). Pharyngitis (strep throat).
Chaudhry, S. B., et al. (2019). Cephalosporins: A focus on side chains and β-lactam cross-reactivity. Pharmacy: A Journal of Pharmacy Education and Practice.
Drugs and Lactation Database (LactMed). (2021). Cephalexin. National Institute of Child Health and Human Development.
Lupin Pharmaceuticals, Inc. (2022). Cephalexin for suspension [package insert]. DailyMed.
McFarland, L.V., et al. (2016). Comparison of pediatric and adult antibiotic-associated diarrhea and Clostridium difficile infections. World Journal of Gastroenterology.
National Institute for Health and Clinical Excellence (NICE). (2008). Respiratory tract infections - antibiotic prescribing: Prescribing of antibiotics for self-limiting respiratory tract infections in adults and children in primary care.
Pandey, N., et al. (2023). Beta lactam antibiotics. StatPearls.
Teva Pharmaceuticals USA, Inc. (2020). Cephalexin tablet [package insert]. DailyMed.
Research prescriptions and over-the-counter medications from A to Z, compare drug prices, and start saving.