What is it?
A feeling of pain, burning,  stinging, or discomfort during urination is called dysuria in medical language.  Broadly speaking, pain during urination can occur because of irritation or  inflammation anywhere along your 
urinary tract. At  times, conditions affecting the genital organs can also cause pain during  urination. 
Causes of Pain on  Urination
Here are the common reasons  because of which passing urine may hurt.     
- Urinary Tract Infection  (UTI) —  UTIs are the most common cause of painful urination in women. They are a  possible reason in men as well. But it is not wise to attribute all episodes of  painful or burning urination to an infection, or to treat it with common  antibiotics unless some additional evidence of infection is present. 
- Sexually-transmitted  diseases (STDs) —  Urethritis caused by a sexually-transmitted organism is a very common cause of  painful urination in men whose sexual history puts them at risk of STDs. Common  STDs such as gonorrhea, chlamydia, genital herpes and several others can cause  painful urination.
- Chemical irritation — Soaps, bubble-baths,  spermicides, scented toilet paper, personal hygiene products can all irritate  the urethra and cause pain during urination.
- Trauma — Sexual intercourse, horseback  riding, cycling, insertion of urinary catheter or any other instrument in the  urethra, can cause trauma leading to pain during urination.
- Obstructions to urine  flow —  Obstruction to urine flow because of an enlarged prostate squeezing the urethra,  or a stricture (narrowing) in the urethra can make urination painful.
- Hormonal conditions — Postmenopausal women  with low levels of estrogen may have painful urination because of excessive dryness  of the urinary and genital organs.
- Stones — A stone in the  ureter, bladder or urethra can cause pain on urination. 
- Drugs and herbal  remedies —  Some drugs such as penicillin G and Cytoxan and some herbal remedies are known  to cause pain on urination.
- Spondyloarthropathies — Syndromes associated  with inflammation in multiple organs can cause pain on urination. For e.g.  people with Reiter’s syndrome have joint pains, pain on urination and eye  symptoms such as burning and pain. 
- Psychogenic conditions — Major  depression, stress and anxiety can cause problems associated with urination,  including pain on passing urine.
Associated Symptoms
The nature of the pain and  other symptoms that you might be experiencing can give a clue to the likely  cause of dysuria. The symptoms associated with some common conditions causing  pain on urination are discussed here.
 
- Frequent urge to urinate: Dysuria along with frequent urge to urinate is the  classical symptom of a UTI, particularly acute bladder infection (cystitis). A  stone or tumor irritating the bladder can also cause similar symptoms. They can also occur in  interstitial cystitis. Acute cystitis is rather uncommon in men <50 years of  age, hence these symptoms should be investigated thoroughly if you are a young  man.  
- Weak urine stream or straining to urinate: Painful urination with an unusually thin urine stream or difficulty in starting to urinate is a  sign of obstruction in the urethra. In middle aged men the most common reason  is an enlarged prostate. Or it could be because of a urethral stricture. Past  history of a STD or urethral trauma makes strictures more likely.
- Internal vs external  pain: If you are a woman, a burning sensation felt as the urine passes over the vulva  and vagina is most likely due to trauma, chemical irritation, or infection of  the genital organs and not the urinary tract. Most patients describe the pain  and burning caused by a UTI to be occurring within the body. Pain just above  the pubic bone particularly occurs with a bladder infection. 
- Sudden vs. gradual onset: If  the pain came suddenly, it’s more likely to be because of an UTI than an STD.  Symptoms of STDS such as Chlamydia typically develop gradually over few weeks.
- Discharge from penis or vagina: If your sexual history raises any doubt of a STD, you  should always consider it as a possible cause for pain on urination.  It’s quite likely that you will also have a  discharge from the penis or the vagina. Absence of discharge however does not  rule out a STD. Vaginal yeast infection in women could cause burning or pain  during urination, often with a curdy discharge from the vagina. 
- Pain during intercourse: Many  conditions causing pain on urination could also make sex painful, but STDs,  atrophic vaginitis in postmenopausal women, trauma, and chemical irritants are  more likely to cause these symptoms concomitantly.
- Pain in rectum: If  you are a male and have also felt pain or pressure in the rectum along with  pain in passing urine, an infection of the prostate gland could explain your  symptoms.  
Exams and Tests for  Pain on Urination
A work-up for pain on  urination may include one or more of the following tests:
 
- Urinalysis: It’s the most common  initial urine test done in people complaining of painful urination. Presence of  pus cells and bacteria in urine nearly confirms the presence of an UTI and  nothing more may be needed. Presence of blood in urine often necessitates detailed  testing for stones, cancers, or mechanical obstructions in the urinary tract. 
- Urine Culture: It is done to find  the cause of UTI and prescribe the most appropriate antibiotics for testing.
- Vaginal or urethral smear: Fluid sample from  your urethra or vagina maybe taken for microscopic examination if a STD is  suspected.
- Ligase chain reaction  and Polymerase chain reaction tests: These are tests done to identify STDs such  as gonorrhea and chlamydia. 
- KOH microscopy and  Yeast culture: Women  with chronic or recurrent pain on urination may need these tests to check for  yeast infection.
- Imaging studies: Ultrasound, X-ray, CT  scans etc are ordered if the above tests do not bring forth the cause of dysuria. 
- Cystoscopy and biopsy: Direct  visualization of the bladder and examination of a tissue sample may be needed  in some cases. 
Treatment for Pain on  Urination
Do consult your doctor if  pain on urination is severe or it persists beyond a couple of days. Treatment  for pain on urination depends on the cause. Minor trauma or inflammation caused  by sensitivity to some chemicals heals on its own in a few days if you avoid  further injury or irritation. UTIs and STDs can be successfully treated with a  course of the right antibiotics. Women with atrophic vaginitis may be  prescribed lubricants or 
hormone therapy if symptoms persist. Your 
urologist  can decide the right therapy for other conditions such as interstitial  cystitis, enlarged prostate, stones, or tumors.