How do infections or sexually transmitted diseases (STDs) affect male fertility?

Most men assume that once the symptoms of an STD clear, the story ends. But chlamydia and gonorrhea, two of the most common sexually transmitted infections, can leave behind a quiet, undetected scar: a blockage inside the epididymis that stops sperm from getting out. A man can ejaculate normally and still have zero sperm in his semen, only discovering the issue when attempting to conceive. Research shows that infections are among the leading preventable causes of male infertility worldwide, and the mechanism is more straightforward than you might think.

This post lays out exactly how infections and STDs impact male fertility, which specific pathogens to know about, and what current evidence says about protecting your reproductive future. As always, this is information, not medical advice. If you have a history of infections and fertility is on your mind, a urologist or fertility specialist is your best next stop.

The Mechanisms: Obstruction, Orchitis, and Oxidative Stress

Infections can disrupt male fertility through three main routes. Understanding them makes it easier to see why some infections matter more than others and why timing of treatment is critical.

Obstruction of the sperm highway. Sperm are produced in the testicles and then travel through a tightly coiled tube called the epididymis, where they mature. From there, they move through the vas deferens and eventually mix with fluid from the seminal vesicles and prostate to become semen. A bacterial infection, particularly in the epididymis (epididymitis) or vas deferens, can trigger inflammation that heals with scar tissue. That scarring can physically block the tube, trapping sperm on the production side. If both sides are blocked, azoospermia (no sperm in the ejaculate) results. The World Health Organization identifies untreated Chlamydia trachomatis and Neisseria gonorrhoeae as major causes of this type of obstructive infertility globally.

Direct damage to sperm production. Some infections don’t just block the pipes-they attack the factory itself. A classic example is the mumps virus. When mumps infects the testicles (orchitis) in post-pubertal males, it can cause widespread inflammation inside the seminiferous tubules, where sperm are manufactured. The swelling can cut off blood flow and destroy sperm-producing cells, sometimes leading to testicular shrinkage (atrophy) and lasting impairment of sperm production. Viral orchitis can trigger a similar pattern, though mumps is the most thoroughly studied.

Inflammation and oxidative stress. Even when an infection doesn’t fully block a tube or destroy tissue outright, the immune response can leave a cloud of chronic inflammation. White blood cells flooding into the reproductive tract release reactive oxygen species-unstable molecules that damage sperm DNA, membranes, and motility. This condition, called leukocytospermia, is often found in men with chronic prostatitis or long-standing genital tract infections. A 2019 study in Fertility and Sterility found that men with elevated white blood cells in their semen had significantly higher sperm DNA fragmentation, a known contributor to failed fertilization and early pregnancy loss. The damage continues at a microscopic level long after the initial infection fades.

Chlamydia and Gonorrhea: The Top Culprits

Both bacteria can ascend from the urethra into the epididymis and testicles, often without dramatic symptoms. A man might notice mild testicular discomfort, a subtle ache, or nothing at all. Yet inside, the bacteria trigger an inflammatory cascade that wraps the delicate tubules in scarring tissue.

A 2017 review in Andrology pooled data from multiple studies and found that men with a history of chlamydia infection had, on average, lower sperm motility and concentration compared to uninfected controls. Another study followed men with acute epididymitis caused by chlamydia and found that even after antibiotic treatment cleared the bacteria, some men still developed obstructive azoospermia months later because the architectural damage was already done. The takeaway from the research is consistent: early antibiotic treatment reduces the odds of severe scarring, but once a block forms, it often requires surgical reconstruction or sperm retrieval techniques to restore fertility.

Gonorrhea acts similarly, and co-infections are common. While both infections are curable with antibiotics, the window for preserving future fertility is finite-facts that public health data link to higher infertility rates in regions with limited access to testing and treatment.

Mumps: Why a Childhood Virus Still Matters

Before the MMR vaccine, mumps orchitis was a well-documented cause of male subfertility. A 2006 review by Masarani et al. in the Journal of the Royal Society of Medicine noted that mumps orchitis occurs in roughly 20-30% of post-pubertal males who contract the virus, and when it affects both testicles, up to half of those men will experience some degree of testicular atrophy and reduced sperm production. A more recent paper in Human Reproduction Update (2022) stated that bilateral mumps orchitis remains a significant cause of severe oligospermia or azoospermia in adulthood, though vaccination has dramatically lowered its prevalence in many countries.

The damage occurs acutely: intense swelling within the rigid capsule of the testicle cuts off venous return, leading to ischemic injury that destroys seminiferous tubules. The outcome depends on how quickly the inflammation subsides. Sperm parameters can recover partially over months to years, but severe atrophy is often permanent. For men born before the vaccine era or those unvaccinated, this is a real fertility variable.

Ureaplasma, Mycoplasma, and Chronic Prostatitis

A group of smaller, less well-known bacteria-Ureaplasma urealyticum, Mycoplasma genitalium, and others-can colonize the male urogenital tract without causing obvious symptoms. Their role in fertility is messier and less settled than that of chlamydia or gonorrhea. Some studies report that men with these infections have lower sperm motility, worse morphology, and higher DNA fragmentation rates. Others find no clear association after controlling for other factors.

In 2020, a meta-analysis in Andrologia concluded that Ureaplasma infection was linked to reduced sperm motility and concentration, but the authors emphasized that the evidence quality was moderate and that many men carrying the bacteria had normal semen parameters. Similarly, chronic prostatitis/chronic pelvic pain syndrome (CP/CPPS)-often involving a bacterial component or lingering inflammation even after bacteria are gone-has been correlated with poor sperm quality in multiple studies, though the exact causal chain remains under investigation. For men with unexplained infertility and a history of persistent pelvic discomfort, a urologist might investigate and treat for these organisms, but the science is still evolving.

HIV and Fertility: A Complex Picture

HIV can affect fertility directly and indirectly. The virus itself is associated with chronic systemic inflammation, hormonal changes (including lower testosterone levels in some untreated individuals), and poorer semen quality. Several studies, including a 2021 analysis in AIDS, showed that HIV-positive men who were not on antiretroviral therapy had lower sperm concentration and motility than controls. The introduction of effective antiretroviral therapy (ART) has improved overall health and may partially reverse semen abnormalities, though some ART drugs themselves have been linked to mitochondrial toxicity in sperm.

The fertility picture improves substantially for men who are virally suppressed and in good health. Many now father children with assisted reproductive techniques and careful sperm washing to prevent transmission to a partner or child. Men living with HIV who are planning to conceive should work closely with a fertility clinic experienced in viral infection management.

HPV: A Question Mark That Won’t Go Away

Human papillomavirus (HPV) DNA has been detected in semen from men with and without visible warts. Some research, including a 2018 study in Human Reproduction, found that HPV presence in semen was associated with increased sperm DNA fragmentation and reduced motility. Yet whether this translates to clinical infertility remains unclear. Large-scale studies have not established a firm link between HPV infection in men and time to pregnancy or live birth rates. The consensus is that HPV might tip the scales when other fertility factors are already borderline, but by itself, it’s not considered a major driver of male infertility. Vaccination against high-risk HPV strains is still recommended for overall health, but not specifically as a fertility intervention.

Can the Damage Be Reversed?

The answer depends heavily on the type and timing of the infection. Acute epididymitis caught early and treated with appropriate antibiotics often resolves without permanent obstruction. Once scar tissue forms a mechanical block, microsurgery (vasoepididymostomy) can bypass it, with patency rates exceeding 70% in experienced hands according to contemporary urology literature. If the testicles still produce sperm, surgical sperm retrieval (TESE) combined with IVF can allow biological fatherhood even when the pathway is completely blocked.

Mumps orchitis damage is more challenging to reverse. If only one testicle is affected, the healthy counterpart can often compensate, and fertility may remain normal. Bilateral atrophy with azoospermia can be managed with surgical sperm retrieval in some men, but success is not guaranteed. The best defense is prevention: childhood vaccination against mumps.

For oxidative stress from chronic genital tract inflammation, clearing the underlying infection and reducing inflammation through targeted antibiotics (if indicated) and lifestyle adjustments (reducing alcohol, improving sleep, managing other health conditions) can improve sperm DNA integrity over three to six months, the length of a full spermatogenesis cycle.

What You Can Do With This Information

You cannot control whether you contracted an infection years ago, but you can decide what to do about it now. A few steps carry the weight of the evidence:

  • Get tested if you have any doubt. Nucleic acid amplification tests (NAATs) for chlamydia and gonorrhea are non-invasive and accurate. Screening for other pathogens may be warranted depending on symptoms and history.
  • Treat infections promptly. Early antibiotic treatment reduces the risk of long-term scarring in bacterial epididymitis.
  • Don’t rely on symptoms as a guide. A significant portion of chlamydia and gonorrhea infections in men are asymptomatic. Regular screening is sensible if you have multiple sexual partners.
  • Consider a semen analysis if you’ve had a history of mumps orchitis, recurrent epididymitis, or a known STD. It’s a low-cost, non-invasive snapshot of sperm count, motility, and morphology that can either give you peace of mind or flag an issue before you try to conceive.
  • Vaccinate. The MMR vaccine prevents mumps and its fertility consequences. The HPV vaccine reduces the burden of high-risk viral strains, though its direct fertility benefit for men remains unproven.
  • Talk to a doctor. If you and a partner have been trying to conceive for a year without success (or six months if the female partner is over 35), a urologist can evaluate for past infection scarring, hormonal issues, and varicocele. Even a remote history of an STD is worth mentioning during that conversation.

Your reproductive future isn’t determined by a single past infection. For most men, even those who had a severe STD, interventions exist that can lead to biological fatherhood. The real risk is not knowing that an infection left a mark. Now you know what to ask about-and that’s the point of having the information.

Get the Sauna Playbook