A cephalosporin antibiotic

Cefalexin

A widely used cephalosporin antibiotic for urinary, skin and chest infections — known in the US as cephalexin.

What is Cefalexin?

Cefalexin is a cephalosporin antibiotic used for common bacterial infections, including urinary tract infections, skin and soft-tissue infections, and some chest infections. It is often chosen as a reliable option for everyday infections.

Education and reference only. This is a plain-language guide to Cefalexin — it deliberately contains no doses. Doses depend on the person, the brand and the reason for treatment, and belong with your prescriber. Always check the BNF, the product labelling (SmPC) and follow medical advice.

Class: Cephalosporins → Brands: Keflex
Cefalexin (Cephalosporins) — Meds Global Health reference card with 2D molecular structure
Cefalexin — Cephalosporins. The image shows the active ingredient's 2D molecular structure.

What it is

Cefalexin is a cephalosporin antibiotic used for common bacterial infections, including urinary tract infections, skin and soft-tissue infections, and some chest infections. It is often chosen as an alternative when other first-line antibiotics are not suitable. One point that causes confusion is spelling: in the UK the medicine is spelled cefalexin, while in the US the very same drug is spelled cephalexin — they are identical. A common brand name in both countries is Keflex.

How it works

Cefalexin works by attacking the bacterial cell wall — the protective outer layer that bacteria need to hold their shape and survive. By stopping bacteria from building and repairing this wall, cefalexin causes them to break apart and die. Cephalosporins belong to the same broad family as penicillins (the beta-lactams) and work in a similar way, which is why there is a small degree of overlap in who can take them.

Company & origin

Originated / developed by: Eli Lilly and Company.

Cefalexin (cephalexin), a first-generation oral cephalosporin antibiotic, was introduced in 1967 by Eli Lilly and Company in the United States (marketed as Keflex) and approved by the FDA in 1970.

Practical use

How to take Cefalexin

General, dose-free guidance — always follow your prescriber's and the leaflet's specific instructions.

  • Take it at evenly spaced times and complete the full course, even once you feel better.
  • It can be taken with or without food; taking it with food may ease any stomach upset.
  • Tell your doctor or pharmacist if you have ever had a serious allergic reaction to penicillin or a cephalosporin.
  • Report severe or persistent diarrhoea rather than self-treating it.
  • Finish the whole course and do not keep leftovers for future use.
  • Drink fluids normally and continue any other treatment as advised.

Weighing it up

Advantages & disadvantages of Cefalexin

Advantages

  • Reliable for many common bacterial infections.
  • Can be taken with or without food.
  • Generally well tolerated.
  • A useful option for some people, though those with severe penicillin allergy need careful assessment.

Disadvantages

  • Can cause nausea, diarrhoea and stomach upset.
  • Allergic reactions can occur, and caution is needed with severe penicillin allergy.
  • Overuse contributes to antibiotic resistance.
  • Not effective against viral infections.

Practical use

Good to know

Cefalexin is generally well tolerated and is a useful option for urinary, skin and chest infections. Because cephalosporins are related to penicillins, there is a small chance of cross-reactivity in people with a penicillin allergy — usually only a concern for those who have had a severe (anaphylactic) reaction, so it is important to describe any past reaction accurately. Like most antibiotics, it can upset the gut and sometimes triggers thrush by disturbing the body's normal balance of bacteria and yeast. Finish the full course even once you feel better.

Who should not take it / use with caution

  • People who have had a serious allergic reaction (such as anaphylaxis) to a cephalosporin, or a severe reaction to penicillin.
  • Used with caution in significant kidney impairment, where the approach may be adjusted.
  • Care in people with a history of antibiotic-associated gut infection, and used in pregnancy or breastfeeding when the benefit is judged appropriate.

Monitoring

  • Response of the infection
  • Kidney function where relevant
  • For any allergic reaction or severe/persistent diarrhoea

Side effects

  • Diarrhoea, nausea and tummy upset are the most common effects.
  • Thrush (a yeast overgrowth, e.g. oral or vaginal) from disturbing the body's normal bacteria.
  • Rarely, allergic skin rashes, serious allergic reactions, or serious gut infection (Clostridioides difficile) — seek advice if a rash, severe diarrhoea or swelling occurs.

Key interactions

  • It can increase the effect of warfarin in some people, so any unexpected bruising or bleeding should be reported.
  • Certain medicines (such as probenecid) can raise its levels in the body.
  • As with other antibiotics, gut upset can occasionally reduce the reliability of medicines that depend on a healthy gut — ask your pharmacist if unsure.

Available as: Capsules, tablets and a liquid (suspension) for children and those who cannot swallow tablets or capsules.

Answers

Cefalexin: frequently asked questions

Is cefalexin the same as cephalexin?

Yes — they are exactly the same medicine. "Cefalexin" is the UK (and current international) spelling, while "cephalexin" is the spelling used in the US. If you see either name, including on US packaging or older UK labels, it is the identical antibiotic.

Can I take cefalexin if I am allergic to penicillin?

Cephalosporins are related to penicillins, so there is a small chance of cross-reaction. For most people with a mild penicillin allergy it can still be used safely, but it is usually avoided if you have had a severe (anaphylactic) reaction to penicillin. Describe your past reaction accurately so the right decision is made.

What is it used for?

Cefalexin is commonly used for urinary tract infections, skin and soft-tissue infections, and some chest infections, often as an alternative when a first-line antibiotic is not suitable. Your prescriber chooses it based on the likely bacteria and your individual circumstances.

Why has it given me thrush?

Antibiotics like cefalexin clear harmful bacteria but can also disturb the body's normal balance of bacteria and yeast, sometimes allowing thrush to develop in the mouth or vaginal area. It is usually easily treated — ask your pharmacist, who can advise or supply a treatment.

What is the difference between cefalexin and Keflex?

They are the same medicine — cefalexin is the generic (active-ingredient) name and Keflex is a brand name. Generic cefalexin contains the identical active ingredient.

The wider class

About Cephalosporins

Cefalexin belongs to the cephalosporins class. For how the class as a whole works, its shared safety principles and monitoring, see the full guide.

Browse by body system

Authoritative sources

  • BNF: Cefalexin.
  • electronic Medicines Compendium (SmPC): Cefalexin.
  • NICE CKS: Cefalexin.

Building a medicines information resource?

We create evidence-led, dose-free drug and formulary references for teams.

☎ Call Get a Proposal