For general information only. This library does not replace advice, diagnosis or treatment from a qualified health professional. In an emergency, call 911.

Library / Conditions

Epididymitis

Epididymitis is swelling and pain of the epididymis, the coiled tube behind the testicle, usually caused by a bacterial infection such as a sexually transmitted infection.

Clinician view: includes diagnostic criteria, management and safety detail.

Overview

Epididymitis is inflammation (swelling and irritation) of the epididymis. The epididymis is a tightly coiled tube that sits at the back of each testicle. It stores sperm and carries it to the vas deferens, the tube that takes sperm toward the penis.

When the epididymis becomes inflamed, the scrotum on one side usually becomes painful, swollen, warm and tender. The swelling can spread to the testicle itself. When both the epididymis and the testicle are inflamed, doctors call it epididymo-orchitis.

Most cases are caused by bacteria. In younger, sexually active people, the most common causes are sexually transmitted infections (STIs). In older people, the cause is more often bacteria from a urinary tract infection. The good news is that epididymitis usually gets better with the right antibiotics, rest and pain relief.

Doctors group epididymitis into two types:

  • Acute epididymitis starts suddenly and lasts less than 6 weeks. This is the most common type.
  • Chronic epididymitis causes pain or discomfort in the epididymis that lasts 6 weeks or longer, often with little or no swelling.

Sudden pain in the testicle can also be a sign of testicular torsion, a twisting of the testicle that cuts off its blood supply. Torsion is an emergency. Because the two can look alike, sudden severe testicle pain should always be checked right away.

Symptoms

Symptoms of acute epididymitis often build up over a day or two. They usually affect one side only. Common symptoms include:

  • Pain in the scrotum or testicle, which may spread to the groin or lower belly
  • Swelling, redness or warmth of the scrotum
  • A tender, swollen lump at the back or top of the testicle
  • Pain or burning when you pee
  • Needing to pee more often or more urgently
  • Fluid (discharge) from the tip of the penis
  • Pain during sex or when you ejaculate
  • Blood in the semen
  • Fever, chills or feeling generally unwell

Chronic epididymitis tends to cause a dull ache or discomfort in the scrotum that comes and goes or lingers. It may get worse with long periods of sitting, exercise or sex.

Causes

Most epididymitis happens when germs travel backward from the urethra (the tube that carries urine and semen out of the body) or the bladder, up the vas deferens and into the epididymis.

Sexually transmitted infections

In sexually active people under about 35, the most common causes are chlamydia and gonorrhea. These infections often cause few or no symptoms in the urethra, so you may not know you have one until epididymitis appears.

Bowel and urinary bacteria

Bacteria that normally live in the gut, such as E. coli, can cause epididymitis. This is more common:

  • In people over 35
  • After a urinary tract infection or a prostate infection
  • When the bladder does not empty well, for example because of an enlarged prostate
  • After procedures such as a urinary catheter, a scope test of the bladder or prostate surgery
  • In people who have insertive anal sex

Other causes

  • Mumps, a viral infection, can cause orchitis (inflammation of the testicle), sometimes with epididymitis.
  • Tuberculosis and some fungal infections are rare causes, more often in people with weak immune systems.
  • Injury to the groin can cause inflammation without infection.
  • Some medicines, most notably amiodarone (a heart rhythm medicine), can rarely cause non-infectious epididymitis.
  • Some inflammatory conditions, such as Behçet's disease, can affect the epididymis.

In children, epididymitis is less common. It may be linked to a urinary tract infection, a problem with how the urinary tract formed, or inflammation after a viral illness.

Risk factors

You may be more likely to get epididymitis if you:

  • Have sex without condoms, especially with new or multiple partners
  • Have a partner with an STI
  • Have had an STI or epididymitis before
  • Have an enlarged prostate or other problem that makes it hard to empty your bladder
  • Have had recent urinary tract surgery, a catheter or a scope test
  • Have a urinary tract that formed differently from birth
  • Have not had the mumps vaccine

Diagnosis

Your health care provider will ask about your symptoms, your sexual history and any recent urinary problems or procedures. These questions are private and help find the right cause and treatment.

They will gently examine your scrotum, testicles and groin. They may also check your prostate with a gloved finger in the rectum if they suspect a prostate infection.

Tests you may have

  • Urine tests to look for signs of infection and to grow bacteria in the lab (a urine culture).
  • STI tests for chlamydia and gonorrhea, usually on a urine sample or a swab from the urethra. You may also be offered tests for HIV and syphilis.
  • Scrotal ultrasound, a painless scan using sound waves. It shows the blood flow to the testicle and helps rule out testicular torsion, an abscess (a pocket of pus) or a tumour.
  • Blood tests if you have a fever or seem very unwell.

If torsion is strongly suspected, a surgeon may need to look at the testicle in an operation straight away, without waiting for a scan.

Treatment

Treatment usually starts on the day you are seen, even before test results come back. The antibiotics chosen depend on the most likely cause.

Antibiotics

  • If an STI is the likely cause: usually a single injection of ceftriaxone, an antibiotic that treats gonorrhea, plus a course of doxycycline tablets, which treats chlamydia.
  • If gut or urinary bacteria are the likely cause: often a fluoroquinolone antibiotic taken by mouth, such as levofloxacin or ofloxacin. If both STIs and gut bacteria are possible, you may get ceftriaxone along with one of these.

Take every dose of your antibiotics, even if you start feeling better. Your provider may change the medicine once test results are back. Tell them about any allergies and other medicines you take. Fluoroquinolones can rarely cause tendon pain or damage, so tell your provider right away if you get pain or swelling in a tendon, such as at the back of your ankle.

Easing pain and swelling

  • Rest, especially for the first few days
  • Raise your scrotum by lying down with a rolled towel under it
  • Wear snug, supportive underwear or an athletic supporter
  • Apply a cold pack wrapped in a cloth for short periods
  • Pain relievers such as ibuprofen or acetaminophen, if they are safe for you

Pain usually starts to ease within a few days of starting treatment, but swelling can take several weeks to settle fully.

If it does not get better

See your provider again if you are not improving within about 3 days. You may need more tests or a different medicine. Rarely, an abscess forms and needs draining. Chronic epididymitis may be treated with anti-inflammatory medicines, scrotal support and sometimes referral to a urologist (a specialist in the urinary and male reproductive system).

Living with epididymitis and self-care

  • Avoid sex until you and your partner or partners have finished treatment and your symptoms are gone, if an STI may be the cause.
  • Tell your recent sexual partners so they can be tested and treated. Many people with chlamydia or gonorrhea have no symptoms. Your clinic may help notify partners without using your name.
  • Avoid heavy lifting and hard exercise until the pain settles.
  • Drink enough fluids and pee regularly.
  • Go back for retesting if your provider recommends it, since STIs can come back.

Complications

Most people recover fully with treatment. Possible complications, which are more likely if treatment is delayed, include:

  • Spread of infection to the testicle (epididymo-orchitis)
  • An abscess in the scrotum
  • Long-lasting (chronic) pain in the scrotum
  • Shrinking of the affected testicle (testicular atrophy), which is uncommon
  • Reduced fertility, which is uncommon, especially if only one side is affected
  • Rarely, a serious body-wide infection

Outlook

With prompt treatment, acute epididymitis usually clears up well. Pain often improves within days, although a firm or slightly swollen area may remain for a few weeks. Getting treated early, finishing your antibiotics and making sure partners are treated all lower the chance of the infection coming back.

Prevention

  • Use condoms every time you have sex.
  • Get tested for STIs regularly if you have new or multiple partners.
  • Make sure partners are tested and treated if you have an STI.
  • Get treatment early for urinary symptoms or prostate problems.
  • Keep up to date with the MMR vaccine, which protects against mumps.
  • Wear protective gear, such as an athletic cup, during contact sports.

In Canada

In Canada, chlamydia and gonorrhea are reportable infections, and public health units can help with confidential partner notification. Health care professionals can refer to the Public Health Agency of Canada's sexually transmitted and blood-borne infections guides for health professionals. Many provinces offer free sexual health clinics.

Diagnosis

Acute epididymitis presents with unilateral posterior scrotal pain, epididymal tenderness and swelling, evolving over hours to days (under 6 weeks), often with dysuria or urethral discharge. Chronic epididymitis is defined by 6 weeks or more of epididymal pain or discomfort.

  • Exclude testicular torsion: sudden onset, high-riding horizontal testis, absent cremasteric reflex and younger age favour torsion. Do not delay surgical exploration when clinical suspicion is high.
  • Urinalysis (leukocyte esterase, pyuria), midstream urine culture, and Gram stain of urethral secretions where available.
  • Nucleic acid amplification testing (NAAT) for C. trachomatis and N. gonorrhoeae on first-void urine; offer HIV and syphilis testing.
  • Scrotal Doppler ultrasound shows epididymal enlargement and hyperaemia; useful to exclude torsion, abscess, infarction or tumour, but should not delay exploration.

Management

Treat empirically before results are available (CDC STI Treatment Guidelines 2021; BASHH/EAU guidance is broadly similar).

  • Likely chlamydia/gonorrhoea: ceftriaxone 500 mg IM single dose (1 g if 150 kg or more) plus doxycycline 100 mg orally twice daily for 10 days.
  • Likely chlamydia/gonorrhoea plus enteric organisms (e.g. insertive anal intercourse): ceftriaxone 500 mg IM single dose plus levofloxacin 500 mg orally once daily for 10 days.
  • Likely enteric organisms only (e.g. over 35, recent instrumentation, bladder outlet obstruction, negative gonococcal NAAT): levofloxacin 500 mg once daily for 10 days (CDC); BASHH also lists ofloxacin 200 mg twice daily for 14 days. Tailor to urine culture and local resistance.

Fluoroquinolone cautions: tendinopathy and tendon rupture, QT prolongation, dysglycaemia, neuropsychiatric effects and aortic aneurysm risk; avoid where alternatives exist in older adults or those on corticosteroids. Doxycycline: photosensitivity; take upright with water.

Adjuncts: scrotal elevation, rest, NSAIDs. Admit for sepsis, abscess, intractable pain or inability to take oral therapy. Advise abstinence until patient and partners have completed treatment and symptoms resolve; partners within the previous 60 days should be evaluated and treated.

Follow-up and red flags

Reassess if there is no improvement within 72 hours: reconsider diagnosis (torsion, tumour, abscess, infarction, tuberculous or fungal epididymitis) and consider urology referral. Persistent induration after treatment warrants ultrasound to exclude malignancy. Consider amiodarone-associated epididymitis and mumps orchitis where relevant. Retest for chlamydia and gonorrhoea around 3 months after treatment where positive. Prognosis is good with timely treatment; chronic pain, atrophy and subfertility are uncommon sequelae.

When to get medical help

See a doctor or nurse soon if you have:

  • Pain, swelling or tenderness in your scrotum or testicle that comes on over hours or days
  • Burning when you pee or discharge from your penis
  • Symptoms that are not getting better within 3 days of starting antibiotics
  • Scrotal pain or discomfort that keeps coming back or lasts for weeks

Go to the emergency department or call emergency services right away if you have:

  • Sudden, severe pain in a testicle, especially if it starts suddenly or wakes you up. This could be testicular torsion, which needs surgery within hours to save the testicle.
  • Testicle pain with nausea or vomiting
  • A high fever, shaking chills or feeling very unwell
  • A testicle that sits higher than usual or at an odd angle

In an emergency, call 911.

References

  1. U.S. National Library of Medicine. MeSH: Epididymitis. meshb.nlm.nih.gov
  2. CDC: Epididymitis - STI Treatment Guidelines. cdc.gov/std/treatment-guidelines/epididymitis.htm
  3. MedlinePlus: Epididymitis. medlineplus.gov/ency/article/001279.htm
  4. NHS: Epididymitis. nhs.uk/conditions/epididymitis/