Parade.com has an extensive editorial partnership with Cleveland Clinic, consistently named as one of the nation’s best hospitals in U.S. News & World Report’s annual “America’s Best Hospitals” survey. Click here to learn more about our health reporting policies.

Yellow toenails, while gross (to say the least) are more common than you may think. Often caused by a fungus called onychomycosis, yellow toenails occur in 10% of the general population, in 20% of those older than 60, and 50% of those older than 70, according to the American Academy of Family Physicians.

And if you have yellow toenails, it can be extremely distressing. “Yellow toenails are very common. Many patients will become very distressed especially before a vacation or special occasion where they will be wearing open-toed shoes, go barefoot or be around other people with their feet exposed,” says Dr. Jackie Sutera, DPM, podiatrist and Vionic Innovation Lab member. “It can cause a lot of embarrassment, and many people just try to hide the problem and cover-up yellow toenails with nail polish, pedicures, artificial press on nails, nail extensions, gel overlays, etc.”

Why are my toenails yellow?

Fungus

As mentioned, one of the most common causes of yellow toenails is a fungal infection called onychomycosis.

“Yellow toenails, thickening, odor, and debris that forms underneath the nail are all indications that you may have a nail fungus,” says Dr. Sutera. “You could have contracted this from another person, a pedicure, a hotel, a gym, a pool, or any public place where people are barefoot and there is moisture. A break in the skin or trauma to the nail will allow this organism to enter and cause fungus.”

Age

“Being older leads to reduced blood flow to the feet,” says Dr. Mark J. Mendeszoon, DPM, FACFAS, and podiatrist at Precision Orthopaedic Specialties in Ohio.“It also accounts for more years of exposure to fungi and slower growing nails.”

Sweating heavily

A moist environment is a prime time for fungus to grow rapidly in your nails, says Dr. Mendeszoon.

A history of athlete’s foot

Since onychomycosis is typically caused by the same fungus that causes athlete’s foot, if you have a history of athlete’s foot, you may also be at increased risk for yellow toenails, says Dr. Mendeszoon.

Staining from dye

Staining from artificial dyes in the socks and exclusive use of dark socks can also cause discoloration and yellowing of the toenails.

“Using socks without dyes most of the time will help to keep your toenails bright. The superficial discoloration can be gently buffed off with a nail buffer,” says Dr. Sutera.

Leaving nail polish on too long

Leaving nail polish on too long can also cause discoloration of the toenails.

“Don’t leave nail polish on for longer than two weeks and give your nails a break from polish before reapplying,” says Dr. Sutera. “Also, try using a base coat, especially for highly pigmented colors like red, brown, blue, and black. This type of superficial discoloration can be gently buffed off as well.”

Certain medical conditions

“Some medical conditions can also cause yellowing of the toenails such as diabetes, psoriasis, jaundice, liver disease, cancer, tuberculosis, thyroid disease, and vitamin deficiencies,” says Dr. Sutera. “It is super important to have the underlying issue treated.”

Trauma

Trauma and bruising can also cause yellow toenails.

“In most cases, this will grow out gradually with the nail and fade over time. In more severe cases of trauma or injury, the nail can be permanently damaged and discolored,” says Dr. Sutera.

Related: Do Your Feet Hurt, and You Can’t Figure Out Why? Experts Explain What Might Be Going On

How to get rid of yellow toenails

First, your podiatrist may do a biopsy to determine the cause of your toenail yellowing.

“There is something called a nail biopsy where a portion of the nail can be taken and sent to a lab. Usually, we cut off a small part of the nail, send it off and they can actually look under a microscope and do some tests on it to tell you if it is indeed a nail fungus,” says Dr. Patrick McEneaney, DPM, podiatrist and owner of Northern Illinois Foot & Ankle Specialists. “Sometimes when a nail is discolored it may not only be a fungus, it could be a yeast or a mold so there are different treatments for all of those.”

If somebody has a nail fungus, the treatments can range from over the counter to prescription antifungal topical medication.

“There is an oral medicine that can be taken that is an antifungal which gets to the root and kills the fungus so a healthy nail can grow out,” says Dr. McEneaney. “Laser therapy has been around for a while, and uses a certain wavelength of light and pushes through the nail, kills the fungus in the nail and in the nail bed below.”

How can yellow toenails be prevented?

There are many ways you can prevent yellow toenails and protect your feet.

Wear footwear in pool areas, locker rooms and hotel rooms

“If you’re walking around barefoot where somebody else has athlete’s foot or nail fungus, they can spread this to you,” says Dr. McEneaney. “You want to make sure if you’re showering in a communal area that you’re wearing a shower shoe or sandal if you’re walking around barefoot poolside or even things like a hotel room. This type of stuff can be spread this way.”

Trim your toenails

“Keeping the toenails short with just a tiny bit of white at the tip is the best length,” says Dr. Sutera. “When nails are too long they will jam against the front of the shoe as you walk and it can cause injury and discoloration.”

Make sure your shoes fit

“Make sure that you’re wearing shoes that fit appropriately and you have enough room in the toe box of the shoe, both in width and in height,” says Dr. McEneaney. “I think a lot of time people make sure that the shoe is wide enough but the top of it may narrow out a lot and may cause rubbing and problems.”

If you do have fungus, you may want to throw out your shoes or treat them. “Discard old shoes or treat them with disinfectants or antifungal powders,” says Dr. Mendeszoon.

And keep socks in mind, too. “Wear sweat-absorbing socks or change your socks throughout the day,” says Dr. Mendeszoon.

Be careful with spa treatments

If you’re having your nails done and you’re going to a place that doesn’t clean their instruments well enough, they can transmit fungus from one person to another.

“The most common places I see it are from the little foot baths that they put you in,” says Dr. McEneaney. “The foot baths can breed bacteria and fungus. They are supposed to be sprayed down afterward. I think most places are pretty good about doing that, but you have to be careful because some of the chemicals they spray with are based on contact time. So if they’re spraying and then wiping right away, that may not be enough time to kill any of the germs that are in there.”

Another option: Give up nail polish and artificial nails, says Dr. Mendeszoon. Easier said than done, we know, but hey—it could be worth it!

Next up: Why Your Toenails Are Thick and Discolored

Sources