The Luhn check, step by step
- Starting from the rightmost digit, double every second digit.
- If a doubled digit is greater than 9, subtract 9.
- Add all the digits together.
- If the total is divisible by 10, the number passes.
The check catches almost all single-digit typos and most swapped adjacent digits, which is why payment forms use it before sending a number to the bank.
Brand detection
| Brand | Starts with | Length |
|---|---|---|
| Visa | 4 | 13–19 |
| Mastercard | 51–55, 2221–2720 | 16 |
| American Express | 34, 37 | 15 |
| Discover | 6011, 644–649, 65 | 16–19 |
| JCB | 35 | 16–19 |
Privacy
Validation happens entirely in your browser; the number is never sent to our server. Still, avoid typing real card numbers into websites you do not trust.
Developers can generate Luhn-valid test numbers with the Credit Card Generator.
Frequently asked questions
Does a valid result mean the card is real?
No. It only means the number is correctly formed. Only the issuing bank can confirm an account exists and is active.
Is my card number sent anywhere?
No. The check runs entirely in your browser.
What does the Luhn check detect?
It detects most typing mistakes, such as a single wrong digit or two swapped neighbouring digits.

