Credit Card Validator
The Credit Card Validator checks whether a card number is structurally correct: it runs the Luhn (mod 10) checksum, identifies the issuer from the leading digits, and confirms the number has a length that issuer actually uses.
100% in-browser Β· no data sent
It is built for developers testing payment forms and for anyone who wants to catch a typo before submitting an order β no number ever leaves your browser.
Embed This Tool
Add this tool to your website with customizable styling
How to Use
Paste the card number
Type or paste the number with or without spaces and dashes β everything that is not a digit is ignored.
Read the verdict
A green panel means the number passes Luhn and has a valid length for its issuer; a red one tells you which check failed.
Check the details
The breakdown shows the detected brand, digit count, expected lengths, CVV length and the check digit the number should have ended with.
Try a test number
Click any of the published sandbox numbers to load it into the field β handy for filling in a checkout form you are building.
Frequently Asked Questions
Does a valid result mean the card exists?
No. The Luhn algorithm is a checksum that catches mistyped and transposed digits β nothing more. A number can pass every check here and still belong to no account, be expired, or have no funds. Only the card issuer can confirm a card is real and usable.
How does the Luhn algorithm work?
Starting from the right, every second digit is doubled, and any result above 9 has 9 subtracted from it. All the digits are then added up, and the number is valid only if that total is a multiple of 10. It catches every single-digit error and almost every transposition of adjacent digits.
How is the card brand detected?
From the IIN (Issuer Identification Number) β the first six-ish digits. Visa starts with 4, Mastercard with 51-55 or 2221-2720, American Express with 34 or 37, and so on. The tool also knows Discover, Diners Club, JCB, UnionPay and Maestro, and applies each issuerβs own length rules.
Is it safe to enter a real card number?
The tool runs entirely in your browser β nothing is uploaded, logged or stored, and the page works offline once loaded. That said, there is no reason to type a real card into any website that does not need it, so we default to a published test number and give you eight more to click.