RYTIS BERNOTAS / GETTY IMAGES

A black line on your nail (medically known as melanonychia) causes a streak of dark pigmentation that runs along the nail bed. It can be a normal color variation, especially in people with darker skin tones.

Injuries, certain medications, infections, skin conditions, and endocrine disorders like Addison’s disease or hyperthyroidism can also cause a black line on one or more of your nails. Melanonychia can sometimes be a sign of melanoma (skin cancer).

Although a black line on your nails isn’t usually a cause for concern, it’s a good idea to see a healthcare provider whenever you notice changes to your nails’ color, shape, or texture. Dermatologists, or doctors with special training in diagnosing and treating conditions affecting the nails, skin, and hair, can examine your nails, figure out what’s causing melanonychia, and offer treatment options.

What Does a Black Line on a Nail Look Like? 

Melanonychia typically appears as a vertical (longitudinal) streak running from the cuticle to the tip of the nail. The color can vary from dark brown to grey or black, and the thickness can range from resembling a thin pencil mark to a broader, more noticeable band.1 A black line can also stretch horizontally across the nail (horizontal melanonychia), though this is rare.

Depending on the cause, you may notice other nail changes that occur with a black line on a nail, such as:

  • Changes in the shape, texture, or thickness of the nail(s) 
  • Cracked, splitting, or crumbling nail(s)
  • Skin discoloration around the affected nail

Why You Have a Black Line on Your Nail 

​​A black line on the nail can develop for several reasons, ranging from benign (harmless) pigmentation changes to more serious health conditions. 

Racial Melanonychia 

Racial melanonychia is an increase of melanocytes within the nail matrix that can cause black lines on the nails. Melanocytes produce melanin, a natural pigment that gives color to your skin, hair, and eyes.

Your fingernails and toenails are translucent (colorless) because the nail matrix—the area at the base of nails responsible for growing nails—usually contains dormant melanocytes that do not produce pigment.

Black lines can develop on the nails when these melanocytes become active and produce pigment. This most commonly occurs in people with dark skin tones, affecting 77-100% of Black people, between 10-20% of people of Asian descent, and 1% of white people. Racial melanonychia most commonly affects the fingernails, especially the index finger and thumb, and involves multiple nails. The width of the black line may also increase with age.

Nail Trauma or Injury 

A nail injury from dropping a heavy object on the nail, getting a finger caught in a door, using tools without proper hand protection, or poorly fitting shoes can cause a black line on the nail. 

Physical trauma to the nail can damage blood vessels beneath the nail, causing blood to pool and appear as a dark vertical line (known as a splinter hemorrhage). Splinter hemorrhages typically grow out with the nail, but if they attach to the nail bed (the skin beneath the nail plate), they may last longer.

Repeated trauma to the nail matrix from chronic nail biting or picking can lead to a black line on one or more nails. Repeated microtrauma activates melanocytes in the nail matrix or bed, leading to excess melanin production and the appearance of dark streaks.

Medications  

Some medications and medical treatments can cause black lines on the nails. These lines are horizontal, meaning they run across the nail’s width. Treatments associated with a black line on a nail include:

  • Chemotherapy drugs to treat cancer
  • Antimalarial medicines for treating malaria
  • Antiretroviral drugs to treat HIV
  • Antifungals to treat fungal infections
  • Sulfonamide antibiotics to treat bacterial infections
  • Biologics to treat inflammatory conditions like arthritis T

The discoloration usually appears 3-8 weeks after starting treatment and typically fades within eight weeks after stopping or switching medications.

Specific tests and therapies can also cause melanonychia. Getting an X-ray on your hands and feet or undergoing phototherapy or light therapy can increase your risk of developing black lines on your nails.

Nail Melanoma  

Nail melanoma (also known as subungual melanoma) is a type of skin cancer that affects melanocytes.11 Nail melanoma most commonly affects the big toe, thumb, or index finger. One of the first signs of nail melanoma is a vertical dark brown or black line running vertically on the nail.

Other symptoms of nail melanoma include:

  • Skin discoloration, with the skin surrounding the nail appearing darker, redder, or pinker than your normal skin tone 
  • A crack or split down the middle of the nail
  • Onycholysis, which causes the nail to lift away from the nail bed or completely detach and fall off 
  • Pain and inflammation on the nail or surrounding skin 

Systemic Health Conditions 

When a systemic (bodywide) condition causes melanonychia, it typically involves black lines that form on multiple fingernails and toenails. Conditions that can cause these dark lines include: 

  • Addison’s disease: In this condition, the adrenal glands don’t produce enough hormones that help regulate blood pressure and the body’s balance of salt and fluids, which leads to symptoms like fatigue, weight loss, low blood pressure, and dark patches on the skin or nails.
  • Cushing’s syndrome: This disorder develops when the body has too much cortisol, usually due to long-term corticosteroid use. Symptoms include weight gain, high blood pressure, headaches, and hair and nail changes.
  • Hyperthyroidism: Hyperthyroidism develops when the thyroid gland produces too much thyroid hormone, accelerating the body’s metabolism and sometimes leading to nail changes, including dark lines.
  • Graft vs. host disease: This is a complication of stem cell or bone marrow transplants where the donated cells (the graft) attack the recipient’s (the host) healthy tissues, damaging the skin, nails, internal organs, genitals, eyes, joints, and muscles. 
  • Human immunodeficiency virus (HIV): This chronic illness can cause nail changes, including black lines. Antiretroviral medicines for treating HIV can also sometimes cause nail discoloration.

Other Causes  

Though less common, other conditions can also cause black lines on the nails:2021221 

  • Protein, vitamin D, and vitamin B12 deficiencies
  • Fungal nail infections
  • Endocarditis, a bacterial infection of the heart’s inner lining
  • Heavy metal poisoning via toxic exposure to arsenic or mercury
  • Lichen planus, an inflammatory skin condition

When to Contact a Healthcare Provider 

See a healthcare provider for any unexplained changes to your nails, especially if a black line appears suddenly, begins to widen or darken, or when black lines affect multiple nails. Contact your provider if you experience pain, swelling, or other changes in your nails or have a personal or family history of skin cancer.

A dermatologist can evaluate the black line and determine its cause. They will review your medical history, closely examine your nails, and order diagnostic tests to provide an accurate diagnosis. Your healthcare may also order additional tests, such as: 

  • Nail culture: Involves clipping a small piece of the affected nail and sending it to the lab to examine the nail cells and look for abnormalities
  • Blood test: Checks for markers of infection or inflammation and measures hormone levels

Treatment Options 

Your exact treatment plan for improving the appearance and symptoms of a black line on your nail will depend on the underlying cause. Treating the nail isn’t necessary in most cases, and the black line will disappear as the nail grows. Your healthcare provider may recommend monitoring the black line over time to ensure it doesn’t change in size, color, or shape.

If medication is the cause, the black line will typically disappear within eight weeks of stopping treatment or switching medications, though it can sometimes persist for longer. If an underlying health condition (like melanoma) is causing nail changes, the goal is to treat the condition, which often resolves the nail discoloration. 

How To Prevent Black Lines on Your Nails 

Preventing black lines on nails is not always possible, but taking steps to protect your nail health may lower the risk of trauma or injury-related changes. Consider these strategies:2526

  • Avoid biting your nails
  • Use proper hand protection like gloves during activities that could injure your nails (e.g., working with tools or chemicals, gardening, or performing household chores)
  • Keep your nails well-trimmed and clean 
  • Wear well-fitting shoes to prevent pressure and damage to your toenails 

This article was first seen in Health

Dr. Deeptej Singh, MD, FAAD  Medically reviewed by Deeptej Singh, MD

Deeptej Singh, MD, FAAD, is a board-certified dermatologist specializing in integrative dermatology. He is the founder and owner of Sandia Dermatology.