Luhn checksum validator
Paste a card number and see whether it passes the mod-10 test.
A checksum alone does not prove a card exists — it catches typos.
The algorithm, step by step
- Start at the last digit and move left.
- Double every second digit.
- If the result is above 9, subtract 9.
- Sum everything. If divisible by 10, the checksum is valid.
Deeper detail: the checksum article.