Antibiotics that treat bacterial pneumonia

The antibiotic your doctor prescribes depends on which bacterium is causing your pneumonia, how severe it is, and whether you're being treated at home or in a hospital. Amoxicillin and amoxicillin-clavulanate are first-line choices for community-acquired pneumonia (pneumonia you caught outside a hospital) in otherwise healthy adults. For patients allergic to penicillin, fluoroquinolones like levofloxacin or moxifloxacin work well and are often prescribed as a single drug rather than a combination.

If your pneumonia is more severe or you're hospitalized, doctors typically use ceftriaxone or cefotaxime (both cephalosporins), often paired with azithromycin (a macrolide antibiotic). This combination covers the most common bacteria that cause serious pneumonia, including Streptococcus pneumoniae, Haemophilus influenzae, and Legionella. Patients with COPD or other chronic lung disease may receive different combinations because they're at higher risk for certain bacteria.

Key Takeaways

  • Amoxicillin-clavulanate is the standard first choice for pneumonia in otherwise healthy adults who can take it by mouth at home.
  • Fluoroquinolones (levofloxacin, moxifloxacin) are effective alternatives for people allergic to penicillin and can be taken as a single daily dose.
  • Hospitalized patients usually receive ceftriaxone or cefotaxime combined with azithromycin to cover multiple bacterial species at once.
  • The specific antibiotic depends on severity, where you're being treated, your medical history, and local patterns of antibiotic resistance.
  • Viral pneumonia does not respond to antibiotics; treatment focuses on rest, fluids, and managing symptoms while your immune system clears the infection.

Why the choice of antibiotic matters

Not all pneumonia is caused by the same bacterium. Streptococcus pneumoniae is the most common cause in adults, but Haemophilus influenzae, Moraxella catarrhalis, and Legionella pneumophila also cause significant disease. An antibiotic that kills one species may not kill another, so your doctor chooses based on which bacteria are most likely given your age, health status, and where you caught the infection.

Antibiotic resistance is also a real factor. In some regions, certain strains of Streptococcus pneumoniae no longer respond to penicillin, which is why amoxicillin-clavulanate (which includes clavulanic acid to overcome some resistance) is preferred over amoxicillin alone. Your doctor knows the resistance patterns in your area and prescribes accordingly.

Antibiotics for pneumonia at home versus in the hospital

Outpatient pneumonia—treated at home—usually calls for oral antibiotics you can swallow. Amoxicillin-clavulanate, fluoroquinolones, or macrolides like azithromycin are typical choices. Treatment usually lasts 5 to 7 days, though your doctor may extend it if you're not improving or if you have underlying lung disease.

Hospital-acquired pneumonia (or severe community-acquired pneumonia requiring hospitalization) demands broader coverage because the bacteria involved are often more resistant and the infection is more dangerous. Doctors use intravenous ceftriaxone or cefotaxime, often with azithromycin or a fluoroquinolone added. If you're on a ventilator or have risk factors for resistant organisms, the regimen may include additional drugs like piperacillin-tazobactam or carbapenems.

Special situations that change antibiotic choice

Certain patient groups need different antibiotics. People with COPD are at higher risk for Haemophilus influenzae and may receive fluoroquinolones as first-line treatment. Patients with recent hospitalization or antibiotic exposure may harbor resistant bacteria and need broader-spectrum drugs. Smokers and people with weakened immune systems may be treated more aggressively from the start.

Pregnancy changes the picture too. Pregnant women with pneumonia cannot take fluoroquinolones or tetracyclines, so amoxicillin-clavulanate or cephalosporins become the standard. Older adults may be started on broader coverage because they're more likely to have severe disease and atypical presentations.

How long antibiotics take to work

Most patients begin to feel better within 48 to 72 hours of starting the right antibiotic—fever drops, breathing becomes easier, and fatigue improves. However, the infection isn't fully cleared yet. You need to finish the entire course, even if you feel well, because stopping early can allow bacteria to regrow and develop resistance.

If you're not improving after three days, contact your doctor. This can mean the antibiotic isn't working against the bacteria causing your pneumonia, the diagnosis was wrong, or a complication has developed. Your doctor may order a chest X-ray or sputum culture to identify the exact organism and switch to a different antibiotic if needed.

Viral pneumonia and why antibiotics don't work

Not all pneumonia is bacterial. Viruses—including influenza, respiratory syncytial virus (RSV), and coronaviruses—also cause pneumonia. Antibiotics have no effect on viruses, so if your pneumonia is viral, antibiotics won't help and won't be prescribed. Your doctor determines whether pneumonia is likely bacterial or viral based on symptoms, chest X-ray findings, and sometimes rapid tests.

Viral pneumonia is managed with rest, fluids, fever reducers, and cough suppressants while your immune system fights the infection. Antiviral medications exist for influenza (oseltamivir) and COVID-19 (remdesivir, Paxlovid), but these are different from antibiotics and work only if started early. A secondary bacterial infection can develop on top of viral pneumonia, at which point antibiotics become necessary.

Allergies and side effects to watch for

Penicillin and cephalosporin allergies are the most common reason to avoid standard pneumonia antibiotics. True penicillin allergy (not just stomach upset) means fluoroquinolones or macrolides become the first choice. If you've had a severe allergic reaction to penicillin, tell your doctor before treatment starts, because cephalosporins carry a small cross-reactivity risk.

Common side effects of pneumonia antibiotics include nausea, diarrhea, and yeast infections (from disrupting normal bacteria). Fluoroquinolones can cause tendon problems, especially in older adults, and may increase risk of certain heart rhythm issues. Macrolides can cause stomach upset and, rarely, liver problems. Most side effects are mild, but report severe reactions to your doctor immediately.

Frequently Asked Questions

Can I take over-the-counter antibiotics for pneumonia?

No. Antibiotics are prescription-only medications in the United States. Over-the-counter products marketed for respiratory infections do not contain antibiotics. You must see a doctor for diagnosis and a prescription.

What if I'm allergic to penicillin and cephalosporins?

Fluoroquinolones (levofloxacin, moxifloxacin) and macrolides (azithromycin) are effective alternatives. Tell your doctor the exact nature of your allergy—rash, anaphylaxis, or other reaction—because this affects which drugs are safe.

How do I know if my pneumonia is bacterial or viral?

Your doctor uses symptoms, chest X-ray appearance, and sometimes rapid tests to make this distinction. Bacterial pneumonia often causes high fever and thick sputum; viral pneumonia may develop more gradually. A sputum culture or blood test can identify the organism, but results take days, so treatment often starts before results return.

Is it safe to stop antibiotics early if I feel better?

No. Finishing the full course is essential, even if symptoms disappear. Stopping early allows surviving bacteria to regrow and can lead to relapse or antibiotic resistance. Take antibiotics exactly as prescribed for the full duration your doctor recommends.

Can antibiotics prevent pneumonia?

Antibiotics treat existing pneumonia but don't prevent it. Pneumonia vaccines (pneumococcal and influenza shots) reduce your risk of certain types. Avoiding smoking, practicing hand hygiene, and staying up to date on vaccinations are the main prevention strategies.