Canadian · Validation · Educational

Luhn algorithm validator.

Checks whether a card-style number satisfies the Luhn (mod-10) checksum used by payment card numbers under ISO/IEC 7812. This is a math check, not a card check — see the notice below before typing anything in.

Source: ISO/IEC 7812-1, Luhn's mod-10 algorithm 100% client-side — no network request is ever sent

Advertisement

Read this before you type anything

This tool checks mathematical validity only — whether the digits satisfy the Luhn checksum formula. It does not check whether a number is a real, issued card; whether that card is active; whether it has funds or a credit limit; or who it belongs to. A number can pass this checksum and still be completely made up. Never enter a real card number here, or on any site you don't fully trust — use the "Try a documented test number" button below instead. Nothing you type ever leaves your browser: this page makes no network request of any kind, which you can confirm yourself by opening your browser's Network tab while using it.

Inputs

Spaces and dashes are stripped automatically. Do not enter a real card number.

Result

Enter a number and press Check.

How the Luhn checksum works

The Luhn algorithm (also called "mod 10" or "modulus 10") is specified in ISO/IEC 7812-1 as the check-digit scheme for the Primary Account Number on payment cards, and is reused for many other identifiers (IMEI, some government and SIM card numbers). Starting from the rightmost digit of the number and moving left, every second digit is doubled; if doubling produces a number greater than 9, its digits are added together (equivalently, subtract 9). Every digit — doubled or not — is then summed, and the number is valid only if that total is a multiple of 10.

The canonical documented test number 79927398713 (used to validate implementations of this exact algorithm, not a real card) sums to 67 after doubling, so its check digit of 3 is the value that brings the total to 70 — a multiple of 10. This tool implements exactly that formula and nothing more.

Advertisement
Advertisement
Listening…