provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content

UTI Medications: What Are the Best Antibiotics for a Urinary Tract Infection?

Tracy Norfleet, MD, FACPPatricia Pinto-Garcia, MD, MPH
Updated on April 4, 2025

Key takeaways:

  • Antibiotics are the only medications that can cure a urinary tract infection (UTI).

  • In the U.S., antibiotics for UTIs aren’t available over the counter. You need a prescription to get an antibiotic.

  • Many different antibiotics can treat a UTI, but the best one for you depends on your medical history, the type of infection, and whether you’ve had UTIs before.

Access savings on related medications

A woman is holding a pill bottle while researching online.
Rockaa/E+ via Getty Images

A urinary tract infection (UTI) causes several uncomfortable symptoms that require fast relief. While several antibiotics can cure a UTI, you’ll need a prescription from a healthcare professional. If you’re wondering about your options, here’s what you need to know about antibiotics for treating UTIs

How do antibiotics treat a UTI?

Bacteria are the most common cause of UTIs. Antibiotics treat a UTI by eliminating bacteria that cause the infection. Antibiotics for UTIs either kill the bacteria or stop it from growing. Not all antibiotics can treat UTIs, but there are several options that work. Here’s a list of the best antibiotics that can treat a UTI.

A 3D illustration of the female and male urinary tracts highlighting the kidney, ureter, bladder, and urethra.

1. Trimethoprim / sulfamethoxazole (Bactrim, Septra)

Trimethoprim / sulfamethoxazole (Bactrim) is a combination medication that contains two antibiotics: trimethoprim and sulfamethoxazole. It also goes by TMP / SMX. Together, this powerful combination blocks two important steps bacteria need to make the proteins they need to survive.

TMP / SMX generally works well for treating UTIs. But, in some places, Bactrim has become less effective due to antibiotic resistance

Search and compare options

Search is powered by a third party. By clicking a topic in the advertisement above, you agree that you will visit a landing page with search results generated by a third party, and that your personal identifiers and engagement on this page and the landing page may be shared with such third party. GoodRx may receive compensation in relation to your search.

Dosage

The typical dosage is 1 double-strength TMP / SMX tablet (160/800 mg) twice a day for 3 days. If you have kidney problems, your healthcare professional may prescribe a lower dose.

Side effects

The most common side effects of TMP / SMX are:

  • Nausea

  • Vomiting

  • Rash

  • Loss of appetite

  • Hives

  • Diarrhea

  • Headache

  • Dizziness

  • Indigestion

Rare but serious side effects include:

2. Nitrofurantoin (Macrobid, Macrodantin)

Nitrofurantoin is an antibiotic that specifically treats UTI in the bladder (cystitis). Nitrofurantoin works by building up in the bladder and keeping bacteria from making the DNA and proteins they need to survive. 

GoodRx icon

Dosage

The typical dosage is 100 mg of nitrofurantoin twice a day for 5 days. If you have kidney problems, nitrofurantoin may not be right for you.

Side effects

The most common side effects of nitrofurantoin are:

  • Loss of appetite

  • Nausea

  • Vomiting

  • Gas 

  • Diarrhea

  • Dizziness

  • Headache

  • Rash

  • Hives

  • Abdominal pain

  • Itching

More serious potential side effects include:

  • Jaundice (a liver condition that causes yellowing of the skin and eyes) 

  • Hepatitis

  • Low blood cell counts

  • Pancreatitis

  • Stevens-Johnson syndrome 

3. Fosfomycin (Monurol)

Fosfomycin can treat UTIs caused by bacteria that are resistant to common antibiotics. It works by killing UTI-causing bacteria and preventing them from sticking to the urinary tract lining.

Dosage

You’ll only need one dose of fosfomycin to treat a UTI. The typical dose is 3 g. You may need a different dose if you have kidney or liver problems.

Side effects

The most common side effects of fosfomycin are:

  • Nausea

  • Diarrhea

  • Headache

  • Dizziness

  • Abdominal pain

  • Runny nose

  • Back pain

  • Sore throat

  • Inflammation of the vagina

More serious potential side effects include:

4. Amoxicillin / potassium clavulanate (Augmentin), cefdinir (Omnicef), or cephalexin (Keflex)

Amoxicillin / potassium clavulanate (Augmentin) belongs to the penicillin class of antibiotics. Cefdinir (Omnicef) and cephalexin (Keflex) belong to a related class of antibiotics called cephalosporins. All three antibiotics kill bacteria by destroying one of its most important components — the cell wall. 

Amoxicillin / potassium clavulanate isn’t always a first-choice option due to antibiotic resistance. But it can work for some people. Cefdinir and cephalexin are preferred antibiotics for treating UTIs in children.

Dosage

Here are the typical dosages of these medications:

  • Amoxicillin / clavulanate: 500 mg twice a day for 5 to 7 days 

  • Cefdinir: 300 mg twice a day for 5 to 7 days 

  • Keflex: 250 mg to 500 mg every 6 to 12 hours for 5 to 7 days 

Children may need longer treatment — up to 10 days. 

Side effects

Common side effects of these medications include:

  • Diarrhea

  • Nausea

  • Vomiting

  • Rash

  • Hives

  • Itching

  • Vaginal yeast infection

  • Inflammation and swelling of the tongue

  • Black, hairy tongue

In rare cases, all three have the potential to cause dangerous skin reactions, including:

If you have a penicillin allergy, your healthcare professional won’t prescribe amoxicillin / clavulanate. You may still be able to take cefdinir or cephalexin. But there’s a small chance (less than 5%) that you may develop an allergy to these antibiotics if you’re allergic to penicillin. Watch for signs of a drug allergy like rash, upset stomach, cough, or trouble breathing.

5. Ciprofloxacin (Cipro) or levofloxacin (Levaquin)

Ciprofloxacin (Cipro) and levofloxacin (Levaquin) are antibiotics that keep bacteria from copying their DNA and multiplying. These antibiotics work slightly better than amoxicillin / potassium clavulanate, cefdinir, and cephalexin. But the risk of serious side effects is slightly higher. These antibiotics are used to treat complicated or severe types of UTIs.

Dosage

The usual dosage of levofloxacin is a 250 mg tablet twice a day for 3 days. The usual dosage of ciprofloxacin is 250 mg to 500 mg every 12 to 24 hours for 5 to 7 days. Based on your kidney function, your healthcare professional may recommend changing how often you take ciprofloxacin and levofloxacin.

Side effects

Common side effects of these antibiotics include:

  • Nausea

  • Vomiting

  • Diarrhea

  • Abdominal pain

  • Headache

  • Indigestion

  • Rash

  • Dizziness

Ciprofloxacin and levofloxacin can also cause serious, disabling side effects like:

  • Tendon rupture

  • Permanent effects on your nervous system

  • Irregular heartbeats

6. Doxycycline

Doxycycline keeps bacteria from making the proteins they need to survive. Doxycycline doesn’t treat cystitis. But it can treat another type of infection of the urinary tract called urethritis which is caused by chlamydia

Dosage

A typical course of doxycycline to treat urethritis is 100 mg (by mouth) twice a day for 7 days.

Side effects

Common side effects of doxycycline include:

  • Stomach upset

  • Nausea

  • Vomiting

  • Loss of appetite

  • Sunburn

  • Diarrhea

Serious but uncommon side effects from doxycycline include:

What are potential side effects of antibiotics for UTIs?

Most antibiotics can cause some degree of stomach upset like nausea, vomiting, and diarrhea. If you have severe diarrhea or diarrhea that lasts more than 2 days, let your healthcare professional know. While diarrhea is a common antibiotic side effect, in some cases, it may be a sign of a more serious C. diff infection. 

Some people are also sensitive to antibiotics. This could result in a minor reaction like a rash or a more serious reaction like anaphylaxis. If you have difficulty breathing or notice major skin changes after taking an antibiotic, get medical help right away.

How long do you need to take antibiotics to treat a UTI?

Most UTIs require 3 to 7 days of treatment. But how long you take antibiotics for a UTI depends on how severe your UTI is and which antibiotic you’re prescribed. Some medications, like fosfomycin, require only one dose. But a more severe UTI might need treatment for 14 days or more. 

You should start feeling better within 1 to 2 days of starting antibiotics. But if you have a severe UTI or you’ve had symptoms for a while before starting antibiotics, it may take a few more days to notice improvement.

It’s important to take all the antibiotics you’re prescribed, even if you start feeling better before finishing them. Stopping antibiotics early can lead to antibiotic resistance. This means the medication might not work as well in the future. It can also cause your UTI to return if the infection isn’t fully treated.

Do you really need to take antibiotics for a UTI?

Most people need to take antibiotics for their UTI to go away. While a UTI can go away on its own, this doesn’t usually happen. Plus, an untreated UTI can turn into a more serious infection, like pyelonephritis (a kidney infection) or even a blood infection that can cause life-threatening sepsis.

A few things put you at higher risk for developing a serious infection, including pregnancy, underlying health conditions, and being 65 years and older. So, it’s best not to wait to see if your symptoms improve — seek medical care right away.

Can UTI symptoms linger after you take antibiotics?

UTI symptoms usually start improving within 1 to 3 days of starting antibiotics. If your symptoms aren’t getting better quickly, or if they continue after finishing your antibiotics, talk with your prescriber.

They’ll want to make sure the antibiotics actually worked against your UTI. To do this, they may take another sample of your urine to see if there’s still bacteria. If the infection is cured, you’ll want to be sure there isn’t a different issue that’s causing similar symptoms. 

Are there over-the-counter antibiotics for UTI treatment?

UTI symptoms can be uncomfortable. And since all antibiotics require a prescription, you may wonder if an over-the-counter (OTC) treatment from your local pharmacy is worth considering. 

There are OTC medications that can help ease UTI symptoms while you wait for antibiotics to kick in. Products like AZO and Uristat can help relieve burning and pain. But they aren’t antibiotics, meaning they won’t treat your UTI. That’s why it’s important to take them along with prescribed antibiotics. 

When should you talk with your healthcare professional about a UTI?

You should seek medical care as soon as you notice UTI symptoms, such as:

  • Pain with urination

  • Burning with urination

  • Blood in your urine

  • Feeling like you have to go to the bathroom more often

  • Feeling like you can’t completely empty your bladder

The sooner you get diagnosed, the sooner you can start treatment. Starting treatment early reduces your risk of developing problems like kidney infections (pyelonephritis) or serious infections (sepsis). Early treatment also helps you feel better faster. 

If symptoms appear after regular office hours, call your healthcare professional’s after-hours helpline. Most people can wait 24 hours to start antibiotic treatment. But people who are pregnant, have kidney conditions, or have weakened immune systems shouldn’t wait. Your healthcare professional can help you figure out if you need to be seen at an urgent care center or emergency room. They can also let you know if you can wait for a regular appointment. 

Frequently asked questions

How can you prevent a UTI?

There are several things you can do to lower your chances of getting a UTI. For example, drink enough fluids to stay well hydrated, pee right after sex, and wipe from front to back. Prophylactic antibiotics can also help if you’re prone to UTIs and vaginal estrogen creams can lower your risk of UTIs in menopause. Taking probiotics and switching your birth control product may also help. 

How do doctors treat an antibiotic-resistant UTI?

Some UTIs don’t respond to standard antibiotics. These antibiotic-resistant UTIs may need to be treated with stronger antibiotics. Some of these antibiotics are only available as intravenous (IV) medications so they have to be given directly in a vein. In these cases, treatment may require hospitalization. 

What is the difference between a complicated and uncomplicated UTI?

An uncomplicated UTI is a bladder infection that hasn’t spread to other areas. A complicated UTI is an infection that has spread to your kidneys (pyelonephritis) or bloodstream, affecting other parts of your body. 

People with complicated UTIs have additional symptoms like fever, flank pain, and chills. They may need extra tests — like blood tests and imaging studies — and stronger antibiotics for a longer period to fully treat their infection. 

The bottom line

Urinary tract infections (UTIs) are uncomfortable and can make you feel miserable. The good news is your healthcare professional can prescribe you an antibiotic to treat and cure them. The best antibiotic for you depends on your age, medical history, and the type of UTI you have. OTC treatments can help keep you comfortable until the antibiotics kick in, but they can’t cure your UTI. 

why trust our exports reliability shield

Why trust our experts?

Tracy Norfleet, MD, FACP
Dr. Tracy Norfleet is a board-certified Internal Medicine physician, health expert, and physician leader with over 20 years of experience practicing adult medicine. Dual-certified by the American Board of Obesity Medicine and the American Board of Lifestyle Medicine, Dr. Tracy possesses a wealth of knowledge and expertise in both traditional medical practices and innovative lifestyle interventions for chronic disease management and reversal.
Patricia Pinto-Garcia, MD, MPH
Patricia Pinto-Garcia, MD, MPH, is a medical editor at GoodRx. She is a licensed, board-certified pediatrician with more than a decade of experience in academic medicine.

References

Allergan. (2019). Monurol - fosfomycin tromethamine powder [package insert].

American Academy of Allergy Asthma & Immunology. (2025). Penicillin allergy FAQ.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Learn more about Urinary Tract Infections

Stay informed, and get prescription saving tips and more from GoodRx Health.

By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.