Testicular pain in men can come from a sexually transmitted infection, but it often doesn't. The STIs most likely to cause it are chlamydia and gonorrhea, which inflame the epididymis (the coiled tube behind each testicle). The most urgent cause, though, is testicular torsion — a non-STI surgical emergency that has to be ruled out fast.

Chlamydia
curable

often silent; discharge or burning if anything

Gonorrhea
curable

discharge and burning; can also hit throat/rectum

Testicular pain: likely causes. How the usual suspects tell apart at a glance — the full breakdown is below. Source: CDC.
Testicular pain: likely causes
ItemValue
Chlamydiacurable — often silent; discharge or burning if anything
Gonorrheacurable — discharge and burning; can also hit throat/rectum

The short list of likely causes

When a man has testicular pain, a clinician thinks in two buckets at once: infections that respond to antibiotics, and structural problems that may need surgery. Among STIs, chlamydia and gonorrhea are the usual suspects because they ascend the urethra and reach the epididymis, producing epididymitis (inflammation of that tube, which feels like a deep, often one-sided ache and swelling). Among non-STI causes, the big three are torsion (a twisted spermatic cord cutting off blood flow), direct injury, and a hydrocele (a painless fluid collection around the testicle). Because these overlap so much, the only reliable way to sort them is testing and, when warranted, a physical exam or ultrasound.

Which STIs cause testicular pain

Two bacterial infections account for nearly all STI-related testicular pain in younger men. Both spread through unprotected sex and both can be present without any obvious early warning, which is why the testicle is sometimes the first place a man notices anything is wrong.

Chlamydia

Chlamydia is caused by the bacterium Chlamydia trachomatis, and most US genital infections come from serovars D–K CDC chlamydia fact sheet. It's a notoriously quiet infection: roughly half of infected men have no symptoms at all. When the bacteria do climb from the urethra into the epididymis, the result is epididymitis — typically a gradual, one-sided ache and swelling rather than a sudden stab. If symptoms appear, they usually show up within one to three weeks of exposure, sometimes alongside burning on urination or a discharge. Because the infection is so often silent, a man can pass it on and only discover it after a partner is diagnosed — which is also why a follow-up test matters, since chlamydia reinfection is common after treatment.

Gonorrhea

Gonorrhea is caused by Neisseria gonorrhoeae, which can infect the genitals, rectum, and throat CDC, About Gonorrhea. In men, the classic pattern is burning when urinating and a white, yellow, or green penile discharge; swollen or painful testicles are a less common but recognized presentation CDC gonorrhea. When gonorrhea reaches the epididymis it produces the same kind of inflammatory swelling as chlamydia, and the two infections frequently travel together. The tell-tale difference is often the discharge — gonorrhea tends to produce a more pronounced, colored discharge — but that clue is far from reliable, which is why a gonorrhea test is the only way to confirm it.

When it's NOT an STI

Plenty of testicular pain has nothing to do with sex. The causes a clinician most wants to identify quickly are these:

  • Testicular torsion — the spermatic cord twists and chokes off the testicle's blood supply. This is a surgical emergency that must be relieved within hours to save the testicle. The pain is usually sudden, severe, and one-sided, often with nausea or vomiting, and it can wake a man from sleep.
  • Injury — a direct blow or trauma can cause sharp pain and swelling that mimics infection but follows an obvious event.
  • Hydrocele — a collection of fluid around the testicle that causes painless or only mildly uncomfortable swelling, more a sense of heaviness than true pain.

Other non-STI causes exist too, but torsion is the one that changes everything: if there's any chance the cord is twisted, that question gets answered before anyone worries about which infection might be present.

How to tell them apart

You can't, reliably, on your own — and that's the honest bottom line. These conditions overlap too much to separate by sight or feel alone, and several are frequently silent. Still, some patterns push toward one cause over another. Torsion tends to come on abruptly and intensely, often without urinary symptoms. STI epididymitis tends to build more gradually and may travel with burning urination or discharge. A hydrocele swells without much pain. But because a man can have an STI and an unrelated structural problem at the same time, the discriminating features narrow the field rather than close the case. The symptom is the guess; the test is the answer.

Side-by-side comparison

CauseOnsetTypical feelOther cluesUrgency
Chlamydia (epididymitis)Gradual; symptoms (if any) 1–3 weeks after exposureOne-sided ache and swellingOften silent; may have burning urinationSee promptly; treatable with antibiotics
Gonorrhea (epididymitis)GradualOne-sided ache and swellingWhite/yellow/green discharge; burning urinationSee promptly; treatable with antibiotics
Testicular torsionSudden, often severeIntense, one-sided painNausea/vomiting; can wake from sleepEmergency — ER now, hours matter
InjurySudden, after a blowSharp pain, swellingClear inciting eventGet seen if severe or persistent
HydroceleSlowPainless heaviness/swellingNo urinary or discharge symptomsNon-urgent; evaluate routinely

How it's tested

For the STI side, the recommended method is a nucleic acid amplification test (NAAT), which detects bacterial genetic material from a urine sample or a self-collected swab CDC STI Treatment Guidelines, 2021. NAAT is highly accurate — for gonorrhea, sensitivity is usually above 90% with specificity around 99%. In practice, testing means a urine cup, a quick swab, or a brief exam depending on what's suspected, and it's free or low-cost at health departments, Planned Parenthood, and Title X clinics, with results usually back in a few days. You can read the full step-by-step on how to get tested, and if your exposure was recent, check when to test after exposure so you don't test too early to be accurate.

What to do next

If the pain is mild and gradual and you suspect an STI, get tested and get treated — bacterial epididymitis from chlamydia or gonorrhea clears with antibiotics, and your recent partners should be treated too. If the pain is sudden and severe, skip the testing question entirely and go to an emergency room to rule out torsion first. Don't wait to see whether it settles on its own; with torsion, the window to save the testicle is measured in hours, not days.

Red flags — when to get seen urgently

Go to an emergency room now, not a clinic later, if you have any of these:

  • Sudden, severe testicular pain — especially if it woke you from sleep.
  • Pain with nausea or vomiting.
  • A testicle that looks higher, sits at an odd angle, or is dramatically swollen.
  • Pain after an injury that doesn't ease.
  • Fever with testicular pain, or pain that's rapidly getting worse.

None of these means torsion for certain, but each is reason enough to have a doctor examine you the same day. The cost of an unnecessary ER trip is far smaller than the cost of a missed twist.