Cephalexin (also spelled cefalexin) is an oral first-generation cephalosporin antibiotic used to treat selected bacterial infections caused by susceptible organisms. It inhibits bacterial cell wall synthesis and can be prescribed for certain skin, respiratory, bone, or urinary tract infections when appropriate for the diagnosis and local resistance patterns. [1][2]
Cephalexin is familiar in outpatient medicine, but its usefulness has limits. It does not treat viruses, does not reliably cover methicillin-resistant Staphylococcus aureus (MRSA), and is not interchangeable with every other cephalosporin. Its allergy history and kidney function considerations are important to safe prescribing. [1][2]
Cephalexin at a glance
| Feature | Summary |
|---|---|
| Generic names | Cephalexin (US), cefalexin (international spelling) |
| Class | First-generation cephalosporin; beta-lactam |
| Mechanism | Inhibits bacterial cell wall synthesis |
| Forms | Oral capsules, tablets and liquid formulations (availability varies) |
| Main activity | Selected susceptible Gram-positive and some Gram-negative organisms |
| Common side effects | Diarrhea, nausea, vomiting, stomach discomfort |
| Important cautions | Cephalosporin allergy, serious skin reactions, C. difficile diarrhea, kidney impairment |
| Drug interactions | Probenecid, metformin; selected laboratory test interference |
| Key limitation | No reliable MRSA coverage; not active against all Gram-negative bacteria |
How does cephalexin work?
Cephalexin is a beta-lactam antibiotic. Like other cephalosporins, it binds to penicillin-binding proteins that are needed to build the bacterial peptidoglycan cell wall. Interference with this process can lead to bacterial death when the organism is susceptible. [1]
The term first-generation refers to a historical and pharmacological cephalosporin grouping. It does not mean that cephalexin is categorically weaker than second-, third-, or later-generation agents. Drug selection is determined by organism susceptibility and infection site rather than a simple generation ranking.
Cephalexin is often active against susceptible streptococci and methicillin-susceptible Staphylococcus aureus (MSSA), and some selected Gram-negative organisms. It is not appropriate to presume coverage of all Escherichia coli urinary isolates or resistant skin pathogens. [1][2]
What infections can cephalexin treat?
Skin and soft tissue infections
Cephalexin is commonly used for selected nonpurulent bacterial skin infections, such as uncomplicated cellulitis, when streptococci or MSSA are plausible and treatment is indicated. Clinical assessment distinguishes cellulitis from noninfectious redness and from purulent abscesses, which may require drainage and different microbiological coverage. [1][3]
Where MRSA is a significant concern, cephalexin alone may not provide adequate treatment. The right approach depends on infection type, severity, local epidemiology, and current guidance. [3]
Urinary tract infections
Cephalexin may be used for certain lower urinary tract infections when a susceptible organism is likely or confirmed and the clinical situation supports its use. Local recommendations differ, and susceptibility or previous culture findings can matter because resistance among urinary organisms varies. [1]
It should not be treated as a universal first-choice medicine for every UTI. The presence of fever, flank pain, vomiting, pregnancy, recurrent infection, or relevant medical conditions may change the diagnosis and need for investigations. Kidney infection often requires a different assessment and choice of treatment. [1][2]
Respiratory and ear infections
US labeling includes certain respiratory tract infections, including those caused by susceptible organisms, and otitis media under defined circumstances. Many respiratory symptoms are viral, and first-generation cephalosporins do not cover every bacterial respiratory pathogen. A confirmed diagnosis and appropriate agent remain essential. [1]
For confirmed group A streptococcal pharyngitis, CDC recommendations include cephalexin as an alternative for some patients with penicillin allergy, but advise avoiding it in those with a history of immediate-type hypersensitivity to penicillin. A history of an antibiotic reaction should therefore be reviewed, not ignored. [4]
Selected bone infections
Cephalexin has labeled indications involving certain bone infections caused by susceptible organisms. Such conditions ordinarily require careful microbiological and clinical assessment, sometimes specialist care and prolonged treatment planning. Oral cephalexin should not be started independently for suspected bone infection. [1]
What cephalexin does not treat
Cephalexin does not treat influenza, COVID-19, the common cold, or other viral infections. It does not reliably cover MRSA, most enterococci, Pseudomonas aeruginosa, or many resistant Gram-negative bacteria. Suspected fungal infection also requires a different diagnosis and treatment approach. [1][2]
A prior prescription for similar symptoms is not proof that cephalexin is appropriate for a new episode.
Common side effects
The most common adverse effects reported with cephalexin include gastrointestinal symptoms such as:
- Diarrhea.
- Nausea.
- Vomiting.
- Indigestion.
- Abdominal discomfort.
Some patients may develop a rash or other adverse reactions. Most uncomplicated symptoms are not dangerous, but severe or persistent effects should be assessed. [1]
C. difficile-associated diarrhea
As with many antibiotics, cephalexin can disrupt normal gut bacteria and increase susceptibility to Clostridioides difficile. Watery diarrhea that is severe, persistent, or accompanied by fever or abdominal pain can warrant urgent evaluation, including after the treatment course has ended. [1]
Can people with penicillin allergy take cephalexin?
There is no single answer for every penicillin allergy label. Some people who report penicillin allergy are not truly allergic, while the risk of cross-reactivity depends on the nature of the original reaction and, for some beta-lactams, similarities in chemical side chains. [4][5]
Cephalexin is contraindicated in patients with known hypersensitivity to cephalexin or other cephalosporins. The US label advises clinicians to ask about previous reactions to cephalosporins, penicillins, and other medicines. [1]
A history of immediate-type penicillin hypersensitivity is a specific reason why CDC’s strep-throat guidance says to avoid cephalexin as an alternative. People with a history of anaphylaxis, breathing problems, or severe skin reactions should not independently challenge themselves with cephalexin. A clinician may recommend formal allergy evaluation to clarify safe choices. [4][5]
What does a serious allergic reaction look like?
Potential warning signs include hives with breathing symptoms, swelling of the tongue or throat, wheezing, fainting, or rapidly worsening rash. These require emergency medical help. Severe blistering skin reactions also require urgent attention. [1]
Kidney function and dosing precautions
Cephalexin is substantially eliminated through the kidneys. In people with impaired renal function, dosage adjustment or closer monitoring may be needed. An inappropriate regimen can increase drug exposure and the risk of neurological complications, including seizures. [1]
US labeling provides renal dosing adjustments that depend on estimated creatinine clearance and patient age. Such tables must be applied to the correct formulation, indication, and individual clinical circumstance rather than copied into a self-treatment guide. Hemodialysis situations may need specialist advice. [1]
Drug interactions
Probenecid
Probenecid inhibits renal excretion of cephalexin and can increase exposure. US labeling does not recommend the combination. [1]
Metformin
Cephalexin can increase metformin exposure. Depending on the patient, this may warrant monitoring, particularly if kidney function is reduced or glycemic control is unstable. The combination is not automatically dangerous for every patient, but should be reviewed. [1]
Laboratory tests
Cephalexin can occasionally interfere with specific laboratory tests, including some methods of urine glucose testing, and has been associated with positive direct antiglobulin (Coombs) tests. Results need interpretation in clinical context rather than assuming every abnormal test proves disease. [1]
Patients should tell clinicians about prescriptions, over-the-counter drugs, supplements, and relevant chronic conditions before starting treatment.
Cephalexin in pregnancy and breastfeeding
Cephalexin is used in pregnancy when clinically appropriate. Prescribers assess the infection, susceptibility, medical history, and the applicable local product information. Pregnancy-related decisions should never be based solely on the general reputation of an antibiotic class. [1][2]
Cephalexin enters breast milk in small amounts, and many patients can continue breastfeeding while taking it when appropriately prescribed. The infant’s age, prematurity, clinical condition, and symptoms such as diarrhea or thrush can change counseling. Ask a healthcare professional about an individual situation. [2]
Cephalexin in children and older adults
Cephalexin is prescribed for selected pediatric bacterial infections, but doses are based on factors such as weight, indication, and kidney function. Do not extrapolate from adult tablets or another child’s prescription. [1]
Older adults may need additional kidney assessment because reduced renal function can increase antibiotic exposure. Any history of severe beta-lactam reaction should be carefully evaluated before treatment. [1]
How long does cephalexin treatment last?
The regimen and duration depend on the infection. A simple skin infection, a diagnosed streptococcal throat infection, and an infection of deeper tissues may require different approaches. Some infections need procedures, cultures, or imaging in addition to antibiotics. [1][3][4]
Follow the prescriber’s plan. Do not extend treatment merely because pills remain, and do not stop or change it independently solely because symptoms have improved. If the infection is worsening or treatment seems ineffective, seek reassessment rather than assuming a higher dose is required.
Cephalexin compared with other antibiotics
Cephalexin vs amoxicillin: Both are beta-lactams, but one is a first-generation cephalosporin and the other a penicillin. They cover different patterns of bacteria and have distinct recommended uses. Neither automatically replaces the other.
Cephalexin vs ceftriaxone: Ceftriaxone is a third-generation cephalosporin administered by injection and differs markedly in spectrum, distribution, and clinical uses. Comparing drug generations alone is not a useful way to choose therapy.
Cephalexin vs clindamycin: These belong to different classes. Organism susceptibility, allergy history, local resistance, and C. difficile risks matter when determining suitability.
Frequently Asked Questions
Is cephalexin a penicillin?
No. Cephalexin is a cephalosporin, although both classes belong to the broader beta-lactam family.
Is cephalexin good for skin infections?
It may be appropriate for selected skin infections involving susceptible streptococci or MSSA, but abscesses, MRSA, or noninfectious conditions can require a different approach. [1][3]
Can cephalexin treat a UTI?
Sometimes. Whether it is suitable depends on symptoms, clinical circumstances, susceptibility, and local guidance. [1]
Does cephalexin cover MRSA?
It should not be relied upon to treat MRSA infection. [2][3]
Can I take cephalexin if I am allergic to penicillin?
Do not make that decision without reviewing the specific allergic reaction with a clinician. Immediate-type penicillin reactions are a particularly important warning in relevant guidance. [4][5]
Does cephalexin affect kidney function?
The principal issue is that reduced kidney function can slow elimination and require dosing adjustments; kidney disease must be disclosed to the prescriber. [1]
Can cephalexin cause diarrhea?
Yes. Mild diarrhea can occur, but severe or persistent diarrhea deserves assessment, including for possible C. difficile infection. [1]
Key Takeaways
Cephalexin is an oral first-generation cephalosporin for selected susceptible bacterial infections, especially particular skin and other outpatient infections. It is not effective against viruses and does not reliably treat MRSA. Safe use requires careful consideration of allergy history, kidney function, interacting medicines, and local susceptibility. Appropriate diagnosis matters more than assuming that a familiar antibiotic will work for every infection.
Explore related topics
Drug class
Infections discussed
Resistance topics
Compare with
Related Articles
- Cephalosporin Antibiotics: Generations, Uses, Side Effects and Resistance
- Strep Throat: Symptoms, Testing, Antibiotic Treatment, and Prevention
- Penicillin Allergy: Symptoms, Testing, Cross-Reactivity and Safe Evaluation
Official resources
Primary regulatory and patient-information sources for this medicine. Labels differ by country; always use the leaflet supplied with the dispensed product.
References
- DailyMed. Cephalexin capsules, US prescribing information. https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=74f83298-57f7-4166-8dd8-db3e556a68d8
- MedlinePlus. Cephalexin. https://medlineplus.gov/druginfo/meds/a682733.html
- Infectious Diseases Society of America. Skin and Soft Tissue Infections: Clinical Practice Guideline. https://www.idsociety.org/practice-guideline/skin-and-soft-tissue-infections/
- Centers for Disease Control and Prevention. Clinical Guidance for Group A Streptococcal Pharyngitis. https://www.cdc.gov/group-a-strep/hcp/clinical-guidance/strep-throat.html
- Centers for Disease Control and Prevention. Clinical Features of Penicillin Allergy. https://www.cdc.gov/antibiotic-use/hcp/clinical-signs/