Dark marks or lines under the nails can be caused by injury, such as pinching your finger, which causes bleeding. But if you see dark streaks without any injury, see a doctor right away, as this could be a sign of skin cancer. Called melanonychia, these streaks are especially concerning if they appear on just one nail. Some lines are harmless and may relate to medications, pregnancy, or ethnicity, but any new or changing line should be checked. Subungual melanoma, a type of skin cancer, is the most serious concern. Early detection is vital, so any unexplained dark line—especially one that widens or darkens—should be examined quickly.