| Network | Starts with | Length | CVV |
|---|---|---|---|
| Visa | 4 | 13, 16, 19 | 3 |
| Mastercard | 51-55, 2221-2720 | 16 | 3 |
| American Express | 34, 37 | 15 | 4 |
| Discover | 6011, 65, 644-649 | 16, 19 | 3 |
| Diners Club | 300-305, 36, 38-39 | 14, 16, 19 | 3 |
| JCB | 3528-3589 | 16-19 | 3 |
| UnionPay | 62 | 16-19 | 3 |
| Maestro | 50, 56-69 | 12-19 | 3 |
What is a credit card validator?
A credit card validator checks whether a card number is structurally valid before it is ever used. It runs two independent tests. The first is the Luhn checksum, a mod-10 formula defined in ISO/IEC 7812-1 that catches the vast majority of single-digit typos and transposed digits. The second is a length and prefix check, comparing the number against the published issuer identification number (IIN) ranges each card network owns. A number that passes both is well formed; a number that passes only one is not. This tool reports the two results separately so you can see exactly why a number failed rather than only that it did.
Validation is not the same as authorization. This tool confirms that a string of digits could be a real card number, but it cannot tell you whether the account exists, has funds, or is still active. Only the card issuer can answer those questions, and it does so during a live payment through the acquiring bank. What a validator saves you is a needless round trip: catching a mistyped number in a checkout form, a data-entry field, or a test fixture on the spot, instead of sending a doomed request to a payment gateway and waiting for it to bounce.
The most common use is front-end form validation. When a shopper types their card number, running Luhn in the browser lets you flag an obvious typo the instant they finish, before they submit. Developers also lean on it while building and testing payment flows, where standard test numbers such as 4111 1111 1111 1111 need to pass client-side checks so the form behaves the way it will in production. Everything here happens in your browser. The number you paste is never uploaded, logged, or transmitted, so you can check a value without it leaving your device, and the tool keeps working offline once the page has loaded.
Here is the online credit card validator on three inputs. Click the Visa sample and it shows Valid card number, with Luhn checksum and Length match both marked Pass and the masked form •••• •••• •••• 1111. Change the last digit to 2 and the verdict becomes Invalid card number with "The Luhn checksum failed, so at least one digit is wrong." Delete one digit instead and the credit card number validator reports "Visa numbers are 13 or 16 or 19 digits, but this has 15." That is how a credit card validator separates a typo from a short number.
How to use the credit card validator?
Enter the card number
Type or paste the number into the field. Spaces and dashes are ignored, so any grouping works.
Read the result
The tool shows whether the Luhn checksum passed, whether the length matches the network, and the overall verdict.
Check the detected brand
The network is identified from the issuer prefix, along with its expected lengths and security-code length.
Copy the formatted number
Copy the grouped number, or use the masked version that hides every digit except the last four.
Key Features
Luhn checksum
Runs the ISO/IEC 7812-1 mod-10 check that catches most single-digit typos and adjacent transpositions.
Card network detection
Identifies Visa, Mastercard, American Express, Discover, Diners Club, JCB, UnionPay, and Maestro from the issuer prefix.
Length verification
Compares the digit count against the valid lengths for the detected network, reported separately from the checksum.
Formatting and masking
Groups the number the way each network prints it and offers a masked form that shows only the last four digits.
Frequently Asked Questions
Related Tools
Image to Base64 Converter
Convert images to Base64 data URIs and decode Base64 back to images.
IP Subnet Calculator
Calculate the network address, broadcast, usable host range, subnet mask, and host count for any IPv4 address and CIDR prefix.
CSS Neumorphism Generator
Create soft-UI (neumorphic) elements with a live preview and controls for distance, blur, intensity, radius, surface color, and flat/concave/convex/pressed shapes - then copy the CSS.
Sales Tax Calculator
Add sales tax to a price or back it out of a tax-inclusive total. Works for any rate, shows the net, tax, and gross amounts, and multiplies by quantity.
Comments
0 comments
No comments yet. Be the first to share your thoughts!