Healthy semen is usually white or whitish-gray in color. Yellow semen may be nothing to worry about, but it may also be a sign of an underlying medical condition such as jaundice or a prostate infection.

If your semen changes color, you may wonder if something is wrong with your health. Read on to learn more about what can cause a change in semen color and when you should see a doctor.

There are several reasons your semen may appear yellow in color.

Urine in the semen

Sometimes urine can get left behind in the urethra. The urethra is the tube that carries urine and sperm out of your body. When this happens, urine and semen can combine as semen passes out of your penis. The mixture of urine and semen may make your semen look yellow.

Urine retention can be caused by:

Jaundice

If you have jaundice, your skin and the whites of your eyes may appear yellow. This condition can also affect the color of your semen. Jaundice is the result of high levels of a yellow-orange bile pigment, known as bilirubin, in your body. It can be caused by:

Leukocytospermia

This condition is characterized by an unusually high number of white blood cells in the semen. Leukocytospermia, which is also called pyospermia, can cause your semen to appear yellow in color. The condition can weaken and damage your sperm, which could lead to reduced fertility. It can be caused by:

  • an infection
  • swelling in the area of your penis or groin
  • a genital infection, such as herpes, gonorrhea, or chlamydia
  • autoimmune disorders
  • urethra stricture, which is a narrowing of your urethra
  • infrequent ejaculation
  • dilated or widened veins coming from your testicles
  • alcohol, marijuana, or tobacco use
  • another illness

Read more: Male chlamydia urethritis »

Prostate infection

Semen that appears yellowish-green in color could be a symptom of a possible prostate infection. A prostate infection can happen when bacteria in your urine leak into your prostate. Symptoms include:

  • difficult, painful, or frequent urination
  • cloudy urine
  • painful ejaculation
  • pain in the lower back, abdomen, penis, or groin

Lifestyle factors

Alcohol and tobacco may affect the color of your semen and cause it to temporarily turn yellow. Some men also anecdotally report a change in semen color when they eat specific foods, such as those high in sulfur, including garlic, onions, and chives. Certain medications may also be the culprit of yellow semen.

Some sexually transmitted diseases (STDs), such as gonorrhea or chlamydia, can cause a yellowish-white discharge that comes from your penis.

If you have an STD, the discharge may be accompanied by:

  • burning during urination
  • pain
  • itching
  • frequent need to urinate

Certain STDs can also lead to leukocytospermia, which may cause semen to appear yellow.

It’s very important to see your doctor if you think you might have an STD. Proper treatment can help symptoms and reduce the chances of spreading the disease to someone else.

Learn more: Signs and symptoms of common STDs in men »

A change in semen color might be temporary and go away on its own. If you notice that the color of your semen remains yellow for more than a week or two, see your doctor.

You should also make an appointment with your doctor if you experience a change in semen color along with other symptoms, such as:

  • pain
  • problems with sexual function
  • fever
  • blood in your urine

Treatment will depend on what’s causing your semen to turn yellow.

To correct urine retention problems and jaundice, your doctor will treat the condition that’s causing the problem.

If you have leukocytospermia, you may be given antibiotics, nonsteroidal anti-inflammatory medicines, or certain supplements. In some cases, surgery might be needed to correct problems that cause the condition.

Therapies for STDs and prostate infections may include antibiotics.

A change in semen color might seem alarming at first, but remember it could be temporary. If you don’t experience other symptoms, wait to see if your semen returns to its normal color.

If the color of your semen continues to appear yellow, talk to your doctor. The right treatment could take care of other problems that are affecting your health.