Credit Card Validator
Run a Luhn check, detect the card network, find a missing check digit, or check a whole list.
Spaces and dashes are fine. For form testing, use a published test number from the Test Numbers tab.
Step-by-step Luhn working
Starting from the right, every second digit is doubled. If doubling gives more than 9, subtract 9. The number passes when the total ends in 0.
| Digit | Doubled? | Contribution | Running sum |
|---|
Enter a card number without its last digit (12 to 18 digits) and this finds the check digit that completes it.
Paste one card number per line. Results show a masked number, the network and the Luhn result for each line.
| Masked number | Network | Result |
|---|
Published payment-network test numbers for form testing — these are not real cards and cannot be charged.
| Network | Test number | |
|---|---|---|
| Visa | 4111111111111111 | |
| Visa | 4012888888881881 | |
| Mastercard | 5555555555554444 | |
| Mastercard | 2223003122003222 | |
| American Express | 378282246310005 | |
| American Express | 371449635398431 | |
| Discover | 6011111111111117 | |
| JCB | 3530111333300000 | |
| Diners Club | 30569309025904 |
These numbers are published by the payment networks for developers testing checkout forms. They pass the Luhn check by design, but no real account stands behind them.
How to use the Credit Card Validator
- Type or paste a card number — spaces and dashes are fine. Use a published test number if you are testing a form.
- Read the Luhn result, the detected network, the length check and the step-by-step Luhn table.
- Use Find Check Digit to complete a number, Bulk Check for a list, or copy a published test number for checkout testing.
Credit Card Validator FAQs
What does a Luhn check actually prove?
The Luhn algorithm is a checksum built into card numbers. It catches most typing mistakes, such as one wrong digit or two swapped digits. A pass only means the number is formatted consistently — it does not prove the card exists, is active, or has funds. Only the issuing bank can confirm that.
How does this tool detect the card network?
It reads the first digits, called the issuer identification number. Visa starts with 4, Mastercard with 51 to 55 or 2221 to 2720, American Express with 34 or 37, and so on. It then checks the number length against that network, for example 15 digits for Amex and 16 for most Mastercards.
Is it safe to type a card number here?
This tool runs entirely in your browser. The number is never sent to a server, stored, or logged, and the page only ever shows a masked version with the middle digits hidden. Even so, for testing payment forms you should use the published test numbers on the Test Numbers tab, never a real card.
What is a check digit?
The last digit of a card number is a check digit chosen so the whole number passes the Luhn formula. If a number fails, this tool shows which last digit would make it pass. The Find Check Digit tab works the other way: give it a number without its last digit and it returns the missing digit.
Why does a number pass Luhn but still get declined?
Luhn only checks the digits, nothing else. A payment can still fail because the card is expired, blocked, over its limit, or the expiry date or security code was entered wrongly. Test numbers from payment networks pass Luhn by design but are not real cards and cannot be charged.
Free Credit Card Validator — Luhn Check, Card Type & Check Digit
This free credit card validator checks any card number against the Luhn algorithm and identifies the card network from its first digits. It shows the full step-by-step Luhn working, tells you the correct check digit when a number fails, and can validate a whole list at once — all privately in your browser.
How to use it, step by step
- Enter a card number with spaces or dashes, or pick a published test number.
- Read the Luhn pass or fail result, network, length check and digit-by-digit table.
- Use Find Check Digit to complete a number, or Bulk Check to validate a list and copy the results as CSV.
Popular uses
- Testing checkout forms with published network test numbers instead of real cards.
- Catching a mistyped digit before a payment is submitted.
- Developers: verifying Luhn logic and network detection in payment code.
- Support teams: checking whether a quoted number was copied down correctly.
