A swollen penis is typically noted after sex or masturbation, and typically resolves within a few minutes. However, persistent swelling in the penis that does not go away may be a sign of infection, an allergy or even a penile fracture.
A swollen penis caused by a health condition will often present with additional symptoms, like pain, redness, itching, sores or bleeding.
If your swollen penis does not resolve within a few minutes, or if it appears with other symptoms, you should consult your family doctor a urologist for assessment and treatment as necessary.

What causes penile swelling?
In most cases, a swollen penis is normal and resolves within a few minutes. It can happen following sex or masturbation, due to increased blood flow to the genital area. Other causes can include:
1. Fracture
A penile fracture usually occurs during sex, when the penis unexpectedly bends forcefully. Although the penis does not technically contain a bone structure, it is commonly referred to as a fracture due to a tear in the membrane that lines the corpus cavernosum. A fracture of the penis can cause pain. immediate loss of erection, bruising, bleeding and swelling.
How to treat: If you think your penis may be fractured, you should see a doctor urgently to assess your symptoms. The doctor may assess the need for surgical repair, although conservative treatment with medication may be advised for small fractures. It is important to place ice on the area and avoid se for 6 weeks. Medications to suppress nocturnal erections may also be prescribed.
2. Balanitis
Balanitis is an inflammation of glans, or head of the penis, however it is referred to balanoposthitis when the foreskin is also affected. This condition is characterized by redness, itching, local heat and swelling, and is typically caused by a fungal infection, like Candida albicans. Balanitis can also be caused by a bacterial infection, an allergic reaction or inadequate hygiene. Learn more about the symptoms and causes of balanitis.
How to treat: If you notice any symptoms that are characteristic of an infection, you should see a doctor for assessment or treatment. Balanitis that is caused by a fungal infection can be treated with antifungals, while a bacterial infection may be treated with antibiotics. Adequate genital hygiene is also imperative during treatment to avoid further growth of the infection.
3. Genital herpes
Genital herpes is a sexually transmitted infection that initially starts with the appearance of small wounds or blisters in the genital area, and particularly on the penis. The blisters can become wounds and are associated with itching, pain, burning with urination, overall discomfort and swelling, in some cases. Read more about the symptoms of herpes and how they are managed.
How to treat: If it important to see a doctor to confirm a diagnosis and start treatment. Treatment usually involves the use of oral or topical antiviral. Condom use during all sexual contact is also important to prevent the transmission of this infection.
4. Urethritis
Urethritis is characterized by inflammation of the urethra due to bacteria, like Chlamydia trachomatis or Neisseria gonorrhoeae. This condition is associated with symptoms like a swollen penile shaft, itching, testicular swelling, difficulty urinating and discharge. Read more about other conditions that can cause penis itching and how you can treat it.
How to treat: Men are advised to see a doctor to start treatment, which usually involves the use of antibiotics like ciprofloxacin or azithromycin. You should use any recommended medications as prescribed.
5. Allergic reaction
A swollen penis can occur due to an allergic reaction or irritation from dirty underwear, different clothing fabrics, lubricants, body washes and condoms. In addition to swelling, the irritation may also cause itching, redness or the presence of blisters on the penis.
How to treat: It is important to identify what triggers the allergy and avoid any possible contact with it. You are advised to maintain adequate genital hygiene with mild soaps and to use cotton underwear. Read more about what can cause penis skin irritation and how to treat it.
6. Lymphedema
Lymphedema is characterized by an abnormal retention of lymphatic fluid, which can be caused by a range of conditions, such as a congenital abnormality or lymphatic system obstruction. Although it is rare, lymphatic fluid can start to accumulate in the penis and scrotum as a result of a skin infection, leading to abnormal swelling, discomfort and redness.
How to treat: Sudden penile swelling with pain and redness should be assessed immediately by a doctor or in a hospital setting. The underlying trigger, a skin infection for example, will first need to be managed with oral or IV antibiotics, however extreme fluid retention will require surgical intervention for draining.
How to prevent
A swollen penis can be prevented with adequate hygiene habits, as most times swelling is related to an infection. It is also important to use condoms during sex to avoid the transmission of a sexually transmitted infection. Adequate lubricant during sex is additionally advised.
Using cotton underwear can help prevent irritation, although any new symptoms in the genital area should always be assessed by a doctor.