Epididymitis is a condition in which the epididymis becomes swollen and painful. The epididymis is a coiled tube at the back of each testicle that stores sperm and carries it toward the vas deferens [1][4]. Epididymitis is usually caused by an infection and is treated with antibiotics [1].
When the swelling lasts less than six weeks, it is called acute epididymitis. If it lasts six weeks or longer, it is called chronic epididymitis [2]. Sometimes the infection spreads to the testicle as well, a condition known as epididymo-orchitis [2].
This page explains the causes and symptoms of epididymitis, how it is diagnosed and treated, possible complications, and the warning signs that need urgent medical attention.
Causes of Epididymitis
The most likely cause of epididymitis depends largely on age and sexual activity [1][3].
Group
Most common cause
Notes
Men under 35
Sexually transmitted infections (STIs), such as chlamydia or gonorrhea [1][3]
Often linked to an infection of the urethra that may cause no symptoms [2]
Men over 35
Urinary tract infection [1][3]
More likely with an enlarged prostate, a urinary catheter, or recent surgery on the groin, prostate or bladder [1]
Men who have anal sex
Bacteria from the bowel, such as E. coli [2][3]
Can occur at any age
Less common causes include mumps, tuberculosis, an injury to the groin, Behçet’s disease and a heart medicine called amiodarone [1]. In older men, problems that block the flow of urine and recent procedures on the urinary tract, such as a prostate biopsy, can also lead to epididymitis [2].
Symptoms of Epididymitis
The main symptoms are pain and swelling in one or both testicles. Common signs include [1][4]:
Pain in the testicle that starts suddenly or develops gradually
A scrotum that feels tender, warm and swollen
A build-up of fluid around the testicle that may feel like a lump
Difficulty or pain when urinating
A white, yellow or green discharge from the tip of the penis
A mild fever or chills
Discomfort in the lower abdomen or pelvis
Which symptoms appear can depend on the cause. For example, discharge from the penis is more typical when the infection is sexually transmitted [1].
Testicular Torsion: When Testicle Pain Is an Emergency
Sudden, severe pain in the testicle can also be caused by testicular torsion. In this condition, the testicle twists and its blood supply is cut off. It is a surgical emergency and must always be ruled out [2]. Torsion is more common in teenagers and in men who have no signs of infection [2].
Call an ambulance or go to an emergency department straight away if you have sudden, severe pain in a testicle or in the abdomen. Do not drive yourself [1].
Contact our team
How can we help you? Share your contact details to prepare your request.
How can we help?
By submitting you confirm you have read the privacy information and consent to the processing of your personal data.
Diagnosis and Tests
Your doctor will ask about your symptoms and sexual history and examine the groin and scrotum. Several tests may then be used to find the cause [1][3]:
Urine tests: To look for signs of infection and identify the bacteria involved [2].
STI tests: A urine sample or a swab from the urethra to check for chlamydia and gonorrhea [1][2].
Blood tests: Testing for HIV and syphilis is also recommended [2].
Prostate examination: In some cases, a rectal examination may be done to check the prostate [1].
Ultrasound scan: An ultrasound of the scrotum is mainly used to help rule out testicular torsion. A normal scan does not rule out epididymitis [2].
Treatment is usually started on the same day, before all test results are available [2][3].
Treatment of Epididymitis
Epididymitis caused by infection is treated with antibiotics. Depending on the likely cause, these may be given as an injection, as tablets, or both [1]. The choice of antibiotic depends on whether a sexually transmitted infection or a urinary infection is suspected [2].
It is important to finish the full course of antibiotics, even if you start to feel better [1]. Hospital treatment may be considered if the pain is severe or you have a high fever [2].
Self-Care at Home
The following measures can help ease pain and swelling while the antibiotics work [1][2][3]:
Pain relief: Take painkillers such as paracetamol (acetaminophen) or ibuprofen. If you have a history of seizures, ask a pharmacist before taking ibuprofen, as it can interact with some antibiotics used for this condition [1].
Cold packs: Hold a cold pack, or a bag of frozen peas wrapped in a towel, against the groin [1].
Support: Wear supportive underwear to hold the scrotum up [1][3].
Rest: Rest and keeping the scrotum raised can help reduce swelling [2].
Sex and Partners
If your epididymitis is caused by chlamydia or gonorrhea, avoid sex until you have finished treatment and waited a further seven days [1]. Your recent sexual partners should also be tested and, if needed, treated. This helps prevent you from being reinfected and stops the infection from spreading [1][2].
Recovery and Possible Complications
Most people start to feel better within a few days of starting antibiotics. However, the pain and swelling can take weeks, and sometimes up to three months, to settle completely [1][3].
With prompt treatment, complications are uncommon. If epididymitis is not treated, it may lead to [3]:
Ongoing pain and swelling
A build-up of fluid around the testicle
A collection of pus in the scrotum (abscess)
In rare cases, shrinking of the testicle and reduced fertility
If swelling continues after treatment, your doctor may arrange further tests to look for other causes, including a testicular tumor [2].
Reducing the Risk of Epididymitis
Because many cases in younger men are caused by sexually transmitted infections, using condoms helps lower the risk [5]. Regular STI testing and making sure partners are treated also reduce the chance of the infection coming back [1][2].
Warning Signs
Contact your doctor if your symptoms get worse or do not improve within three days of starting treatment [2][3].
See a doctor even if the pain is mild if you notice [1]:
A lump in the testicle
A change in the shape or feel of a testicle
One testicle becoming larger than the other
An ache or discomfort in the testicles that does not go away
A lump in the testicle can sometimes be a sign of testicular cancer, which is easier to treat when found early [1].
Go to an emergency department immediately if you have sudden, severe pain in a testicle or the abdomen [1].
Frequently asked questions
Is epididymitis a sexually transmitted infection?
Epididymitis itself is not an STI, but it is often caused by one, especially in men under 35 [1][5]. In older men, it is more often caused by a urinary tract infection [1]. Testing will show which type of infection is responsible.
How long does epididymitis last?
Most people notice improvement within a few days of starting antibiotics. Full recovery can take several weeks, and sometimes up to three months [1][3].
Can epididymitis affect fertility?
With prompt treatment, problems with fertility are rare. Reduced fertility is a rare complication that is more likely when the infection is left untreated [3].
How can I tell epididymitis from testicular torsion?
It is not always possible to tell them apart from the symptoms alone. Torsion usually causes sudden, severe pain and needs emergency surgery [2]. Any sudden, severe testicle pain should be treated as an emergency until a doctor has ruled out torsion [1][2].
Do my partners need treatment?
If your epididymitis is caused by a sexually transmitted infection, your recent sexual partners should be tested and treated if needed. Your doctor or clinic will advise how far back this applies [1][2][3].
Next step
If you have pain or swelling in a testicle, a urologist can assess the cause and recommend the right treatment. You can request an appointment with a urology specialist at Liv Hospital.
References
NHS. Epididymitis. https://www.nhs.uk/conditions/epididymitis/. Accessed November 25, 2026.
Centers for Disease Control and Prevention (CDC). Sexually Transmitted Infections Treatment Guidelines, 2021: Epididymitis. https://www.cdc.gov/std/treatment-guidelines/epididymitis.htm
British Association for Sexual Health and HIV (BASHH). Epididymo-orchitis: patient information leaflet. https://www.bashh.org/_userfiles/pages/files/resources/eo_pil_print_a4_04.pdf
MedlinePlus, U.S. National Library of Medicine. Epididymitis. https://medlineplus.gov/ency/article/001279.htm
Devon Sexual Health (NHS). Epididymitis. https://www.devonsexualhealth.nhs.uk/stis/epididymitis/
Contact our team
We’re here to help
Send us your questions or requests and our international patient team will get back to you.