MedChunk
Medically reviewed

Antibiotics for UTIs and Sexually Transmitted Infections

Learn which antibiotics treat urinary tract infections and bacterial STIs, how treatments differ, when testing is needed, and how to use antibiotics safely.

By Caleb Bennett Reviewed by Dr. Irene Medical review dateFeb 19, 2024 17 min read

Antibiotics can treat urinary tract infections (UTIs) and many sexually transmitted infections (STIs), but the right medicine depends on which germ is causing the infection. Common UTI antibiotics include nitrofurantoin, trimethoprim-sulfamethoxazole, and fosfomycin, while bacterial STIs may require medicines such as doxycycline, ceftriaxone, or penicillin. Testing and medical evaluation help healthcare professionals choose an effective treatment.

How Do Antibiotics Work for UTIs and STIs?

Antibiotics are medicines that kill bacteria or stop them from multiplying. They are used to treat bacterial infections, including many infections affecting the urinary tract and reproductive organs.

A urinary tract infection usually develops when bacteria enter the urinary system. Most UTIs affect the bladder, although some involve the kidneys. Sexually transmitted infections, on the other hand, are passed mainly through sexual contact and may affect the genitals, rectum, throat, or other parts of the body.

Although both types of infection can cause urinary discomfort, they do not necessarily respond to the same antibiotics. Some antibiotics work well against bacteria commonly responsible for bladder infections but are ineffective against bacteria that cause certain STIs.

The Centers for Disease Control and Prevention (CDC) explains that UTI symptoms can resemble those of a sexually transmitted infection. Healthcare professionals may therefore recommend additional testing when the cause of urinary symptoms is uncertain.

Which Antibiotics Are Commonly Used for UTIs?

Antibiotic treatment for a UTI depends on the location of the infection, the bacteria involved, the person's medical history, and whether complications are suspected.

For uncomplicated bacterial bladder infections, several oral antibiotics are commonly considered.

Nitrofurantoin

Nitrofurantoin is frequently prescribed for uncomplicated lower urinary tract infections. It concentrates in the urine, making it useful against many bacteria responsible for bladder infections.

It is not an appropriate treatment for kidney infections because it does not reach sufficiently effective concentrations in kidney tissue. Kidney function and other medical factors must also be considered before prescribing it.

Trimethoprim-Sulfamethoxazole

Trimethoprim-sulfamethoxazole is a combination antibiotic that can treat certain bacterial UTIs. Its suitability depends partly on local antibiotic resistance patterns and whether the bacteria are likely to respond.

Healthcare professionals also consider allergies, kidney function, possible drug interactions, and pregnancy before prescribing this medicine.

Fosfomycin

Fosfomycin is another option for selected uncomplicated bladder infections. In some circumstances, it can be given as a single oral dose.

However, it is not suitable for every type of urinary infection and is not recommended as a routine treatment for kidney infections.

Other Antibiotics for Urinary Infections

Depending on the infection and laboratory findings, clinicians may use other antibiotics, including certain penicillins, cephalosporins, or fluoroquinolones.

Fluoroquinolones, such as ciprofloxacin, are generally reserved for situations where their benefits justify their risks or other suitable options are unavailable. They can cause potentially serious adverse effects and are not preferred for routine uncomplicated bladder infections when safer effective treatments are available.

According to the National Health Service (NHS), some UTIs may improve without immediate antibiotic treatment, while others require antibiotics. A healthcare professional may prescribe a short course or, in selected circumstances, recommend a delayed prescription.

Which Antibiotics Treat Sexually Transmitted Infections?

Different STIs are caused by different organisms. Antibiotics can cure bacterial STIs, but they do not cure viral infections such as genital herpes, HIV, or human papillomavirus (HPV).

Several important bacterial STIs require specific antibiotic treatments.

Chlamydia: Doxycycline and Other Options

Chlamydia is a bacterial sexually transmitted infection caused by Chlamydia trachomatis. It may affect the cervix, urethra, rectum, or throat. Many people have no noticeable symptoms.

Doxycycline is a recommended treatment for uncomplicated chlamydia in nonpregnant adolescents and adults. The commonly recommended regimen is 100 mg taken by mouth twice daily for seven days.

Other antibiotics, including azithromycin, may be considered in specific circumstances. During pregnancy, azithromycin is generally the recommended treatment because doxycycline is not suitable during parts of pregnancy.

The CDC's chlamydia treatment guidance recommends doxycycline for most uncomplicated infections in adolescents and adults and explains why alternative treatments may be necessary in certain situations.

Gonorrhea: Ceftriaxone

Gonorrhea is caused by Neisseria gonorrhoeae. It can infect the genitals, rectum, and throat.

Ceftriaxone, an injectable cephalosporin antibiotic, is the preferred treatment for uncomplicated gonorrhea under CDC guidance. The dose depends on factors such as body weight and the site of infection.

If chlamydia has not been ruled out, a healthcare professional may also prescribe an appropriate treatment for chlamydia.

Antibiotic resistance is an important concern in gonorrhea care. Some antibiotics previously used for this infection are no longer recommended as routine treatment because resistant strains have become more common.

The CDC's gonorrhea treatment guidelines identify ceftriaxone as the recommended treatment for uncomplicated gonorrhea and provide additional guidance for throat infections, follow-up testing, and possible treatment failure.

Syphilis: Penicillin

Syphilis is a bacterial infection caused by Treponema pallidum. It develops in stages and may cause serious health complications without treatment.

Penicillin G is the preferred antibiotic for syphilis. Benzathine penicillin G, given by injection, is commonly used for early syphilis and certain later stages.

The number of injections and treatment schedule depend on the infection's stage. Syphilis affecting the nervous system, eyes, or ears requires a different treatment approach, usually involving intravenous penicillin.

Pregnancy requires particular attention because untreated syphilis can affect the developing baby. Penicillin is the established effective treatment for preventing congenital syphilis, and people with penicillin allergy may need specialist-managed desensitization.

The CDC's syphilis treatment guidance identifies penicillin G as the preferred treatment and emphasizes that the preparation and duration must match the stage and clinical features of the infection.

Trichomoniasis: Metronidazole or Tinidazole

Trichomoniasis is a sexually transmitted infection caused by a parasite rather than bacteria. However, it is treated with antimicrobial medicines, most commonly metronidazole or sometimes tinidazole.

The recommended treatment schedule differs between men and women. Sexual partners generally need treatment as well to reduce the risk of reinfection.

These medicines are not interchangeable with ordinary bladder infection antibiotics, and treatment should be based on an appropriate diagnosis.

Can the Same Antibiotic Treat a UTI and an STI?

Sometimes an antibiotic has activity against more than one type of bacteria, but a medicine prescribed for a UTI should not be assumed to treat an STI.

For example, nitrofurantoin is useful for certain bladder infections but does not adequately treat chlamydia, gonorrhea, or syphilis. Similarly, doxycycline is commonly used for chlamydia but is not a routine first-choice treatment for uncomplicated bacterial bladder infections.

A person can also have a UTI and an STI at the same time. When testing identifies separate infections, more than one antibiotic or a combination of treatments may be needed.

Using leftover antibiotics or choosing a medicine based only on symptoms can lead to incomplete treatment, unwanted side effects, or delays in receiving appropriate care.

How Can Doctors Tell Whether It Is a UTI or an STI?

UTIs and STIs sometimes produce similar symptoms, particularly when they involve the urethra, the tube that carries urine out of the body.

Examples of symptoms that may occur with either condition include:

  • Burning or pain during urination
  • Discomfort around the lower abdomen or pelvis
  • Urinary urgency or changes in urination patterns
  • Irritation around the genital area

Other experiences, such as unusual genital discharge, pain during sex, or genital sores, may prompt an evaluation for an STI. Fever, chills, or pain around the back or side may raise concern about a more extensive urinary infection.

Symptoms alone cannot reliably identify the infection or determine which antibiotic will work.

Urine Testing and Urine Culture

A urine test can help identify evidence of a urinary tract infection. A urine culture may identify the bacteria responsible and help determine which antibiotics are likely to be effective.

Urine cultures are particularly useful when infections recur, treatment does not work as expected, or resistant bacteria are suspected.

STI Testing

Chlamydia and gonorrhea are commonly diagnosed using nucleic acid amplification tests (NAATs), which detect genetic material from the organisms.

Depending on the suspected infection and sexual exposure, testing may involve urine samples or swabs from the vagina, throat, rectum, or other relevant sites.

Syphilis is usually evaluated using blood tests, sometimes alongside examination or additional testing.

A healthcare professional considers symptoms, sexual history, medical history, examination findings, and relevant test results when deciding whether treatment is needed.

How Long Does Antibiotic Treatment Usually Last?

Antibiotic courses vary according to the infection, the prescribed medicine, and individual circumstances.

For uncomplicated bladder infections, treatment may involve a single dose of a suitable antibiotic or several days of tablets. Kidney infections generally require a longer treatment course and sometimes intravenous antibiotics.

For bacterial STIs, treatment schedules also vary. Uncomplicated chlamydia is commonly treated with a seven-day course of doxycycline, while uncomplicated gonorrhea often requires a single ceftriaxone injection. Syphilis treatment can involve one or more penicillin injections depending on the stage.

These examples describe common clinical approaches, not prescriptions for an individual patient. The exact dose and duration should follow a healthcare professional's instructions.

What Should You Know Before Taking Antibiotics?

Antibiotics are most effective when used for an infection they can treat and taken according to the prescribed schedule.

Take the Medicine Exactly as Prescribed

Follow the instructions for dose, timing, and treatment duration. Do not stop early, extend treatment, or change the dose without discussing it with the prescriber.

If a dose is missed, follow the medicine's patient information or ask a pharmacist how to proceed. Taking extra doses to compensate may increase the risk of adverse effects.

Tell Your Clinician About Allergies and Other Medicines

Antibiotic selection may be affected by previous allergic reactions, kidney or liver problems, pregnancy, breastfeeding, and other medicines or supplements.

Some antibiotics interact with antacids, mineral supplements, blood thinners, or other prescribed medicines. A pharmacist can explain how to take the specific antibiotic safely.

Watch for Side Effects

Common antibiotic side effects can include nausea, diarrhea, stomach discomfort, and skin reactions.

Some medicines have additional precautions. For example, doxycycline may irritate the esophagus and increase sensitivity to sunlight. Certain antibiotics may cause more serious reactions in people with particular medical conditions.

Seek emergency care for symptoms of a serious allergic reaction, such as difficulty breathing, swelling of the tongue or throat, or fainting. Severe or persistent diarrhea during or after antibiotic treatment also requires medical evaluation.

Why Is Antibiotic Resistance Important?

Antibiotic resistance develops when bacteria become less responsive or no longer respond to medicines that previously worked against them.

Resistance can make both urinary infections and bacterial STIs harder to treat. In some cases, laboratory testing helps clinicians identify an antibiotic that remains effective.

Using antibiotics when they are not needed, taking them incorrectly, or sharing prescription medicines can contribute to inappropriate antibiotic use.

Not every positive urine test requires antibiotics. For example, bacteria may sometimes be present in urine without causing symptoms, a situation known as asymptomatic bacteriuria. Treatment is generally unnecessary except in specific circumstances, such as pregnancy or before certain urological procedures.

Appropriate antibiotic use helps reduce unnecessary side effects while preserving effective treatment options.

Do Sexual Partners Need Antibiotic Treatment?

Partner management is an important part of treating many sexually transmitted infections because untreated partners may continue transmitting the infection or cause reinfection after treatment.

For infections such as chlamydia, gonorrhea, and trichomoniasis, sexual partners may need testing, evaluation, and treatment even when they have no symptoms.

The approach depends on the infection, the timing of exposure, pregnancy status, and local medical guidelines.

People receiving treatment for chlamydia are generally advised to avoid sexual intercourse until the recommended treatment period is complete, symptoms have resolved, and relevant partners have been treated. For gonorrhea, abstinence is generally recommended for at least seven days after treatment and until partners are treated.

Ordinary UTIs are not usually sexually transmitted, so sexual partners generally do not require antibiotic treatment solely because someone has a bladder infection.

Are Antibiotics Different During Pregnancy or for Children?

Antibiotic choice requires additional care during pregnancy and childhood because medication safety, dosing, and infection-related risks may differ.

UTI Treatment During Pregnancy

Pregnant patients with a suspected UTI should receive timely medical assessment. Some urinary infections during pregnancy require treatment even when symptoms are absent.

Healthcare professionals select antibiotics based on pregnancy stage, urine testing, allergies, and other clinical factors. Medicines that are appropriate for one stage of pregnancy may not be suitable at another.

STI Treatment During Pregnancy

Several STIs require prompt treatment during pregnancy because they can affect both the pregnant patient and the developing baby.

For example, azithromycin is generally recommended for chlamydia during pregnancy, while penicillin is the established treatment for syphilis. Treatment plans and follow-up testing may differ from those used for nonpregnant adults.

Antibiotics for Children and Adolescents

Children with UTIs may need different antibiotic doses, treatment durations, and investigations depending on their age and medical condition.

Antibiotic doses are often based on body weight, and certain medicines may not be suitable for young children.

Adolescents diagnosed with STIs may receive treatments similar to adult regimens, with adjustments when clinically necessary. Confidential and age-appropriate sexual health services are important for ensuring timely diagnosis and treatment.

What Happens if Symptoms Continue After Antibiotics?

Many people begin to feel better after starting an effective antibiotic, but symptom improvement does not always mean that the infection has been fully treated.

If urinary symptoms worsen or do not begin improving within about 48 hours after starting treatment, medical reassessment is appropriate. Possible explanations include an antibiotic-resistant organism, a different infection, or a condition requiring additional investigation.

For STIs, persistent symptoms may result from reinfection, incomplete treatment, another infection, or, less commonly, antibiotic treatment failure.

Follow-up testing depends on the specific STI. For example, repeat testing for chlamydia and gonorrhea is commonly recommended around three months after treatment because reinfection can occur. Certain infections or circumstances require earlier testing to confirm successful treatment.

Do not automatically repeat the same antibiotic without medical advice. Further examination or testing may be needed to identify the cause of ongoing symptoms.

When Should You Seek Medical Care?

Arrange a medical evaluation when urinary symptoms persist, recur, become disruptive, or occur after possible exposure to an STI.

More urgent assessment is appropriate if symptoms are accompanied by:

  • Fever, chills, or shaking
  • Pain in the back or side, especially near the ribs
  • Vomiting or difficulty keeping fluids down
  • Significant pelvic or testicular pain
  • Blood in the urine
  • Rapidly worsening symptoms

Confusion, marked drowsiness, fainting, or signs of serious illness require emergency assessment.

People who are pregnant, have weakened immune systems, have urinary catheters, or have significant kidney conditions should seek prompt professional advice about suspected urinary infections.

Early assessment of a possible STI is also important, particularly after known exposure or when symptoms involve genital discharge, sores, pelvic pain, or testicular discomfort.

How Can You Reduce the Risk of Future Infections?

Preventive measures differ because UTIs and STIs are transmitted or develop in different ways.

Reducing UTI Risk

Helpful measures may include staying adequately hydrated, avoiding prolonged delays in urination, and discussing recurrent infections with a healthcare professional.

For some people with repeated UTIs, clinicians may recommend specific preventive treatments based on medical history and risk factors. Preventive antibiotics are not appropriate for everyone.

Reducing STI Risk

Using condoms correctly, discussing STI testing with sexual partners, and obtaining recommended screening can help reduce the likelihood of infection and transmission.

Completing prescribed treatment and following partner-treatment advice are particularly important for preventing reinfection.

People with repeated STI exposures may benefit from a discussion about vaccination, preventive services, and individualized sexual health screening.

Choosing the Right Antibiotic Matters

Antibiotics are effective treatments for many urinary tract infections and bacterial sexually transmitted infections, but there is no single antibiotic that reliably treats every condition.

Bladder infections, kidney infections, chlamydia, gonorrhea, and syphilis may require different medicines and treatment schedules. Accurate testing, appropriate antibiotic selection, and correct use are essential for successful care.

When symptoms overlap or treatment does not work as expected, professional evaluation can help identify the infection and prevent unnecessary or ineffective antibiotic use.

Frequently Asked Questions

Common questions about antibiotics used for urinary tract infections and sexually transmitted infections.

Can UTI antibiotics also cure chlamydia or gonorrhea?

Most antibiotics commonly prescribed for uncomplicated UTIs do not reliably treat chlamydia or gonorrhea. These STIs require specific antibiotics, such as doxycycline for chlamydia or ceftriaxone for gonorrhea. Testing helps determine which infection is present and whether separate treatments are needed.

How quickly should antibiotics start working for a UTI?

Symptoms of an uncomplicated UTI often begin improving within 24 to 48 hours after effective antibiotic treatment starts. Improvement can take longer in some cases. If symptoms worsen or do not begin improving within about 48 hours, contact a healthcare professional for reassessment.

Can you have a UTI and a sexually transmitted infection at the same time?

Yes. A person can have both a UTI and an STI. Because some symptoms overlap, healthcare professionals may recommend urine testing and STI testing when appropriate. Separate antibiotics may be necessary if both infections are confirmed.

Do you need antibiotics if you test positive for bacteria in your urine but have no symptoms?

Not always. Bacteria can sometimes be present in urine without causing an infection that needs treatment. This is called asymptomatic bacteriuria. Antibiotics are generally not recommended unless specific circumstances apply, such as pregnancy or preparation for certain urological procedures.

Can a sexually transmitted infection come back after antibiotic treatment?

Yes. Successful antibiotic treatment does not provide lasting immunity against bacterial STIs. Reinfection can occur after sexual contact with an infected partner, particularly if partners have not been treated. Follow-up testing, partner management, and recommended preventive measures help reduce this risk.

Citations

  1. Centers for Disease Control and Prevention (CDC) – Urinary Tract Infection Basics
  2. National Health Service (NHS) – Urinary Tract Infections (UTIs)
  3. Centers for Disease Control and Prevention (CDC) – Chlamydial Infections: STI Treatment Guidelines
  4. Centers for Disease Control and Prevention (CDC) – Gonococcal Infections Among Adolescents and Adults: STI Treatment Guidelines
  5. Centers for Disease Control and Prevention (CDC) – Syphilis: STI Treatment Guidelines
Share this article