Credit card validator | Validate Your Cards Instantly
Validate your credit card number with our Credit Card Validator. Enter your card number to verify its authenticity, format, and issuer details. Ideal for secure card information validation.
Test card numbers
Standard test numbers published by payment processors. They pass the Luhn check but belong to no account, no bank and no person - nothing can be charged to them.
| Card type | Test number | |
|---|---|---|
| Visa | 4111 1111 1111 1111 | |
| Mastercard | 5555 5555 5555 4444 | |
| American Express | 3714 496353 98431 | |
| Discover | 6011 1111 1111 1117 | |
| Diners Club | 3056 930902 5904 | |
| JCB | 3530 1113 3330 0000 | |
| UnionPay | 6212 3456 7890 1232 | |
| Maestro | 6759 6498 2643 8453 | |
| Broken checksum | 4111 1111 1111 1112 |
The last row is deliberately broken so you can see what a failed checksum looks like.
Card number formats by network
Every network owns a range of leading digits and a fixed set of lengths. This tool uses exactly these rules to name the network.
| Network | Starts with | Length | Security code |
|---|---|---|---|
| Visa | 4 | 13, 16, 19 | 3 digits |
| Mastercard | 51-55, 2221-2720 | 16 | 3 digits |
| American Express | 34, 37 | 15 | 4 digits |
| Discover | 6011, 644-649, 65 | 16, 19 | 3 digits |
| Diners Club | 36, 38, 300-305 | 14, 16, 19 | 3 digits |
| JCB | 3528-3589, 2131, 1800 | 16, 17, 18, 19 | 3 digits |
| UnionPay | 62 | 16, 17, 18, 19 | 3 digits |
| Maestro | 5018, 5020, 5038, 6304, 6759, 6761-6763 | 12, 13, 14, 15, 16, 17, 18, 19 | 3 digits |
| Mir | 2200-2204 | 16 | 3 digits |
| Elo | 4011, 4312, 4389, 4514, 4573, 5041, 5066, 6277, 6362, 6363 | 16 | 3 digits |
| Hipercard | 606282, 3841 | 16, 19 | 3 digits |
| RuPay | 6521, 6522, 8172-8175, 5081-5089 | 16 | 3 digits |
| Troy | 9792 | 16 | 3 digits |
| Dankort | 5019 | 16 | 3 digits |
| Verve | 5060, 5078, 6500 | 16, 18, 19 | 3 digits |
| InstaPayment | 637-639 | 16 | 3 digits |
| UATP | 1 | 15 | 3 digits |
What is credit card validation?
Credit card validation checks whether a card number is built correctly: the right length, a prefix that belongs to a real card network, and a final check digit that matches the Luhn (mod 10) formula. Payment forms run this check before sending anything to the bank, because it catches typos instantly and for free. It is a structural test only - it says nothing about whether the card exists, has money on it, or has been blocked.
How does credit card validation work?
Network detection
The first digits (the IIN or BIN) identify the network: 4 is Visa, 51-55 and 2221-2720 are Mastercard, 34 and 37 are American Express, and so on.
Length validation
Each network uses fixed lengths - 15 digits for American Express, 16 for Mastercard, 13, 16 or 19 for Visa. A length that does not match the prefix is a typo.
Luhn algorithm check
Every second digit from the right is doubled, the digits are added together, and the total must divide evenly by 10. This catches almost every single-digit typo and most swapped pairs.
Optional expiry and CVV check
If you add an expiry date it is compared with today's date, and the security code is checked against the length the network uses (4 digits for American Express, 3 for everyone else).
What the digits on a card mean
A card number is not random. Under ISO/IEC 7812 it splits into three parts: the issuer identification number, the individual account number and a single check digit.
- Digit 1 - Major Industry Identifier. Names the industry that issued the card: 4 and 5 are banking and finance, 3 is travel and entertainment, 1 and 2 are airlines.
- Digits 1-6 (up to 8 since 2022) - Issuer Identification Number. Identifies the network and the specific issuing bank. Merchants use it to route the payment and to guess the card country.
- Middle digits - individual account number. The issuer's own reference for the account. This is the part that makes each card unique.
- Last digit - check digit. Calculated from every other digit with the Luhn formula so that any single mistyped digit breaks the total.
A valid number is not a real card
Passing the Luhn check only proves the digits are internally consistent. It cannot tell you whether the card was ever issued, whether it is active, what the balance is, or who owns it. Only the issuing bank knows that, and it only answers through the payment network during a real authorisation. Any site claiming to check a card's balance or status from the number alone is either mistaken or fishing for card data.
What this tool is used for
- Testing payment forms and checkout flows with numbers that are safe to type in.
- Catching a typo before you contact support about a declined payment.
- Learning or teaching how the Luhn algorithm and BIN ranges actually work.
- Checking that data imported from a form or a CSV file has the right shape.
About the CVV (card verification value)
The CVV, CVC or CID is the short code printed on the card: 3 digits on the back for Visa, Mastercard, Discover and most others, 4 digits on the front for American Express. It is never stored in the magnetic stripe or the chip and must never be stored by a merchant, which is why it proves you physically hold the card. It is not part of the card number and it is not covered by the Luhn checksum.
Security tips
- Only type a real card number into a site you are actually buying from, and only over HTTPS.
- Use the published test numbers below for development - never a real card.
- No legitimate service asks for your card number to "verify" or "reactivate" it by email, chat or phone.
- Turn on transaction alerts and read your statement every month.
- Use a virtual or single-use card number for subscriptions and unfamiliar shops.
- Never store the CVV anywhere - no merchant is allowed to keep it.
Use this tool from your AI agent
Free JSON API and Model Context Protocol (MCP) server. No signup, no API key, CORS open. Designed for Claude, ChatGPT, Cursor, scripts and frontend apps.
curl -X POST https://mate.tools/api/v1/credit-card-validate.php \
-H "Content-Type: application/json" \
-d '{"number":"4111 1111 1111 1111"}' import urllib.request, json
req = urllib.request.Request(
"https://mate.tools/api/v1/credit-card-validate.php",
data=json.dumps({"number":"4111 1111 1111 1111"}).encode(),
headers={"Content-Type": "application/json"},
)
with urllib.request.urlopen(req) as r:
print(json.load(r)) const r = await fetch("https://mate.tools/api/v1/credit-card-validate.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"number":"4111 1111 1111 1111"}),
});
console.log(await r.json()); Add to claude_desktop_config.json (Claude Desktop), ~/.cursor/mcp.json (Cursor), or any other MCP-compatible client:
{
"mcpServers": {
"mate-tools": {
"command": "npx",
"args": ["-y", "@mate-tools/mcp-server"]
}
}
} Frequently asked questions
Often used together with: Secure password Generator · Password strength checker