Luhn Calculator – Validate & Generate Check Digits
Free Luhn calculator that runs entirely in your browser. Validate any numeric string against the Luhn (mod-10) checksum, or generate the missing check digit that makes a number valid. It strips spaces and dashes automatically, shows a step-by-step breakdown of every doubled digit and running sum, and works for credit cards, IMEI numbers, and other mod-10 identifiers.
🔒 Pure browser tool — nothing is uploaded.
Input
Quick Examples
Click to load:
Related Tools
Result
Algorithm Explained
- Start from the rightmost digit and move left
- Double every second digit (positions 2, 4, 6...)
- If doubling gives > 9, subtract 9
- Sum all digits
- Valid if sum mod 10 = 0
How to use the Luhn calculator
- Type or paste a number into the input field — spaces and dashes are stripped automatically, so any format works.
- Pick a mode: Validate Number checks whether the number already passes the Luhn checksum; Generate Check Digit computes the final digit that makes a partial number valid.
- Click Calculate (or press Enter) to see the result, the calculation details, and a full step-by-step breakdown table.
- Use Copy on the breakdown, or the copy button on a generated number, to save the result to your clipboard.
The Luhn algorithm is a simple mod-10 checksum that catches most accidental typos and digit transpositions. It is widely used for credit card numbers, IMEI device identifiers, and various national ID numbers — but it is an error-detection scheme, not a security measure.
Working with card numbers specifically? The Credit Card Validator also detects the card brand and shows card-specific details. To understand the math behind the check, read the Luhn algorithm guide.