Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Check a card number's format and Luhn checksum, and identify its network.
Enter a card number to check its format and Luhn checksum. This does not verify the card is real or active.
This tool checks a credit card number's length and Luhn checksum -- the standard mod-10 algorithm every major card network uses to catch typos and transcription errors -- and identifies the likely network (Visa, Mastercard, Amex, Discover) from the number's prefix. This is a format check only; it cannot confirm the card is real, active, or unexpired.
Enter a card number (spaces and dashes are ignored). The result shows whether it passes the Luhn check and, if so, the likely network.
Starting from the rightmost digit, every second digit is doubled (subtracting 9 if the result exceeds 9), then all digits are summed. If the total is evenly divisible by 10, the number passes the check -- a simple but effective error-detection scheme, not a security or fraud-prevention measure.
Test numbers like 4111 1111 1111 1111 (a well-known Visa test number) are commonly used for this exact kind of format testing.
Take the well-known test number 4111 1111 1111 1111 (16 digits). Working from the rightmost digit, the tool leaves the first digit alone, doubles the second, leaves the third, and so on. Eight digits get doubled: seven of them are 1, giving 2 each (14 in total), and the leading 4 doubles to 8. The doubled digits add up to 22. The eight digits left alone are all 1, adding 8. The grand total is 30, which is divisible by 10, so the number passes. Change the last digit to 2 (4111 1111 1111 1112) and the total becomes 31, so the check fails. This is the kind of single-digit typo the checksum is designed to catch.
Passes when (sum of doubled and untouched digits) mod 10 = 0
The Luhn algorithm catches all single-digit errors and most swaps of neighbouring digits, but not every possible mistake. A swap of 09 to 90 next to each other, for example, produces the same checksum. It also has no secret in it: anyone can generate numbers that pass. That is why it is used for typo detection at checkout, never for fraud protection. It also says nothing about the expiry date, security code, cardholder name or available credit, and this tool asks for none of them.
When building or testing a checkout form, use the published test card numbers from your payment provider's documentation, not real cards. This tool helps confirm your front-end validation rejects a mistyped number while accepting a valid test number. It is also handy for checking that a form correctly strips spaces and dashes before validating, since this tool does the same. Remember that a real payment gateway will still decline a number that passes Luhn if the card does not exist, so client-side validation is only the first of several layers.
No -- the Luhn checksum only confirms the number is internally consistent (not a typo); actually charging or authorizing a card requires the issuing bank's real-time verification, which this offline tool cannot perform.
Validation happens entirely in your browser (nothing is transmitted anywhere), but as a general practice, avoid entering real sensitive card numbers into any third-party web tool when a well-known test number would serve the same purpose.
By the number's starting digits (the IIN/BIN range) -- Visa starts with 4, Mastercard with 51-55 or certain 2-series ranges, Amex with 34/37, and Discover with 6011 or 65, per each network's publicly documented numbering scheme.
Network detection only covers Visa (starts with 4), Mastercard (51-55 and the 2221-2720 range), American Express (34 or 37) and Discover (6011 or 65). Other issuers pass the checksum but are not labelled.
Yes, both are removed before checking. Any other character, including letters, causes a length or format error.
Between 12 and 19 digits after cleaning. This is broader than the common 15 and 16 digit cards to cover the range used across issuers.
Yes. Roughly one in ten random digit strings passes by chance, so passing only rules out common typos, not invalid or made-up cards.
Reference: MDN Web Docs