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.
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.
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.
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.
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.
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:
Low blood cell counts
Kidney failure
Liver inflammation (hepatitis)
Pancreas inflammation (pancreatitis)
Dangerous skin conditions like Stevens-Johnson syndrome (SJS) and toxic epidermal necrolysis (TEN)
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.
Speed up urinary tract infection (UTI) recovery. Taking antibiotics as directed is the best way to treat a UTI. But some over-the-counter (OTC) medications and home remedies may relieve your symptoms faster.
Compare OTC options. OTC medications can’t cure a UTI. But they can help ease your symptoms. Learn what the science says about OTC options for treating UTI pain and discomfort.
Prevent future UTIs. Get tips from our medical team to help lower your chances of developing a UTI. Plus, see a list of conditions that may contribute to recurrent UTIs.
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.
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
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.
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.
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)
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.
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.
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:
Toxic epidermal necrolysis (TEN)
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.
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.
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.
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
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.
A typical course of doxycycline to treat urethritis is 100 mg (by mouth) twice a day for 7 days.
Common side effects of doxycycline include:
Stomach upset
Nausea
Vomiting
Loss of appetite
Sunburn
Diarrhea
Serious but uncommon side effects from doxycycline include:
Diarrhea related to C. diff
Pseudotumor cerebri, or high pressure in the brain
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.
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.
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.
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.
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.
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.
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.
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.
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.
Allergan. (2019). Monurol - fosfomycin tromethamine powder [package insert].
American Academy of Allergy Asthma & Immunology. (2025). Penicillin allergy FAQ.
Gupta, K., et al. (2011). International clinical practice guidelines for the treatment of acute uncomplicated cystitis and pyelonephritis in women: A 2010 update by the Infectious Diseases Society of America and the European Society for Microbiology and Infectious Diseases. Clinical Infectious Diseases.
Procter and Gamble. (2009). Macrobid - nitrofurantoin monohydrate and nitrofurantoin, macrocrystalline capsule [package insert].
Sabih, A., et al. (2022). Complicated urinary tract infections. StatPearls.
Sun Pharmaceuticals. (2024). Bactrim™ sulfamethoxazole and trimethoprim DS (double strength) tablets and tablets USP [package insert].
Trestioreanu, A. Z., et al. (2010). Antimicrobial agents for treating uncomplicated urinary tract infection in women. The Cochrane Database of Systematic Reviews.