Credit Card Number Validator
Check whether a card number passes the Luhn checksum and detect its network. Format checks only; nothing is charged, stored, or sent anywhere.
Spaces, dashes and other separators are ignored. Everything runs in your browser. Nothing is uploaded or stored.
How to validate a credit card number online
Enter the number
Type or paste a card number; spaces, dashes and other separators are ignored automatically.
Read the verdict
The tool instantly shows whether the number passes the checksum, which network issued it, and the correctly grouped form.
Inspect the checksum
Open the Luhn steps to see exactly which digits are doubled and how the final sum is reached.
Copy the result
Use the copy button to grab the number formatted in standard groups.
Why use this tool
Luhn checksum with visible working
Every number is checked against the standard Luhn algorithm, and an optional step-by-step view shows each doubled digit and the running sum.
Detects six card networks
Issuer prefixes are matched against Visa, Mastercard, American Express, Discover, JCB and Diners Club, including their per-network length rules.
Flags known test numbers
Well-known sandbox numbers such as 4111 1111 1111 1111 are labelled as test numbers so they are never mistaken for real cards.
Standard grouping
The cleaned number is re-spaced the way it appears on the card: groups of 4 for most networks, 4-6-5 for American Express.
Runs entirely in your browser
The number never leaves your device. Nothing is uploaded, logged, or stored.
About this tool
This tool checks whether a credit or debit card number is structurally valid. It strips out spaces, dashes and any other separators, runs the remaining digits through the Luhn checksum, and matches the issuer prefix against the ranges used by Visa, Mastercard, American Express, Discover, JCB and Diners Club. You get a clear valid or invalid verdict, the detected network, the digit count, and the number re-spaced into its standard groups.
A passing result means the number is well formed, nothing more. The Luhn check catches single-digit typos and most transposed digits, which is exactly why card networks use it, but it says nothing about whether an account exists, has funds, or belongs to anyone. That makes the tool safe and useful for developers testing payment forms, support teams checking a mistyped number, and anyone verifying data entry. Common sandbox numbers, like the 4111 test Visa, are recognised and labelled as valid in format only.
Numbers from 13 to 19 digits are accepted, and each network is also held to its own length rules: a 14-digit Visa fails even if its checksum passes. The optional Luhn steps view shows the full calculation, doubling every second digit from the right and summing the results, which makes it a handy teaching aid too. If you need realistic sample cards for seeding a test database, pair this with the mock data generator.
Frequently asked questions
- Does a valid result mean the card is real?
- No. It means the number has a correct checksum and matches a known network format. The tool cannot tell whether an account exists, is active, or has funds; no payment system is contacted.
- How does the validation work?
- The digits are run through the Luhn algorithm: starting from the right, every second digit is doubled (subtracting 9 when the result exceeds 9) and all values are summed. If the total is divisible by 10, the checksum passes. The leading digits are then matched against issuer prefix ranges to detect the network.
- Is my card number uploaded anywhere?
- No. Everything runs in your browser; the number is never sent to a server, logged, or stored. Even so, avoid pasting real card numbers into any tool when a test number will do.
- Which card networks are detected?
- Visa, Mastercard, American Express, Discover, JCB and Diners Club. Numbers from other issuers still get a full checksum verdict; the network simply shows as unknown.
- Why is a number invalid when its checksum passes?
- Each network only issues certain lengths. Mastercard numbers are always 16 digits and American Express always 15, so a passing checksum at the wrong length is still reported as invalid.
- Can I check test card numbers?
- Yes. Common sandbox numbers used for payment testing are recognised and labelled as test numbers, so you know they are valid in format only and not tied to a real account.
Related tools
Mock Data Generator
Build a schema and generate fake records as JSON, CSV, SQL inserts, or NDJSON. Add a seed to get the same data every time.
UUID v5 Generator
Generate deterministic name-based UUIDs from a namespace and a name. Supports version 5 and version 3, single values or whole batches.
HTTP Status Codes Reference
Search every HTTP status code, see what it means, and copy it with a click.
API Key Generator
Generate cryptographically random API keys and tokens in hex, base62, or base64url, with control over length, an optional prefix, and bulk output.
ASCII Table Reference
The full ASCII character set with decimal, hex, octal, binary, and HTML codes. Search by code, character, or name.
Atbash Cipher
Mirror the alphabet so A swaps with Z, B with Y, and so on. Atbash is its own inverse, so one field both encodes and decodes as you type.