If you’ve noticed a change in the color or texture of your nails, you may be dealing with a frustrating but common condition: nail fungus. Experts estimate up to 12% of people have fungal nail infections. It can be alarming to see your nails looking thick and discolored, but there is good news: these infections are highly treatable. However, while nail fungal infections are curable, they can be stubborn to treat. Treatment typically takes a long time, which is why prevention is key.
Once your nails are looking clear and healthy again, a few simple prevention strategies can help you keep them that way. In this guide, we review the common ways people get nail fungus and the steps you can take to reduce your risk in the future.
What Causes Nail Fungus?
Most cases of nail fungus are caused by a group of fungi called dermatophytes that infect the skin and nails. Less common causes of nail fungus can involve mold and yeast. The fungi thrive and grow in moist, warm places, such as pool decks, public showers, gyms, saunas, locker rooms, and sweaty socks or shoes. Prolonged exposure to these types of environments provide an opportunity for fungi to come into contact with your skin nails and spread.
Certain types of nail and skin fungus can also be contagious and easily spread. You can also get nail fungus by sharing nail clippers, files, or towels with someone else who also has nail fungus, or by touching the fungal infection directly. When your feet or hands are moist themselves — as they might be after swimming, showering, or exercising — it’s even easier to contract nail fungus because the fungi multiply quickly in these environments. But even when the nail fungus is not contagious from person to person, it may still cause an outbreak due to a shared environment.
How precisely does nail fungus spread? To spread into the nail, the fungus first enters the body through openings in, under, or around your skin or nails. Sometimes these openings are visible wounds or cuts, but they may also be microscopic. Common causes include anything that disrupts the nail plate, such as cosmetics or chemical polishes, improper nail trimming, injury, or tight-fitting footwear. Once the fungus gets into the nailbed, it feeds on the keratin in your nails and spreads.
What Nail Fungus Looks Like
The most common signs of a nail fungus infection are changes in the color or texture of one (or more) of your nails. For example, you may notice that your nails:
- Look thicker
- Have a different color, appearing whitish-yellow, gray, or brown
- Have white patches or streaks on the nail surface
- Are warping or changing shape
- Are lifting away from the skin or falling off
- Look drier or less shiny
- Become brittle or crumbly, especially around the edges
- Have an odor from debris trapped underneath
While the symptoms show up on your nails, the fungus actually lives in the nail bed, which is the skin underneath your nail. Nails cover and protect the nail bed from injury, but unfortunately, it’s this same cover that allows the fungus to stay protected once it gets underneath your nails, making it more difficult to treat.
If you’re not sure if you have nail fungus, review your symptoms and make an appointment with your doctor. They can take a look at your nails and prescribe an antifungal treatment, if necessary.
Why Toenails Are More Commonly Affected
While fungal infections can affect any of your nails, they’re more likely to occur on your toenails vs. your fingernails — and the big toenail in particular. That’s because your bare feet are more likely to come into contact with the surfaces where fungus thrives, such as a wet pool deck, shower floor, or sweaty gym mat.
Not only that, but we tend to wear shoes and socks more often than mittens or gloves. This keeps our feet in a damper environment throughout the day, while our hands stay dry and exposed to air. We also clean our hands much more frequently during the day than our feet. If your feet aren’t fully clean or dry before putting on your shoes or socks, or if your footwear is too tight, that makes it even easier for fungus to settle in and spread.
Toenail fungus can cause your nails to look brittle, thick, and discolored. In the section below, we’ll look at the most common causes of nail fungus and what you can do to prevent it.
Top Common Causes of Nail Fungus (And How To Prevent It)
Nail fungus spreads easily from various surfaces to your skin and nails. Fortunately, there are simple steps you can take to lower your risk and prevent fungal infections from occurring.
Athlete’s Foot
Athlete’s foot (tinea pedis) is a common fungal infection caused by dermophytes that affect the skin of your feet, usually between the toes, heels, and soles of the feet. These dermophytes live and thrive in warm, damp environments and surfaces and can easily spread from surfaces and other people with the infection. Though called “athlete’s foot,” this condition can affect anyone who walks barefoot in a damp area, or who has sweaty feet or tight shoes.
It causes dry, scaly and peeling rashes on affected skin, which can cause intense itching, burning, or stinging. The infection can also spread to other parts of the body if you scratch the itchy skin and then touch another part of your body. Since both athlete’s foot and fungal nail infection are caused by dermophytes, if athlete’s foot infection goes untreated or worsens, it can spread from the skin of the foot into the nails.
Prevention Tip
The best way to prevent nail fungus from athlete’s foot is to recognize symptoms of athlete’s foot and treat it accordingly to prevent spread into the nails. General prevention of athlete’s foot is another key strategy. Keep your feet clean, dry, and free from excess moisture like sweat or water.
Dry your feet thoroughly after washing, showering, swimming, or exercising, and wear loose, breathable shoes and socks. Wearing sandals or shower shoes when in public pools, showers, or locker rooms, and avoiding sharing communal towels and other fabrics can help prevent contacting athlete’s foot from public places.
If you notice itchy, peeling skin between your toes or on the soles of your feet, contact your healthcare provider for diagnosis. Athlete’s foot requires medical treatment and is contagious, so it is important to seek care for treatment to ease discomfort and avoid complications. Treatment involves applying a topical antifungal cream to the area, which are available as prescription or over-the-counter strengths.
Over-the-counter creams include terbinafine, clotrimazole, or miconazole, with treatment ranging from 1-4 weeks. However, if these fail to work, prescription-strength options are available, such as ketoconazole or clotrimazole/betamethasone, or oral medications to treat stubborn and resistant infections. In addition to the prescription medication, continue to keep your feet dry and avoid public areas to prevent spread to others.
Damp or Tight Footwear
Shoes or socks that are too tight force your toes together, which can create a hot environment perfect for fungus. Even if your shoes and socks are the right size, continuing to wear them once they’re damp — be it from an intense workout or a surprise puddle in your neighborhood — creates a fungus-friendly environment.
Prevention Tip
Wear proper-fitting shoes and opt for breathable materials like canvas, cotton, mesh, and eucalyptus fiber whenever possible. Keep your feet and shoes clean and dry. Dry out your shoes and feet between wears, and change into a fresh pair after a workout or any exposure to water. This is especially important if you’re prone to sweaty feet, which brings us to our next common cause of nail fungus.
Sweaty Feet
Whether you have naturally sweaty feet (known as hyperhidrosis), an active lifestyle, or both, sweaty feet provide the kind of moist environment that attracts fungus and promotes its growth.
Prevention Tip
To prevent your feet becoming a breeding ground for fungus, opt for moisture-wicking socks and breathable shoes. Change your socks during the day and especially after working out or being in moist environments, such as after showering or swimming. Keeping your feet clean and drying them thoroughly can help prevent fungal growth. If you have hyperhidrosis, talk to your healthcare provider about topical antiperspirants for sweaty feet, like Drysol.
Being Barefoot In Public Areas
Dermatophytes can live on warm, wet floors like those found in public showers, swimming pools, locker rooms, gyms, saunas, and spas. If you walk barefoot in these areas, it gives the fungi a chance to transfer from the floor to your feet and toenails.
Prevention Tip
To prevent nail fungus from public spaces, avoid walking barefoot in shared areas that are damp or wet, such as public pools, showers, or gyms. Always wear a pair of flip flops or waterproof shoes to protect your feet, especially if showering or using a public space where others may be barefoot. Once you’re done, clean your feet thoroughly with soap and water. Make sure your feet are fully dry before putting shoes and/or socks back on to avoid trapping moisture and promoting fungal growth.
Poor Salon Hygiene
Going to nail salons that don’t prioritize sanitation and environmental control can raise your risk of an infection. If a technician does not properly sterilize tools like nail clippers, emery boards, or cuticle pushers and use them on a client with nail fungus, that fungus can grow and transfer to the next client. In addition, fungi can survive in bottles of nail polish for days. And just like wet pool decks or public shower floors, poorly sanitized pedicure tubs can become a hotbed for fungal spores.
Prevention Tip
Before you swear off manicures and pedicures, rest assured they can still be a relaxing experience as long as you go to reputable salons that uphold proper hygiene standards. Check a salon’s sanitation rating and read their online reviews. Make sure they use brand-new disposable buffers and sterilized tools for every client. Don’t be afraid to ask how they sterilize their metal tools and pedicure bowls. If you can, bring your own bottle of nail polish, too.
Poor Artificial Nail Aftercare
Artificial nails, including acrylics and hard gel, can trap moisture and heat between your nail bed and the artificial nail, creating a warm, dark, and moist environment for fungi to multiply, leading to increased risk of infection. If the nail is not applied with a proper seal or if it starts to lift, it can also create a small gap between the nail surfaces, creating a space for fungi to enter and grow. This gap also can create a space for water to get trapped anytime you wash your hands or come into contact with water and moisture, leading to fungal infections.
Prevention Tip
Choose salons with good sanitation ratings and qualified technicians. After getting your nails done, make sure you always thoroughly wash and dry your hands. Pay extra attention to the area around your cuticles and the edges of the nail. If you notice any lifting of the nail after your service, return to the salon as soon as possible to have them repair it so that there is a proper seal to keep out excess moisture and fungi.
Sharing Personal and Public Items
Fungi produce resilient spores that allow them to survive on surfaces and items for months, making them easily transferable and contagious through touch. When personal or public items that have been in contact with someone who has a fungal infection are touched and shared, infection can spread. This is especially true of items stored and used in a moist environment.
Sharing personal or communal items, such as nail tools, towels, clothes, shoes, or coming into contact with public surfaces can allow the spread of fungi that may be living there. This can happen in public spaces like nail salons and gym locker rooms, as well as at home if you live with someone who has nail fungus and share items with them.
Prevention Tip
Avoid sharing any personal grooming tools, towels, shoes, clothes, or personal items with others, even if you know the person. To prevent any spread of infection, always wash any bath mats, clothing, and towels in hot water and dry them on high heat. If you use free towels at your gym, spa, or other community spaces, make sure you’re always getting one that’s fresh and dry, or bring your own personal towel.
Nail Damage
A healthy, intact nail helps prevent your nail bed from infection. Whenever the nail becomes compromised, whether through injury or wear, it can break, crack, or lift, creating an opening for organisms to enter and cause infection. Even repetitive everyday movements, such as rubbing of the feet against tight shoes during exercise and walking, can cause damage and weaken nails over time.
Prevention Tip
Practice good foot and nail care. Trim your nails regularly and properly to prevent them from snagging, tearing, or becoming ingrown. Wear protective footwear that fits you well and is not too tight. Ideally, there should be about a half-inch (about the width of your thumb) of space between the top of the shoe and your longest nail. This gives your toes space to move so they don’t repeatedly bump up among the top of the shoe.
Aging
As we age, our nails grow significantly slower. Our bodies and immune systems also have a harder time fighting off infections, and the occurrence of other medical conditions increase as we age. Together, these increase the risk of nail fungus and infections. Fungal infections are much more common in adults than in younger populations, with nail fungus being present in as many as 35% of adults over age 65 in North America, compared to only 0.4% in children.
Prevention Tip
While there’s not much you can do to slow down aging, you can practice good foot hygiene to at least keep your nails healthy and youthful. Namely, this involves many of the techniques we’ve already discussed, such as:
- Wearing properly fitted shoes
- Keeping your feet clean and dry
- Trimming your nails regularly and properly
- Not going barefoot in public areas
- Taking care of your general health, especially if you have co-existing medical conditions
Specific Health Issues
Certain medical conditions can cause your immune system to be weaker, as well as impact blood flow, sensation, and general nail structure, which can all contribute to higher risk of injury and fungal infections. Various health conditions can increase your risk of nail fungus, including:
- Diabetes
- Nerve damage (neuropathy)
- Poor circulation and vascular disease
- Obesity
- Psoriasis
- Immune system conditions (such as HIV, AIDs, cancer)
Prevention Tip
Management and good control of the underlying condition and regularly seeing your provider for check-ups are the best things you can do to prevent nail fungus and other complications. If you have one of these conditions, you may have to take extra care to keep your feet clean, dry, and free from injury.
For example, those with diabetes can experience damage to blood vessels and the nerves to the feet. When this happens, the lack of blood flow can cause delayed healing of infection, and nerve damage causes decreased sensation. When you can’t feel your feet, you may not be aware of an injury unless you see it. These injuries and skin changes can cause fungal infections, as well as other foot infections. Regular foot checks and foot care is a cornerstone of treatment and prevention of complications from diabetes.
Even if you aren’t diabetic, checking your feet regularly for injury, maintaining proper trimmed nails, and preventing injury can all help prevent infection.
Fingernail Fungus: What To Know

Fingernail fungus can be caused by the same dermatophytes that cause toenail fungus, as well as yeast and mold. It’s up to 10 times less common than toenail fungus, but affects women more than men.
Fingernail fungus shares many of the same causes as toenail fungus, including:
- Poor sanitation practices at nail salons
- Sharing nail tools or towels
- Poor hand hygiene
- Sweaty or damp hands or environments that trap moisture, such as wearing gloves
- Aging
- Underlying health conditions, such as diabetes
- Spread of infection from other parts of the body because of scratching
Fingernail fungus often presents in the same way as toenail fungus, such as a yellowish discoloration on the nail, thicker or brittle nails, or the nail lifting away from the nailbed beneath it.
Lower Your Chances of Getting Nail Fungus
Because fungi thrive in moist environments and enter through breaks in the skin, keeping your nails and skin dry, clean, and protected from injury is the best way to lower your chances of getting nail fungus. Follow these tips:
- Wear breathable shoes and socks that fit your feet
- Wash and dry your hands and feet completely
- Change out of damp shoes and socks as soon as possible
- Avoid walking barefoot in public spaces like gyms, spas, or showers
- Don’t share personal hygiene, grooming, and clothing products with other people
- Keep your nails trimmed
- Make sure any nail salon you go to follows proper sanitation practices
- Treat any nail, foot, or hand injuries with first aid to prevent infection
- Manage underlying health conditions
Nail Fungus Treatment At Home
If you think you have nail fungus, contact your healthcare provider as soon as possible. The sooner you address it, the easier it will be to treat. The treatment you use and the severity of the infection can determine how long treatment takes. Fingernail infections tend to resolve more quickly than toenail infections because fingernails grow back faster and have better blood circulation.
For very mild cases, over-the-counter (OTC) antifungal creams, ointments, or medicated nail polishes can sometimes be enough to treat the fungal infection. However, because OTC topical treatments have a hard time penetrating the nail’s keratin surface to reach the infection underneath, they often fall short for moderate to severe cases.
In addition, more widespread infections using OTC treatments may take much longer to resolve and can take up to a year to resolve completely, which is why stronger medication is usually needed. For moderate to severe infections, prescription antifungal medications are usually required. These can include topical antifungal medications applied to the nail such as ciclopirox, or oral antifungals, such as terbinafine.
Because the fungi lives deep under the nail, nail fungal infections notoriously take a longer time to treat because the new nail must completely grow out even after the fungi is killed. This is why treatments can take anywhere from weeks to months, depending on the extent of the infection and which medication is prescribed.
Topical prescription treatment are more tolerated and have less side effects, but can take up to 24-48 weeks of treatment. While oral antifungal treatment is shorter (usually 6-12 weeks), it has much more adverse effects. It can affect the liver, interact with many other medications, and requires regular monitoring during treatment.
Your healthcare provider will be able to determine which treatment is the best for you and your health needs. Once you have your prescription, you can fill it quickly and discreetly with TelyRx’s online prescription delivery. With TelyRx, every prescription request is reviewed by a licensed provider before it’s approved, and you’ll see your full cost at checkout (no surprises). Learn more about how TelyRx works.
Your Next Steps
Nail fungus is frustrating, but treatable. Now that you know what causes it, you can make small, impactful changes to your daily routine to prevent it, like changing out sweaty socks and not going barefoot in shared spaces. Keeping your feet dry, protected, and clean is the best way to prevent fungal nail infection.
If you suspect you already have nail fungus, don’t wait for the infection to get worse. Assess your symptoms, improve your foot or hand hygiene immediately, and consult a healthcare provider. They can prescribe the best treatment to restore the health and appearance of your nails.
Research and Sources
Harvard Health. (2024). Toenail fungus (onychomycosis). https://www.health.harvard.edu/a_to_z/toenail-fungus-onychomycosis-a-to-z
Institute for Quality and Efficiency in Health Care (IQWiG). (2025). Overview: Nail fungus. InformedHealth.org – NCBI Bookshelf. https://www.ncbi.nlm.nih.gov/books/NBK279547/
Klafke, G. B., Da Silva, R. A., De Pellegrin, K. T., & Xavier, M. O. (2018). Analysis of the role of nail polish in the transmission of onychomycosis. Anais Brasileiros De Dermatologia, 93(6), 930–931. https://doi.org/10.1590/abd1806-4841.20187791
MedlinePlus. (2024). Fungal nail infection. https://medlineplus.gov/ency/article/001330.htm
Leung, A. K., Leung, A. K., Lam, J. M., Leong, K. F., Hon, K. L., Barankin, B., Leung, A. A., Leung, A. A., & Wong, A. H. (2019). Onychomycosis: An updated review. Recent Patents on Inflammation & Allergy Drug Discovery, 14(1), 32–45. https://doi.org/10.2174/1872213×13666191026090713






