Is Keflex (cephalexin) effective for treating a urinary tract infection (UTI)?

Medical Advisory BoardAll articles are reviewed for accuracy by our Medical Advisory Board
Educational purpose only • Exercise caution as content is pending human review
Article Review Status
Submitted
Under Review
Approved

Last updated: December 2, 2025View editorial policy

Personalize

Help us tailor your experience

Which best describes you? Your choice helps us use language that's most understandable for you.

Is Keflex (Cephalexin) Effective for UTI Treatment?

Cephalexin is an acceptable but not preferred option for uncomplicated UTIs, reserved for situations when first-line agents (nitrofurantoin, fosfomycin, trimethoprim-sulfamethoxazole) cannot be used, and it should be dosed at 500 mg twice daily for 5-7 days. 1

First-Line vs. Alternative Status

Current guidelines consistently classify cephalexin and other β-lactams as alternative rather than first-line agents for uncomplicated cystitis 1. The 2024 European Association of Urology guidelines do not list cephalexin among recommended first-line options for uncomplicated cystitis, instead prioritizing fosfomycin, nitrofurantoin, and pivmecillinam 1. The 2024 WHO guidelines similarly recommend amoxicillin-clavulanate, trimethoprim-sulfamethoxazole, or nitrofurantoin as preferred choices for lower UTIs 1.

Why Cephalexin is Not First-Line:

  • Inferior efficacy: β-lactams generally demonstrate lower cure rates and more adverse effects compared to other UTI antimicrobials 1
  • Less well-studied: Cephalexin specifically is "less well studied" than other β-lactam options for uncomplicated cystitis 1
  • Broader ecological impact: Greater propensity for collateral damage (disruption of normal flora and resistance promotion) compared to nitrofurantoin or fosfomycin 1

When Cephalexin IS Appropriate

Cephalexin remains a reasonable choice when:

  • Other recommended first-line agents cannot be used due to allergies, contraindications, or intolerance 1
  • Local resistance patterns favor its use (E. coli resistance <20%) 1
  • The pathogen is confirmed susceptible to cefazolin on culture 2, 3

The FDA label confirms cephalexin is indicated for genitourinary tract infections caused by E. coli, Proteus mirabilis, and Klebsiella pneumoniae 4.

Optimal Dosing Strategy

The most important recent finding: 500 mg twice daily is as effective as 500 mg four times daily 2, 3.

  • A 2023 multicenter study of 261 patients showed no difference in treatment failure between twice-daily (12.7%) versus four-times-daily dosing (17%, P=0.343) 2
  • A 2025 emergency department study of 214 patients confirmed similar findings: 18.7% vs 15.0% failure rates (P=0.465) 3
  • Twice-daily dosing improves adherence while maintaining equivalent efficacy 2

Recommended Regimen:

  • Dose: 500 mg twice daily (not four times daily)
  • Duration: 5-7 days for uncomplicated cystitis 1, 2
  • Duration: 7 days for men (to cover possible prostatitis) 1

Clinical Efficacy Data

Cephalexin demonstrates moderate effectiveness for UTIs:

  • Single-dose therapy (3g): 67% cure rate overall, but 87% in women <25 years vs only 46% in women >40 years 5
  • Standard multi-day therapy: Achieves high urinary concentrations (1000-5000 mcg/mL) with >90% urinary excretion 4
  • Active against: E. coli (most common pathogen at 85.4%), Proteus mirabilis, Klebsiella pneumoniae 4, 2
  • Not active against: Pseudomonas, Enterococcus, methicillin-resistant Staphylococcus, most Enterobacter species 4

Critical Resistance Considerations

A major limitation: The 2024 WHO GLASS data showed a median of 75% (range 45-100%) of E. coli urinary isolates were resistant to amoxicillin across 22 countries 1. While this specifically addresses amoxicillin, it highlights the importance of knowing local resistance patterns before empirically prescribing any β-lactam, including cephalexin 1.

Type of UTI Matters

Uncomplicated Cystitis:

  • Use only when first-line agents unavailable 1
  • 500 mg twice daily for 5-7 days 2

Pyelonephritis:

  • Oral cephalosporins (cefpodoxime 200 mg twice daily for 10 days or ceftibuten 400 mg daily for 10 days) are listed as alternatives when fluoroquinolones cannot be used 1
  • Cephalexin is NOT specifically recommended for pyelonephritis in major guidelines 1

Complicated UTIs:

  • Second-generation cephalosporins (not cephalexin, which is first-generation) plus aminoglycosides are recommended for systemic symptoms 1
  • Third-generation cephalosporins preferred for severe complicated UTIs 1

Common Pitfalls to Avoid

  1. Don't use four-times-daily dosing: Twice daily is equally effective and improves adherence 2, 3
  2. Don't use for febrile UTIs/pyelonephritis in children: Insufficient serum concentrations; use agents that achieve therapeutic blood levels 1
  3. Don't assume susceptibility: Always obtain culture and tailor therapy, especially given rising resistance rates 1
  4. Don't use empirically in high-resistance areas: Check if local E. coli resistance to cephalosporins exceeds 20% 1

Professional Medical Disclaimer

This information is intended for healthcare professionals. Any medical decision-making should rely on clinical judgment and independently verified information. The content provided herein does not replace professional discretion and should be considered supplementary to established clinical guidelines. Healthcare providers should verify all information against primary literature and current practice standards before application in patient care. Dr.Oracle assumes no liability for clinical decisions based on this content.

Have a follow-up question?

Our Medical A.I. is used by practicing medical doctors at top research institutions around the world. Ask any follow up question and get world-class guideline-backed answers instantly.