What Causes Fungus on Toenails and Who’s at Risk

Toenail fungus is caused by microscopic fungi that feed on keratin, the protein your nails are made of. In about 60% of cases, a single species called Trichophyton rubrum is responsible. The remaining infections come from a handful of related fungi, along with yeasts and molds that take advantage of damaged or vulnerable nails.

But the fungus itself is only part of the story. Whether an infection takes hold depends on how the fungus gets in, what conditions your feet are exposed to, and how well your immune system can fight it off.

The Fungi Behind the Infection

Most toenail infections are caused by a group of fungi called dermatophytes. These organisms produce enzymes that break down keratin, giving them a way to penetrate living nail cells. Three species account for roughly 90% of cases worldwide: Trichophyton rubrum (60%), Trichophyton mentagrophytes (20%), and Epidermophyton floccosum (10%).

Yeasts, particularly Candida species, cause a smaller share of infections. Unlike dermatophytes, Candida typically attacks the soft tissue around the nail first and only invades the nail plate secondarily. In advanced cases, the surrounding skin swells until the fingertip takes on a club-like shape. Non-dermatophyte molds can also infect nails, though they’re less common and often show up in people who already have nail damage from another cause.

How Fungi Enter the Nail

The most common route is through the hyponychium, the skin just beneath the free edge of your nail where the nail bed meets the fingertip. The fungus works its way under the nail plate and migrates slowly toward the base. This pattern, called distal subungual onychomycosis, explains the classic appearance: yellowing and thickening that starts at the tip and creeps backward.

Less commonly, fungi can invade through the cuticle area at the base of the nail and spread outward. This form has been linked to HIV/AIDS and other conditions that severely weaken the immune system.

A third route skips these entry points entirely. Some fungi colonize the top surface of the nail plate directly, producing white, chalky patches. This superficial form accounts for about 10% of toenail fungus cases.

Athlete’s Foot as a Starting Point

Toenail fungus and athlete’s foot are caused by the same organisms, and one frequently leads to the other. In a survey of over 2,700 patients with toenail fungus, about one-third also had a concurrent fungal skin infection on their feet. The fungus living in the moist skin between your toes or on the soles of your feet is essentially sitting next to an open door. Any small gap between the nail and the nail bed, or any crack in the cuticle, lets the infection spread from skin to nail.

This is one reason treating athlete’s foot early matters. Left alone, the skin infection becomes a reservoir that can seed the nail over and over again.

Warm, Damp Shoes Create Ideal Conditions

Dermatophytes thrive in warm, humid environments, and the inside of a closed shoe delivers exactly that. Research measuring conditions inside footwear found that closed shoes average about 77% humidity and 32°C (roughly 90°F), compared to 68% humidity and 30°C in open footwear. Cloth shoes performed worst, reaching an average humidity above 82%.

These numbers matter because the risk of fungal foot infection rises sharply once humidity inside the shoe exceeds about 75%. For every 1°C increase in dew point inside the shoe, the risk of a fungal skin infection on the foot increases by about 10%. People whose shoes hit both 32°C and 80% humidity were roughly three times more likely to have a fungal infection than those with drier, cooler footwear.

The fungal spores themselves are remarkably hardy. Dermatophyte spores can remain viable on surfaces, including inside shoes, for up to five years. Shared showers, gym floors, and pool decks are well-known transmission points, but your own shoes can reinfect you long after an apparent cure.

Diabetes and Poor Circulation

People with diabetes develop toenail fungus at significantly higher rates, and the reasons stack on top of each other. High blood sugar damages small blood vessels, reducing circulation to the feet. It also impairs the immune cells responsible for identifying and destroying fungi. Nerve damage (neuropathy) means injuries and infections go unnoticed longer. And sugar molecules in the blood can actually bind to nail proteins, creating additional attachment points for fungal spores to grab onto.

Peripheral vascular disease, even without diabetes, has a similar effect. When blood flow to the toes is reduced, immune cells arrive more slowly and in smaller numbers, giving the fungus a head start.

Weakened Immune Systems

Your immune system is the main reason a fungal exposure doesn’t always become a fungal infection. When that defense is compromised, the equation shifts. People living with HIV, those on immunosuppressive medications after organ transplants, and those with other immunodeficiency conditions experience more persistent infections that are harder to clear.

Even subtler immune changes play a role. People with toenail fungus have been found to have roughly double the levels of a specific type of regulatory immune cell in their bloodstream compared to healthy controls. These cells suppress immune activity, which may explain why some people’s bodies tolerate the infection rather than fighting it off.

Nail Trauma and Micro-Injuries

Any damage to the nail, from a single stubbed toe to years of repetitive pressure from tight shoes or running, can create an opening for fungi to enter. The gap between a traumatized nail plate and the nail bed is an ideal colonization site: it’s warm, protected, and moist.

Once established under a damaged nail, the infection can thicken and distort the nail further, creating sharp edges that abrade surrounding skin. That broken skin then becomes vulnerable to secondary bacterial or fungal infections, compounding the problem.

Age and Genetics

Toenail fungus becomes increasingly common with age, and it isn’t just because of accumulated exposure. Nails grow more slowly as you get older, giving fungi more time to establish themselves. Circulation to the extremities naturally declines, and the immune system gradually weakens.

Genetics also influence susceptibility. Studies have identified an autosomal dominant inheritance pattern associated with Trichophyton rubrum infections, meaning if one of your parents had chronic toenail fungus, your risk is elevated. At the molecular level, researchers have found specific gene variants that impair the immune system’s ability to recognize and respond to fungal invaders. One such variant affects a receptor involved in binding to fungal cells, reducing the production of key immune signaling molecules. People who inherit two copies of this variant are most affected, but even one copy increases vulnerability.

Living with a family member who has toenail fungus is also an independent risk factor, likely because of shared floors, showers, and fungal spores shed into the home environment.