Men's Health

Epididymitis: Symptoms, Causes, Treatment & When to Seek Care

What causes the pain and swelling behind the testicle, how epididymitis is diagnosed and treated, how long recovery takes, and the warning signs that mean you should go to the ER.

Key Takeaways
  • Epididymitis is inflammation of the epididymis, the coiled tube at the back of the testicle that stores and carries sperm. It causes pain and swelling in the scrotum and can affect any age, most often 14 to 35.
  • Most acute cases are bacterial. In men under 35 the usual cause is a sexually transmitted infection such as chlamydia or gonorrhea. In older men it is more often a urinary tract bacteria like E. coli.
  • Bacterial epididymitis does not go away on its own. It needs antibiotics, usually for one to two weeks, and you should finish the whole course even after you feel better.
  • Sudden, severe testicular pain is an emergency until proven otherwise. Testicular torsion looks similar and can cost you the testicle within hours, so go to the ER or call 911.
  • Rest, supporting and elevating the scrotum, cold packs, and an anti-inflammatory can ease discomfort at home, but they do not treat the infection.
  • A licensed physician can review your symptoms online and prescribe an antibiotic when it is appropriate. If you need an injection, an exam, or an ultrasound, you will be directed to in-person care.

Pain in or around a testicle is hard to ignore, and just as hard to talk about. Epididymitis is one of the most common causes, and it is usually very treatable when it is caught early. This guide explains what epididymitis is, what causes it, how it is diagnosed and treated, how long recovery takes, and which symptoms mean you should skip the waiting room conversation and head straight to the emergency room.

What Is Epididymitis?

The epididymis is a tightly coiled tube that sits on the back of each testicle. Sperm mature and are stored there before travelling on toward the urethra. Epididymitis (pronounced ep-ih-did-ih-MY-tis) means that tube has become inflamed, most often because of an infection.

The result is pain and swelling in the scrotum that can range from a dull ache to something severe enough to make walking uncomfortable. It can affect males of any age, but it is most frequently seen between ages 14 and 35. In the United States it accounts for hundreds of thousands of medical visits every year, so you are far from alone.

Inflammation is your body's way of signalling that something is wrong. The right response is to get it checked, not to wait and see.

Acute vs. Chronic Epididymitis

  • Acute epididymitis comes on over hours to a few days and usually gets worse without treatment. It is typically caused by a bacterial infection and tends to be the more painful form.
  • Chronic epididymitis means discomfort or pain lasting six weeks or longer. It may come and go, is often milder, and does not always have a clear infectious cause.

This article focuses mostly on acute, bacterial epididymitis because it is the form people most often need treatment for.

Symptoms of Epididymitis

Symptoms usually start on one side but can involve both. Common signs include:

  • Pain and tenderness in the scrotum, sometimes spreading to the lower abdomen or groin
  • A swollen, warm, or red scrotum
  • A heavy or dragging feeling in the affected testicle
  • Fever and chills
  • Pain or burning when you urinate, or needing to urinate more often or more urgently
  • Discharge from the penis
  • Blood in the semen
  • A tender lump behind the testicle

If you notice discharge or burning along with testicular pain, an infection spread through sex may be involved, and it is worth being tested for it.

When It Is an Emergency

Go to the nearest emergency room or call 911 if you have sudden or severe testicular pain, especially if it comes with nausea, vomiting, a testicle that sits higher than usual, or pain that began after an injury.

These can be signs of testicular torsion, in which the testicle twists and loses its blood supply. Torsion needs surgery, and the testicle can be permanently damaged within hours. It is far better to be checked and told it was "just" epididymitis than to wait.

Also seek urgent care if you have a high fever, are shaking, feel faint, or the scrotum is rapidly swelling or turning dark red, since these suggest a more serious infection.

What Causes Epididymitis?

Bacteria cause most acute cases. Which bacteria are involved depends largely on your age and sexual history.

Under 35: Sexually Transmitted Infections

In younger, sexually active men the most common culprits are chlamydia and gonorrhea. These infections can travel from the urethra up into the epididymis, and they often cause few symptoms until the testicle becomes painful. Our guides to chlamydia treatment and the gonorrhea guide explain these infections in more detail.

Over 35: Urinary Bacteria

In older men the more typical cause is bacteria from the urinary tract, such as E. coli, flowing backward along the ejaculatory duct into the epididymis. This is more likely with an enlarged prostate, a urinary tract infection, or difficulty fully emptying the bladder. Men who have sex with men can also be exposed to intestinal bacteria during sex, which raises the risk.

Other Causes

  • A blockage or narrowing of the urethra
  • A prostate infection (prostatitis)
  • A urinary catheter or recent urologic procedure
  • Injury or strain to the groin
  • Viral infections such as mumps (uncommon since vaccination)
  • Tuberculosis (rare)
  • Medications such as amiodarone, a heart-rhythm drug

Is Epididymitis Contagious?

Epididymitis itself is not an STI, but when it is caused by one, the infection behind it can be passed to a partner. That is why finding the cause matters. If your provider suspects chlamydia or gonorrhea, recent partners should be tested and treated as well, and you should avoid sex until everyone has finished treatment. An affordable symptom-based STD assessment can be a practical first step.

When the cause is a urinary infection, an injury, or a medication, there is nothing to pass on.

Think an infection may be behind your symptoms?

A licensed physician reviews your symptoms privately and can prescribe treatment the same day if it is appropriate.

Start My Visit

Complications of Untreated Epididymitis

Most people recover fully, especially with prompt treatment. Left untreated, however, bacterial epididymitis can lead to:

  • An abscess, which is a pocket of pus in the scrotum that may need to be drained
  • Breakdown or opening of the scrotal skin from swelling and infection
  • Spread of infection to the testicle (epididymo-orchitis)
  • Ongoing, long-lasting pain
  • In rare cases, reduced fertility

Seeking care as soon as symptoms begin is the single best way to avoid all of these.

How Epididymitis Is Diagnosed

A clinician will ask about your symptoms, sexual history, and any recent urinary problems or procedures, then examine the scrotum for a tender area or swelling. Depending on what they find, they may also use:

  • Urine test: to look for signs of infection and bacteria in the urine
  • Urethral swab or urine NAAT test: to check for chlamydia and gonorrhea
  • Blood tests: to look for signs of infection throughout the body
  • Scrotal ultrasound: to examine blood flow and rule out torsion, an abscess, or a mass

Conditions That Look Similar

Several problems cause scrotal pain or swelling, which is why a proper evaluation is important. This table is for general education only.

ConditionWhat it isClue
Testicular torsionThe testicle twists and cuts off its own blood supplySudden, severe pain, often with nausea or vomiting. A surgical emergency.
OrchitisInflammation of the testicle itself, sometimes with epididymitisSwollen, tender testicle; can follow mumps or a bacterial infection.
Testicular tumor or cancerAn abnormal growth in the testicleUsually a painless lump or heaviness, but it can occasionally hurt.
Hernia or hydroceleTissue or fluid in the scrotumSwelling or a bulge in the groin or scrotum, often without fever.
Injury or bruisingTrauma to the groinPain and swelling that begin after a blow or strain.

The difference between epididymitis and orchitis is where the inflammation sits: the tube behind the testicle versus the testicle itself. They sometimes occur together and are then called epididymo-orchitis.

How Epididymitis Is Treated

Treatment depends on the cause.

Bacterial epididymitis

Antibiotics are the foundation of treatment. Which one is chosen depends on whether an STI or a urinary bacteria is the more likely cause:

  • Likely STI (typically under 35): often a combination of an antibiotic injection such as ceftriaxone plus a course of doxycycline by mouth.
  • Likely urinary or intestinal bacteria (typically over 35, or after certain sexual practices): often levofloxacin or ciprofloxacin, and sometimes trimethoprim-sulfamethoxazole.

Courses commonly last one to two weeks, and occasionally longer. Dosing and drug choice are decisions for a prescriber who has reviewed your allergies, medications, and health history, so this list is not a prescription. Always finish the full course, even when you feel better after a few days. Stopping early is one of the most common reasons the infection returns.

Other causes

  • Amiodarone-related: a doctor may adjust the dose or switch the medication. Do not change or stop it yourself.
  • Tuberculosis: treated with a months-long course of specific antituberculosis medicines.
  • Non-infectious causes: treatment focuses on comfort and on treating the underlying cause.

Surgery is rarely needed. It is reserved for complications such as an abscess or severe, persistent disease.

Relief at Home

Self-care does not treat the infection, but it can make recovery much more comfortable alongside prescribed antibiotics:

  • Rest and avoid heavy lifting or strenuous exercise until the pain settles.
  • Support the scrotum with snug underwear or an athletic supporter.
  • Raise the scrotum on a rolled towel when lying down.
  • Apply a cold pack wrapped in a cloth for 15 to 20 minutes at a time.
  • Drink plenty of fluids.
  • Use an over-the-counter anti-inflammatory such as ibuprofen if it is safe for you. Check with a provider first if you have kidney disease, stomach ulcers, or take blood thinners.

How Long Does It Take to Heal?

Most people notice improvement within about three days of starting the right antibiotic. Fever and sharp pain usually fade first. Swelling and tenderness are slower and can take several weeks to settle, and mild soreness may even linger for a few months after treatment ends.

Return to your provider if you are not improving after two to three days, if symptoms come back, or if the testicle stays swollen or becomes harder. A follow-up helps rule out other causes, including the small chance of a testicular tumor, which is usually painless but still worth ruling out.

Sex and Ejaculation During Epididymitis

Ejaculation will not make the infection worse, but it can be painful. If an STI is the cause, avoid sex until you and your partners have completed treatment and a provider says it is safe, otherwise you risk passing the infection on or getting it back. Many providers also suggest avoiding masturbation while the area is sore and healing.

Can Epididymitis Be Prevented?

  • Use condoms consistently to lower your risk of chlamydia, gonorrhea, and other STIs.
  • Get tested regularly if you have new or multiple partners, and make sure partners are treated.
  • Treat urinary tract infections and prostate problems promptly rather than waiting them out.
  • Stay up to date on vaccinations, including the MMR vaccine that protects against mumps.
  • Practice good hygiene and wash your hands regularly.

For a broader look at protecting yourself, see our overview of sexually transmitted infections and our sexual health services.

Getting Treatment Online

If your symptoms are mild to moderate and you have none of the emergency signs above, an online visit can get treatment started quickly and privately. A licensed physician reviews your symptoms, allergies, and sexual and medical history, and, if an antibiotic is appropriate, sends the prescription to the pharmacy you choose. At Great Doctors USA, epididymitis treatment starts at $49.99, with no insurance required. Learn more about how an online visit works, or explore our men's health and online urgent care options.

An online visit may not be enough when:

  • The pain is sudden or severe, or you suspect torsion
  • You have a high fever, a rapidly swelling scrotum, or feel very unwell
  • You need an injection, a hands-on exam, or an ultrasound
  • Your symptoms are not improving on treatment

In those cases the physician will tell you plainly that you need in-person or emergency care.

Ready to get started?

Answer a few private questions and a physician reviews your case. No waiting room and no insurance needed.

Start Epididymitis Visit

Questions to Ask Your Provider

  • What do you think is causing my symptoms?
  • Which antibiotic do you recommend, and how long should I take it?
  • Do I need any further tests, such as an STI test or an ultrasound?
  • How soon should I start to feel better, and what should worry me?
  • How long should I avoid sex?
  • Should my partner or partners be tested and treated?

Frequently Asked Questions

What is epididymitis?

Epididymitis is inflammation of the epididymis, a coiled tube behind each testicle that stores and carries sperm. It usually causes pain, tenderness and swelling in the scrotum, and is most often the result of a bacterial infection.

What is the most common cause of epididymitis?

Bacterial infection. In men under 35 it is most often a sexually transmitted infection such as chlamydia or gonorrhea. In older men it is usually bacteria from the urinary tract, such as E. coli, flowing back into the epididymis.

Can you get epididymitis without an STI?

Yes. Urinary tract infections, prostate infections, a blocked urethra, a urinary catheter, groin injury, and certain medications such as amiodarone can all cause it.

Is epididymitis contagious?

It can be, when it is caused by a sexually transmitted infection. Epididymitis itself is not classified as an STI, but the infections behind it, like chlamydia and gonorrhea, can pass to partners. If your cause is an STI, your recent partners should be tested and treated.

Does epididymitis go away on its own?

Bacterial epididymitis does not reliably clear on its own. Without treatment it can worsen and lead to an abscess or other complications, so see a healthcare provider as soon as you notice symptoms.

What antibiotics treat epididymitis?

The choice depends on the likely cause. Doxycycline is common when an STI is suspected, sometimes alongside a ceftriaxone injection. Levofloxacin or ciprofloxacin are often used when intestinal bacteria such as E. coli are the likely cause. A prescriber chooses the drug after reviewing your history.

How long does epididymitis take to heal?

Most people feel better within about three days of starting the right antibiotic, but swelling and tenderness can linger for weeks, and sometimes months, afterward. Finish the full course even if you feel fine sooner.

Can I have sex or masturbate with epididymitis?

It is best to avoid sex until treatment is finished and your provider says it is safe, to protect your partners and let the area heal. Ejaculation will not make the condition worse, but it may hurt.

What is the difference between epididymitis and orchitis?

Epididymitis is inflammation of the tube behind the testicle. Orchitis is inflammation of the testicle itself. They sometimes occur together, which is called epididymo-orchitis.

Can epididymitis be treated online?

Often, yes, when the picture is typical and there are no emergency signs. A licensed physician can review your symptoms and history and prescribe oral antibiotics if appropriate. Sudden severe pain, a very swollen testicle, or a need for an injection, physical exam, or ultrasound means in-person care.

Final Thoughts

Pain around the testicles can feel awkward to bring up, but it is exactly the kind of symptom providers see every day, and epididymitis responds well to treatment when it is caught early. Take sudden or severe pain seriously and go to the ER. For milder symptoms, get checked promptly, take every dose of your antibiotic, let your partners know if an STI is involved, and follow up if you are not improving. Your comfort and your long-term health are worth the call.

Sources: General clinical information in this article reflects publicly available guidance from the Centers for Disease Control and Prevention (CDC) and the American Urological Association.

Medical Disclaimer: This article is for general educational purposes and is not a substitute for diagnosis or treatment from a qualified healthcare professional. Antibiotic choice and dosing must be determined by a prescriber who has reviewed your history. If you have sudden or severe testicular pain, a high fever, or a rapidly swelling scrotum, seek emergency care or call 911.