What Is the Best Antibiotic for a UTI?

The three best antibiotics for an uncomplicated urinary tract infection are nitrofurantoin, trimethoprim-sulfamethoxazole (often called Bactrim or TMP-SMX), and fosfomycin. These are the first-line treatments recommended by the Infectious Diseases Society of America, and the “best” one for you depends on local resistance patterns, your allergy history, and how recently you’ve taken antibiotics.

The Three First-Line Options

Nitrofurantoin is the most commonly prescribed UTI antibiotic today. The standard course is 100 mg twice daily for 5 days, though some formulations are taken four times daily for 7 days. It works well for bladder infections but should not be used if there’s any suspicion the infection has spread to the kidneys, because it doesn’t reach high enough concentrations outside the urinary tract.

Trimethoprim-sulfamethoxazole has been a go-to UTI treatment for decades, and its course is shorter: one double-strength tablet twice daily for just 3 days. The catch is bacterial resistance. In many communities, more than 20% of the bacteria that cause UTIs are resistant to this drug, which means it simply won’t work for a significant number of infections. Your provider will typically avoid prescribing it if resistance rates in your area are high, or if you’ve used it for a UTI in the previous three months.

Fosfomycin is the simplest option: a single dose of 3 grams, taken once. A meta-analysis of 10 studies found no significant difference in clinical resolution between fosfomycin and multi-day regimens of other antibiotics. It performed comparably to nitrofurantoin, sulfonamides, and even fluoroquinolones. The tradeoff is that some guidelines note it may be slightly less effective overall, and like nitrofurantoin, it’s not appropriate if a kidney infection is suspected.

How Your Provider Chooses

There’s no single “best” antibiotic that works for everyone. The decision comes down to a few practical factors. If you have a sulfa allergy, TMP-SMX is off the table. If you need simplicity and want to be done in one dose, fosfomycin makes sense. If your area has high resistance rates to TMP-SMX, nitrofurantoin is the safer bet. Cost and availability also play a role, since fosfomycin can be harder to find and more expensive in some pharmacies.

Your recent antibiotic history matters too. Using the same antibiotic repeatedly increases the chance that bacteria in your system develop resistance to it. If you had a UTI treated with TMP-SMX a month ago, your provider will likely switch you to a different class this time around.

Why Fluoroquinolones Are No Longer Recommended

Older UTI prescribing patterns leaned heavily on fluoroquinolones like ciprofloxacin and levofloxacin. The FDA has since determined that for uncomplicated UTIs, the risks of these drugs outweigh the benefits. They’re now reserved for patients who have no alternative treatment options.

The concern is a condition the FDA calls fluoroquinolone-associated disability: a constellation of side effects that can be disabling and potentially irreversible. These reactions can affect tendons, joints, muscles, the nervous system, vision, hearing, the heart, and the skin. To qualify as this condition, symptoms must last 30 days or longer after stopping the drug and involve at least two body systems. The FDA added a boxed warning, its most serious label, noting that these adverse reactions can occur together.

For a simple bladder infection, the three first-line antibiotics are effective enough that there’s no reason to accept that level of risk.

How Quickly You’ll Feel Better

Antibiotics begin working against UTI bacteria within hours of your first dose. Most people notice meaningful relief from the burning and urgency within one to three days. Even though symptoms improve quickly, finishing the full course matters. Stopping early can leave surviving bacteria behind, raising the chance the infection returns or becomes resistant.

UTIs During Pregnancy

Pregnancy changes the antibiotic options because some drugs carry risks to the developing baby. The American College of Obstetricians and Gynecologists lists nitrofurantoin, certain penicillin-type antibiotics (beta-lactams), and fosfomycin among the treatment choices for pregnant individuals. The specific antibiotic depends on culture results and how far along the pregnancy is. UTIs in pregnancy are also more aggressively screened for and treated, because untreated infections carry a higher risk of complications like preterm delivery.

Managing Recurrent UTIs

If you’re getting two or more UTIs within six months, you meet the clinical definition of recurrent UTIs. At that point, your provider may discuss preventive antibiotic strategies beyond treating each infection as it comes.

One approach is continuous low-dose prophylaxis, where you take a small daily dose of an antibiotic for three to twelve months. Common options include a low dose of nitrofurantoin daily or TMP-SMX taken once daily or three times per week. This strategy significantly reduces infection frequency while you’re on it, but UTIs tend to return at their previous rate once you stop.

For women whose UTIs are closely linked to sexual activity, post-coital prophylaxis is an alternative. This means taking a single low dose of an antibiotic shortly before or after intercourse. The same drugs used for daily prophylaxis work here, just taken only when needed. This approach uses less total antibiotic, which can reduce side effects and slow resistance development.

Some women stay on prophylactic antibiotics for years to maintain the benefit, though evidence supporting use beyond 6 to 12 months is limited. Periodic reassessment with your provider helps weigh whether the ongoing benefit justifies continued use.