Luhn Checksum Validator
Validate numbers that use the Luhn mod-10 algorithm (credit cards, IMEIs, some national ID and account numbers), generate a valid Luhn check digit for a number, and compute the expected check digit. Ignores non-digit separators such as spaces and dashes, and reports the card-network length prefixes when they look familiar.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
What the Luhn check proves
Luhn, also called modulus 10, is the checksum behind credit card numbers, IMEIs and many national identifiers. The tool takes a number, strips spaces and dashes, and reports whether the weighted digit sum is a multiple of ten. A pass means the digits are internally consistent — it says nothing about whether the account exists or was ever issued.
Three modes
Validate checks a complete number and, when the leading digits look like a known issuer, names the network it resembles. Compute check digit takes a number without its final digit and returns the digit that would complete it, showing why. Generate does the same and appends the result, which is handy when you need a syntactically valid test number for a form or fixture.
The right way to make test numbers
Payment sandboxes often reject a number that fails Luhn before it reaches the mock. Paste any prefix in generate mode and the tool appends the correct check digit, so you get a number a front-end validator accepts without copying a real card. It is still not a real account.
Limits and separators
Input may contain only digits, spaces and dashes; anything else is rejected rather than stripped, and a validate run needs at least two digits. The issuer hint is a best-effort prefix match against Visa, Mastercard, Discover and American Express, shown as context, never as proof.
Numbers never leave the tab
The checksum is computed locally with plain integer arithmetic. Running the check on your own machine avoids sending anything to a third party, and the tool needs no network at all.
Questions
What is Luhn?
The mod-10 algorithm used as a quick validity check for numbers that include a check digit, such as credit cards and IMEIs.
Does Luhn guarantee a real card?
No — passing Luhn only verifies the number is well-formed; it gives no signal about issuer, funds, or account status.
How is the check digit computed?
Process digits from the right, doubling every second one and subtracting 9 from results over 9, then choose the digit that makes the sum a multiple of 10.
Related tools
See categoryIdentifier Checksum Validator
Check Luhn, IBAN MOD-97, ISBN-10, and ISBN-13 checksums locally.
Random String Generator
Generate random strings from a chosen character set with an unbiased browser CSPRNG.
Fraction Simplifier
Reduce a fraction to lowest terms, or convert a decimal to a fraction; optional mixed numbers.
Matrix Calculator
Add, multiply, transpose, and find the determinant or inverse of small matrices.