Urinary Tract Infections (UTIs)

Medically Reviewed by Poonam Sachdev on March 04, 2024
12 min read

A urinary tract infection, or UTI, is an infection in any part of your urinary system. Your urinary system is made up of your:

  • Kidneys: Filter blood to remove wastes, change wastes into urine
  • Ureters:  Tubes taking the urine from the kidneys to your bladder
  • Bladder: Temporary holding area for urine
  • Urethra: Tube taking the urine from your bladder to outside your body

If you're a woman or have female anatomy, your chance of getting a urinary tract infection is high. Some experts say there's a 50% chance that women will get one in their lifetime, with many having repeat infections, sometimes for years. About 1 in 10 men will get a UTI in their lifetime. Children can get UTIs as well, though this is rare – about 1 or 2 in 100.

Here's how to handle UTIs and how to lessen your chances of getting one in the first place.

The symptoms of a UTI can include:

  • A burning feeling when you pee
  • A frequent or intense urge to pee, even though little comes out when you do
  • Cloudy, dark, bloody, or strange-smelling pee
  • Feeling tired or shaky
  • Pain in the penis or rectum (men)
  • Mental confusion (mostly older people)
  • Wetting the bed (children and older adults)

If the UTI has spread to your kidneys, you may also get:

  • Pain or pressure in your back or lower belly
  • Nausea and vomiting
  • Fever and chills

An infection can happen in different parts of your urinary tract. Each type has a different name, based on where it is.

  • Cystitis (bladder): You might feel like you need to pee a lot, or it might hurt when you pee. You might also have lower belly pain and cloudy or bloody urine.
  • Pyelonephritis (kidneys): This can cause fever, chills, nausea, vomiting, and pain in your upper back or side.
  • Urethritis (urethra): This can cause a discharge and burning when you pee.

UTIs are a key reason why doctors tell women to wipe from front to back after using the bathroom. The urethra – the tube that takes pee from the bladder to the outside of the body – is close to the anus. Bacteria from the large intestine, such as E. coli, can sometimes get out of your anus and into your urethra. From there, they can travel up to your bladder and, if the infection isn't treated, can continue on to infect your kidneys. Most UTIs are caused by E. coli bacteria.

Women and people with female anatomy have shorter urethras than men and people with male anatomy. That makes it easier for bacteria to get to their bladders. 


Some women are more likely to get UTIs because of their genes. The shape of their urinary tracts makes others more likely to be infected. Women with diabetes may be at higher risk because their weakened immune systems make them less able to fight off infections. 

Other risk factors include:

  • A previous UTI
  • Being sexually active (sex can put vaginal bacteria into your urinary tract)
  • Age (children and the elderly are more likely to get UTIs)
  • Menopause (causes change in bacteria inside the vagina)
  • Pregnancy (causes hormone changes in the urinary tract)
  • Using spermicide (causes a change in bacteria inside the vagina)
  • Using a diaphragm (inserting it with your hand may add bacteria to your vagina)
  • Enlarged prostate
  • Potty training
  • Catheters
  • Anything that affects urine flow, such as kidney stones, a stroke, or a spinal cord injury
  • Multiple sclerosis

The most common risk factors for recurring UTIs in women who aren't in menopause are: 

  • Having sex three or more times per week
  • Spermicide use
  • New or multiple sex partners
  • Having a UTI before age 15

UTIs in Men

Urinary tract infections are quite rare in young men and young people with male anatomy. They're more common in men over 50 because they may have an enlarged prostate gland. If enlarged, the prostate (a gland near the bottom of the bladder) can block urine flow from the bladder. This means the bladder doesn't empty completely, increasing the chance that bacteria will grow and cause an infection.

Other risk factors for men include:

  • Practicing anal intercourse
  • Being uncircumcised
  • Partial blockage of the urethra
  • A catheter tube inserted to relieve a partial blockage of the urethra

UTIs in Gender Diverse People

One study found that UTI rates among gender diverse people assigned female at birth who were now on testosterone (GDT) were comparable to those of cisgender women. Diabetes was a risk factor for UTI frequency among ciswomen but not among GDT.

UTIs in Menopause

UTIs increase after menopause because of the drop in your estrogen level. Estrogen does a lot for your body, including:

  • Helping the tissues in your vagina and urethra stay moist
  • Keeping the muscles of your urethra strong
  • Raising the level of healthy bacteria in your vagina and bladder

With the loss of estrogen, you have less healthy bacteria around, which means you're more prone to bacterial infections, like a UTI. If you've had more than three in a year or two in 6 months, let your doctor know. They may need to do some tests to make sure your entire urinary system is healthy. They may also prescribe a vaginal estrogen cream as well as antibiotics.



If you suspect that you have a urinary tract infection, go to the doctor. They'll give you one of three tests to confirm a urinary tract infection diagnosis:

Urine dipstick. This is a fast way of testing, as you get results almost right away. A  nurse or lab tech dips a thin plastic strip with chemicals on it into a cup of your urine. The chemicals will change color if there are white blood cells or bacteria in the urine. 

Urinalysis. A sample of your pee is sent to a lab, where it is checked under a microscope for signs of a UTI, such as the presence of white blood cells, blood, or bacteria. This test might be done if the dipstick test was negative but you still had symptoms of a UTI, or there was some other test abnormality. 

Urine culture. If you've had several UTIs, or the treatment isn't working, you may have a urine culture done. In this test, the lab tech lets the bacteria in your urine sample grow to determine what kind of bacteria is infecting you. This usually takes 1-2 days to grow, plus a few more days for the doctor to get the results. Different antibiotics may be tested against the bacteria to see which ones work. 

Other UTI tests

If you get frequent UTIs and your doctor suspects a problem in your urinary tract, they might take a closer look with:

Ultrasound: This shows a picture of your kidneys and bladder using sound waves.

Cystoscopic exam (cystoscopy): A long, flexible tube with a lens called a cystoscope looks inside your urethra and bladder. During this exam, the doctor might take out a small piece of bladder tissue to check for cancer or other conditions.

Urodynamics: These tests figure out if the bladder is working properly.

IVP (intravenous pyelogram): A dye is injected into a vein, and a technician looks at X-ray images to see how fast the dye moves from kidney to ureter to bladder. If it moves too slowly, that could mean a blockage or other problem in your kidneys.

CT scan: This creates 3D images of your kidney and may be done at the same time as the IVP, since both tests use contrast dye.

Your doctor might also order a blood test (complete blood count) if they suspect an upper-tract UTI. This is to ensure the infection hasn't spread to your bloodstream.


There aren't any over-the-counter pills that treat UTIs. Most often, you're given prescription drugs, mainly antibiotics, to treat them.

Urinary tract infection medication

Antibiotics usually work in 3 days to 6 weeks. As always, be sure to take all of your prescribed medicine, even after you start to feel better. Popular antibiotics include:

  • Amoxicillin (Amoxil)
  • Cephalosporins (Biocef, Keflex)
  • Doxycycline (Adoxa, Monodox)
  • Fluoroquinolones (Cipro, Levaquin)
  • Fosfomycin (Monurol)
  • Nitrofurantoin (Furadantin, Macrobid, Macrodantin)
  • Trimethoprim-sulfamethoxazole (Bactrim)

If you're pregnant with a kidney infection, have a high fever, serious pain, or can't keep food or liquids down, you may need to go to a hospital and get intravenous (IV) antibiotics and fluid. Once you start to get better, you'll go home and continue taking antibiotic pills. Usually the whole course of treatment takes 5-10 days. 

The antibiotics given by IV include some of the same types given as pills, such as carbapenems, cephalosporins, fluoroquinolones, and penicillin.

People with compromised immune systems can have viral infections in their urinary tract, from viruses like HIV or SARS-CoV-2 (COVID), as well as after organ or stem cell transplants. Although rarer, UTIs with a high load of viruses can have a high risk of death, unlike bacterial UTIs. Treatment consists of giving antiviral drugs, which depend on the type of virus you have. In some cases, there's no specific drug available to treat the virus.

Antibiotic-resistant UTIs

UTIs are very common in women, which means that a lot of antibiotics have been prescribed. Doctors are finding out that many of the commonly prescribed antibiotics no longer work against the bacteria in UTIs. One study found that 80% of urine samples that showed UTIs were resistant to at least two commonly prescribed antibiotics, including amoxicillin/clavulanic acid, ampicillin, piperacillin, and trimethoprim/sulfamethoxazole.

The resistance is due to overuse of antibiotics. People sometimes take them for viral illnesses, like a cold or flu, though they don't work. People also often don't finish their full course of antibiotics, stopping as soon as they start to feel better. This put bacteria "under pressure" without killing them off, so they mutate in order to survive, thus becoming resistant to that particular antibiotic. 

If oral antibiotics don't work, then you'll likely have to go to a hospital to get IV treatments, which cost extra time and money. So, be sure to finish your course of oral antibiotics to ensure your infection is fully clear and to reduce the risk of antibiotic resistance and a return of your UTI.

Other tips for treating urinary tract infections

  • Take an over-the-counter medicine (like Uristat) or a prescription drug (like phenazopyridine) to reduce the burning pain in the bladder. Take it for no more than 2 days. This won't treat the UTI – you still need an antibiotic for that. 
  • For fever and pain, take acetaminophen (Tylenol) or ibuprofen (Aleve, Motrin).
  • You might find a heating pad helpful.
  • Drink lots of water to help flush the bacteria from your body. 

Cranberry juice is often promoted to prevent or treat UTIs. The red berry contains a tannin that might prevent E. coli bacteria – the most common cause of urinary tract infections – from sticking to the walls of your bladder, where they can cause an infection. But research hasn’t found that it does much to reduce infections. Neither has evidence been found to recommend cranberry pills or extracts.

D-mannose is a sugar naturally found in fruits like cranberries and apples. It works by blocking the E. coli bacteria from latching on to cells in the urinary tract. D-mannose is sold as a supplement to treat UTIs. The available studies appear to show that D-mannose can treat UTIs, but the studies weren't of the highest quality. So experts aren't recommending it for now. But if you have recurring UTIs, you could try D-mannose along with an antibiotic.

Scientists are also looking into vaccines for preventing UTIs. One, MV140, was approved in Australia, Mexico, and the U.K. under the brand name Uromune. It is not yet approved in the U.S. You spray it under the tongue every day for 3 months. It can prevent recurring UTIs for up to a year. 

One study showed that 15% of men had a recurring UTI. About 26% of women have had a second urinary tract infection, and some have them again and again. If you have three or more UTIs a year or two in 6 months, this means you have a recurrent urinary tract infection.

In most cases, each infection is brought on by a different type or strain of bacteria. But some bacteria can invade your body's cells and multiply, creating a colony of antibiotic-resistant bacteria. They then travel out of the cells and re-invade your urinary tract.


If you have repeated (chronic) UTIs, ask your doctor to recommend a treatment plan. Some options include taking:

  • A low dose of an antibiotic over a longer period to help prevent repeat infections
  • A single dose of an antibiotic after sex, which is a common infection trigger
  • Antibiotics for 1 or 2 days every time symptoms appear
  • A non-antibiotic prophylaxis treatment (This could include cranberry products, D-mannose, methenamine with vitamin C, or vaginal estrogen cream in menopausal women.)

At-home urine tests, which you can get without a prescription, can help you decide whether you need to call your doctor. If you're taking antibiotics for a UTI, you can test to see whether they've cured the infection (although you still need to finish your prescription). 

Here are some UTI prevention tips:

  • Wash your hands before using the toilet or getting into the shower.
  • Empty your bladder often, as soon as you feel the need to pee; don't rush, and be sure you've emptied your bladder completely.
  • Wipe from front to back after you use the toilet. And don't wipe back and forth with the same toilet paper. This is a good practice even though studies don't show it affects the recurrence of UTIs.
  • Drink lots of water. Six to eight glasses daily is ideal.
  • Choose showers over baths. Baths allow bacteria from the skin to enter the urethra.
  • Avoid loofahs and bath sponges, which can retain bacteria even after being washed. Use a washcloth instead. 
  • Use a gentle non-scented liquid soap rather than a bar soap at bath time.
  • Wash your urethral area first (when the washcloth is clean) before the rest of your body. Use a single front-to-back swipe.
  • Stay away from feminine hygiene sprays, scented douches, and scented bath products; they'll only increase irritation.
  • Cleanse your genital area before sex.
  • Pee after sex to flush out any bacteria that may have entered your urethra.
  • If you use a diaphragm, unlubricated condoms, or spermicidal jelly for birth control, you may want to switch to another method. Diaphragms can increase bacteria growth, while unlubricated condoms and spermicides can irritate your urinary tract. All can make UTI symptoms more likely.
  • Use a water-based lubricant during sex.
  • Keep your genital area dry by wearing cotton underwear and loose-fitting clothes. Don’t wear tight jeans and nylon underwear; they can trap moisture, creating the perfect environment for bacteria growth.
  • Drink cranberry juice or take cranberry extracts. While the evidence that these can cure a UTI is small, there's more evidence that they can help prevent a recurring one. 
  • Take extra vitamin C to increase your resistance to infections.
  • Women past menopause may be prescribed a vaginal estrogen cream to increase resistance to infections.
  • Try methenamine hippurate. This prescription drug is not an antibiotic and so can't treat UTIs. But it can prevent them from returning, as it can stop the growth of bacteria, according to some studies. 
  • Try D-mannose supplements. Studies are not definitive yet, but some show these can prevent UTIs from returning. The correct dose is undetermined, but 500 milligrams twice a day is often suggested.

Most of the time, UTIs don't cause serious problems. But if your urinary tract infection isn't treated, you could have:

  • Repeated infections 
  • Permanent kidney damage from a kidney infection
  • Narrowed urethra (in men)
  • Sepsis, a life-threatening inflammation of the body

Pregnancy and UTI

About 8% of pregnant people will have UTIs. You're more at risk if you:

  • Have a history of previous UTIs
  • Have diabetes
  • Already had babies 
  • Have a low income

If untreated, there's a chance of getting a kidney infection, which is linked to:

  • Delivering your baby prematurely
  • Having a baby with a low birth weight

Treatment is usually a course of antibiotics for 3 to 7 days. Not all antibiotics can be taken during pregnancy.

Urinary tract infections (UTIs) are very common among women and those with female anatomy. This is because the urethra – the tube that takes pee from the bladder to the outside of the body – is close to the anus, where E. coli bacteria live. The treatment is usually antibiotics. Be sure to take them the number of days your doctor tells you you to, and don't stop early. 

What lifestyle factors cause UTIs?

You can lessen your chances of getting a UTI by wiping your bottom from front to back, especially after pooping; drinking lots of water; urinating after sex; drinking cranberry juice or taking cranberry supplements; and peeing as soon as you feel the urge.

How long does a UTI last?

If untreated, a UTI may clear up by itself in a week. This happens about 20% of the time, particularly if you start drinking lots of water. But there's also the chance that the UTI will travel up to the kidneys if untreated and cause more problems. It's much safer to take a course of antibiotics, which should clear up the infection in 3-5 days.

Can you have a urinary tract infection without pain?

Yes. Although most of the time you have burning or pain when you pass urine, it's possible to have a UTI without symptoms. It's more common in elderly people or those who use a catheter. This type of bladder infection is called asymptomatic bacteriuria.