How Do You Get Nail Fungus? Causes and Risk Factors

Nail fungus spreads when microscopic fungi enter through tiny gaps or breaks in and around your nails. About 5% of people worldwide have a nail fungal infection at any given time, making it one of the most common nail problems. The fungi responsible are everywhere, from gym floors to your own shoes, but certain conditions and habits make infection far more likely.

What Actually Invades Your Nail

A group of fungi called dermatophytes cause up to 90% of nail fungal infections. Two species in particular are responsible for 80% to 90% of toenail cases and about 75% of fingernail cases. These organisms feed on keratin, the tough protein your nails are made of, which is why they target nails specifically.

Yeast species account for roughly 2% to 10% of cases, and various environmental molds make up the rest. Yeast infections are more common in fingernails, while dermatophytes dominate in toenails. The type of fungus matters less to you than how it gets in, because the entry points and risk factors are largely the same.

How Fungi Get Into Your Nail

Infection typically begins underneath the nail tip, in the hardened skin where the nail meets the nail bed. From there, fungi release enzymes that break down the keratin structure, creating larger pores in the tissue and working their way deeper. Most species invade the bottom layer of the nail plate first, since it sits directly against the nail bed, then spread upward, causing the nail to separate and weaken structurally.

The fungi don’t need a dramatic injury to gain entry. Micro-trauma, the kind you get from shoes pressing against your toes, clipping nails too short, or stubbing a toe, creates openings too small to notice but large enough for fungal spores to exploit. Once established, the infection gradually breaks down the tissue between cells, making the nail thicker, discolored, and brittle. This process can take weeks or months before you notice visible changes.

Warm, Wet Environments Are the Main Source

Fungal spores thrive in warm, moist places, and they can survive on surfaces for extended periods. The most common spots where people pick up an infection include:

  • Public showers and locker rooms: Pool decks, gym showers, and dorm bathrooms are high-traffic areas where infected skin cells shed onto wet floors. Walking barefoot lets spores contact your skin directly.
  • Shared footwear or towels: Borrowing shoes, socks, or towels from someone with a fungal infection transfers spores efficiently.
  • Home bathrooms: If someone in your household has nail fungus or athlete’s foot, the shower floor and bath mat become transmission surfaces.

University of Utah Health specifically warns about public shower floors as a common source of fungal, bacterial, and viral foot infections. The combination of warmth, moisture, and foot traffic creates ideal conditions for organisms to spread from one person’s feet to the floor to yours.

Your Shoes May Be the Biggest Risk Factor

Tight, closed-toe shoes that trap sweat create the exact conditions fungi need to grow. Warm, sweaty feet confined in shoes that are rarely cleaned on the inside provide an optimal environment for fungal colonization. This is why toenail infections are far more common than fingernail infections, and why people who wear work boots, athletic shoes, or non-breathable footwear for long hours are disproportionately affected.

The problem compounds over time. Sweat softens the skin between your toes, and that moisture-damaged skin becomes an easy entry point. Athlete’s foot, a fungal skin infection on the feet, frequently develops first in these conditions. Left untreated, the same fungi migrate from the skin into the nail. Many nail fungal infections start as athlete’s foot that spreads.

Nail Salons and Shared Tools

Improperly sanitized salon tools are a real transmission risk. OSHA notes that workers and clients can be exposed to fungal infections through equipment that hasn’t been cleaned between uses. Metal files, clippers, cuticle pushers, and foot basins can all carry fungal spores from one person to the next.

Proper disinfection requires washing tools with soap and water, soaking them in a registered disinfectant for 10 to 30 minutes, rinsing, and storing them in a clean, covered area. Foot basins need disinfection after every client. UV sanitizing boxes, which some salons display prominently, only store already-clean tools. They don’t actually disinfect anything. If a salon skips these steps or rushes between clients, you’re exposed to whatever the previous client left behind.

You can reduce your risk by choosing salons that visibly clean tools between appointments, or by bringing your own set of nail tools.

Who Gets Nail Fungus More Easily

Exposure to fungal spores is nearly universal, but not everyone who encounters them develops an infection. Several factors shift the odds significantly.

Age is one of the strongest predictors. Older adults get nail fungus at much higher rates, partly because nails grow more slowly with age (giving fungi more time to establish), partly because circulation to the feet decreases, and partly because decades of minor nail trauma add up. People with diabetes face elevated risk because reduced blood flow and impaired immune function in the extremities make it harder for the body to fight off early infections.

Genetics also play a role that researchers are only beginning to understand. People are not equally susceptible to fungal infection even when they share the same risk factors and environment. Research published in the Journal of Investigative Dermatology found evidence of familial predisposition to dermatophyte infections, mediated through differences in how the immune system recognizes and responds to fungi. If nail fungus runs in your family, you may genuinely be more vulnerable, not just more exposed.

Other conditions that suppress immune function, whether from medications, chronic illness, or other causes, also lower the body’s ability to clear fungal spores before they establish an infection.

Athlete’s Foot and Nail Fungus Are Connected

The same dermatophytes cause both athlete’s foot and nail fungus. The skin infection typically comes first: fungi colonize the moist skin between your toes, causing itching, scaling, and cracking. As the skin breaks down and becomes waterlogged, bacteria can also move in, contributing to the characteristic odor. From there, the fungi have a short path into the nail bed.

This connection is why treating athlete’s foot promptly matters. If you have recurring fungal skin infections on your feet, your nails are continually re-exposed. Keeping the skin infection under control reduces the chance of it migrating into the nail, where it becomes much harder to eliminate.

Practical Ways to Lower Your Risk

Most prevention comes down to reducing moisture and limiting contact with contaminated surfaces. Wear sandals or shower shoes in public wet areas. Dry your feet thoroughly after bathing, especially between the toes. Choose breathable footwear when possible and rotate your shoes so each pair has time to dry out completely between wears. Moisture-wicking socks help more than cotton, which holds sweat against the skin.

Keep your nails trimmed straight across and not too short. Avoid picking at the skin around your nails or pushing cuticles back aggressively, both of which create micro-openings that fungi can exploit. If you get pedicures, pay attention to how the salon handles sanitation, and don’t be shy about asking. Treating any athlete’s foot infection quickly, before it reaches the nail, saves you from a much longer and more stubborn problem down the line.