Skip to main content
Urinary Tract Infection (UTI)

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

Tracy Norfleet, MD, FACPPatricia Pinto-Garcia, MD, MPH
Written by Tracy Norfleet, MD, FACP | Reviewed by Patricia Pinto-Garcia, MD, MPH
Updated on June 11, 2026

Key takeaways:

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

  • 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.

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

Save on related medications

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.

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 prevents bacteria from making 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

Dosage

The typical dosage is 1 double-strength TMP / SMX tablet (160 mg / 800 mg) twice a day for 3 days. If you have kidney problems, a 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. 

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

  • SJS 

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 1 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:

  • Diarrhea caused by the bacteria Clostridium difficile (C. diff)

  • Swelling and inflammation of the colon (toxic megacolon)

4. Pivmecillinam

Pivmecillinam (Pivya) and amoxicillin / potassium clavulanate (Augmentin) belong to the penicillin class of antibiotics. 

Amoxicillin / potassium clavulanate isn’t always a first-choice option due to antibiotic resistance. But it can work for some people, including children.

Pivmecillinam is an antibiotic used to treat UTIs in adults. It’s typically reserved for people who can’t take first-choice antibiotics or who have infections caused by bacteria that are resistant to more commonly used antibiotics.

Dosage

The usual dosage of pivmecillinam is 185 mg by mouth 3 times a day for 3 to 7 days.

The typical dose of amoxicillin / clavulanate is 500 mg twice a day for 5 to 7 days.

Side effects

Common side effects of amoxicillin / clavulanate and pivmecillinam include:

  • Stomach upset

  • Nausea

  • Diarrhea

  • Headache

Serious but uncommon side effects include:

If you have a penicillin allergy, your healthcare team will recommend alternative treatments.

5. Cephalosporins

Cephalosporins are a class of antibiotics that are related to penicillins. These antibiotics kill bacteria by destroying one of its most important components: the cell wall. Cephalosporins are often used to treat UTIs in children. Cephalosporins that can treat UTIs include:

Dosage

Here are the typical dosages of these medications:

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

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

  • Cefixime: up to 400 mg given as a single dose

  • Cefuroxime: up to 500 mg for two doses

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:

  • SJS

  • TEN

You may still be able to take cefdinir or cephalexin if you have a penicillin allergy. 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

  • Trouble breathing

6. 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, a 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

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 eliminate UTI-causing bacteria, even if they can eliminate other types of bacteria.

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

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 team know. Diarrhea is a common antibiotic side effect. In some cases, though, 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 hives or a more serious reaction like anaphylaxis. Some people can also develop severe cutaneous adverse reactions (which primarily affect the skin). This includes conditions like DRESS or SJS. 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 1 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 may sometimes 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 age 65 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 within this time frame, or if they continue after finishing your antibiotics, talk with your healthcare team.

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 seek care for a UTI?

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

  • Pain or 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 team’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 team can help you figure out if you need to be seen at an urgent care center or emergency room (ER). They can also let you know if you can wait for a regular appointment.

Frequently asked questions

There are several things that may lower your chances of getting a urinary tract infection (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 avoiding spermicides may also help. 

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. 

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 team can prescribe 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. Over-the-counter (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?

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, 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?

Latest articles