For faster support contact Telegram
Bank-grade encryption Accepted in 150+ countries Instant virtual cards

Credit Card Validator

All Tools

Credit Card Validator

Check if a credit or debit card number is correctly formed: Luhn (mod 10) check, length rules and network detection for Visa, Mastercard, Amex and more. Runs in your browser.

Enter card number to validate

Typo or trouble? What a credit card validator really tells you

A credit card validator answers one narrow question: is this card number correctly formed? It does that offline, in a fraction of a second, by running three checks that every major card network builds into its numbers:

  • The Luhn (mod 10) checksum. The last digit of a card number is a check digit calculated from all the others. If a single digit is mistyped, the check fails.
  • The network prefix. The first digits, known as the IIN or BIN, reveal whether the card belongs to Visa, Mastercard, American Express, Discover, JCB, UnionPay, Diners Club, Maestro, Mir or RuPay.
  • The length rule. Each network issues numbers of fixed lengths, for example 15 digits for American Express and 13, 16 or 19 for Visa.

That makes this credit card number validator ideal for catching typos before a payment form is submitted, testing a checkout integration, or checking whether a number in a spreadsheet is plausible. What it cannot do, and what no honest validator can do, is tell you whether a card is real, active or funded. More on that below.

Check a card number in three moves

  1. Type or paste the number into the box above. Spaces and dashes are fine, and the digits are grouped automatically the way they are printed on the card: 4-4-4-4 for most cards and 4-6-5 for American Express.
  2. Press Validate or hit Enter.
  3. Read the verdict. You will see whether the number passes the Luhn check and the length rule, which network it belongs to, its BIN and how many digits its security code should have.

Not sure what to try? Use one of the official test numbers under the box, such as Stripe's Visa test card 4242 4242 4242 4242. Never type a real card's number into a website you do not trust, and never type a real CVV anywhere other than the checkout you are paying at.

Decoding your result, line by line

Result lineWhat it means
Valid format / Invalid numberThe overall verdict: the number passes the Luhn check and has a length its network allows.
NetworkThe card scheme detected from the prefix. "Not recognised" means the prefix does not match the major international ranges, which is common for domestic schemes.
Luhn (mod 10) checkWhether the check digit matches the rest of the number.
LengthHow many digits you entered, and what the network expects.
BIN / IINThe first 6 digits, plus the 8-digit version for longer numbers. Open it in our BIN checker to see the issuing bank and country.
Security codeHow many digits the card's CVV, CVC or CID has, and what that network calls it. The tool never asks for the code itself.

The 1954 formula hiding in every card number

The check behind every card number validator was invented by IBM engineer Hans Peter Luhn, who filed his "Computer for Verifying Numbers" patent on 6 January 1954. It was granted on 23 August 1960 as US Patent 2,950,048, and the method is now specified in the card numbering standard ISO/IEC 7812-1.

Run it by hand in four steps

  1. Starting with the second digit from the right, double every other digit.
  2. If doubling gives a two-digit number, add its digits together (or subtract 9). So 7 doubled is 14, which becomes 5.
  3. Add up all the digits, doubled and untouched.
  4. If the total ends in 0, the number passes.

For the test number 4242 4242 4242 4242, the eight doubled 4s become 8s and add up to 64, the eight untouched 2s add up to 16, and the total of 80 ends in 0. Valid. Change any one digit and the total no longer ends in 0, which is exactly why a single typo is always caught.

What Luhn catches, and what slips through

Error typeExampleCaught?
Any single wrong digit4242 → 4243Always
Two neighbouring digits swapped…42… → …24…Almost always
Swapping 0 and 9…09… → …90…No
"Twin" errors…22… → …55…, 33 → 66, 44 → 77No
A made-up number with the right check digitAny random number ending in the "correct" digitNo

The last row matters most. For any string of digits, exactly one of the ten possible final digits makes the Luhn check pass, so one random number in ten looks "valid". Luhn was designed to catch accidental errors, not deliberate fakes.

Prefixes and lengths: every network's fingerprint

A card number starts with a Major Industry Identifier (its first digit) and an Issuer Identification Number of 6 or 8 digits, a format the 2017 revision of ISO/IEC 7812 extended from the old 6-digit IIN. Card numbers can be up to 19 digits long. These are the ranges this validator recognises:

NetworkStarts withLengthSecurity code
Visa413, 16, 193-digit CVV2
Mastercard51–55, 2221–2720163-digit CVC2
American Express34, 37154-digit CID, on the front
Discover6011, 644–649, 6516–193-digit CID
JCB3528–358916–193-digit CAV2
Diners Club International30, 36, 38, 3914–193 digits
UnionPay6216–193-digit CVN2
Maestro5018, 5020, 5038, 5893, 6304, 6759–676312–193 digits
Mir2200–220416–193 digits
RuPay60, 65, 81, 82, 508163 digits

Two details trip up older validators. Mastercard numbers starting with 2 (the 2-series) are fully valid, and some UnionPay cards do not use a Luhn check digit at all, as noted in Baymard Institute's card pattern reference. This tool handles both.

Validating cards in Egypt

Alongside Visa and Mastercard, Egyptian banks issue cards on Meeza, the national payment scheme launched in 2019, owned by Egyptian Banks Company and regulated by the Central Bank of Egypt. Meeza's number ranges are not published in an official public list, so this validator may show its network as "Not recognised". The Luhn and length checks still run, and Egyptian Visa and Mastercard cards are detected like any others.

Validating cards in the United States

US cards follow the same international rules, with no extra local format. Validation matters there for another reason: according to the Nilson Report, the US generated 25.29% of the world's card volume in 2023 but 42.32% of its $33.83 billion in card fraud losses.

Why we will never ask for your CVV

Plenty of people search for a "credit card validator with CVV" or a "validator with expiry date and CVV". Here is the honest answer: the security code is not mathematically linked to the card number, so no formula can check it. The CVV2, CVC2 or CID is verified only by the card issuer, during a real authorization.

The payment industry treats the code as so sensitive that the PCI Data Security Standard requires that "the card verification code is not retained upon completion of the authorization process" (PCI DSS v4.0, Requirement 3.3.1.2), even with the customer's consent, as the PCI Security Standards Council confirms in its FAQ. A website that asks you to "validate" your CVV is asking for exactly the data merchants are forbidden to keep. Our validator only tells you how many digits the code should have: 4 on the front for American Express, 3 on the back for the others.

Expiry dates: a format check, not a verdict

An expiry date can be checked for format (a month from 01 to 12 and a date in the future), but whether it matches the card is again something only the issuer knows. Cards are generally valid until the last day of the month printed on them; U.S. Bank, for example, states that its cards are valid through the last day of the listed month.

"Live" card checkers and generators: the part most sites leave out

Searches like "live credit card validator", "real credit card number validator" or "credit card generator and validator" usually come from one of two places: curiosity, or fraud. A Luhn check can never tell you whether a card is live. The only way to find out is to attempt a real payment, and running card numbers through small test payments to find working ones is a recognised fraud technique called card testing or an enumeration attack.

  • Visa says enumeration attacks cause about $1.1 billion in fraud losses a year, and that 33% of enumerated accounts suffered fraud within five days (Visa, May 2024).
  • Visa recorded a 40% increase in enumeration attacks in the first half of 2023 (Visa Biannual Threats Report).
  • In Europe, remote payments made up about 83% of card fraud in 2024, and card fraud losses rose 29% to €1.329 billion (EBA and ECB, December 2025).

Stripe lists "card checking" as another name for the same attack and blocks it with rate limits, CAPTCHAs and velocity rules (Stripe documentation). Numbers from a "generator" pass the Luhn check because the check digit is calculated, but they are not real accounts, and using them to buy anything is fraud. That is why this page has a validator and no generator. If you need a card that actually works online, get a legitimate virtual Visa or Mastercard issued for you.

Real test numbers, straight from the payment processors

Developers and QA testers do not need generated numbers. Every major payment processor publishes official test cards that pass validation and work in its sandbox:

ProcessorExample test numbersExpiry and CVC
Stripe4242 4242 4242 4242 (Visa), 5555 5555 5555 4444 (Mastercard), 2223 0031 2200 3222 (Mastercard 2-series), 3782 822463 10005 (Amex), 6011 1111 1111 1117 (Discover)Any future date; any 3 digits, or 4 for Amex
PayPal sandbox4005 5192 0000 0004 (Visa), 2223 0000 4840 0011 (Mastercard), 3714 496353 98431 (Amex)Any future date; 3 digits, or 4 for Amex
Adyen4111 1111 1111 1111 (Visa), 5555 5555 5555 4444 (Mastercard)03/2030, CVC 737

These numbers only work in each provider's test environment, and Stripe's own guidance is simple: don't use real card details when testing.

For developers: card validation that doesn't cost you customers

Checkout friction is expensive. Baymard Institute puts the average online cart abandonment rate at 70.22%; among shoppers who abandoned during checkout, 19% did not trust the site with their card details and 17% found checkout too long or complicated (Baymard, 2025). Card-field design is a direct lever on both:

  • Format as the user types. Use 4-4-4-4 spacing, and 4-6-5 for Amex. Baymard found that 15% of sites still don't auto-space the card field (Baymard research), and mistyped numbers are a common cause of failed payments.
  • Validate with Luhn and length before submitting, but never treat a pass as proof that the card works. Let the payment gateway's authorization decide.
  • Keep entered data on errors. Clearing the card field after a mistake forces the customer to start again.
  • Never log or store the CVV, in line with PCI DSS, and prefer your processor's hosted fields or tokenization so card data never touches your servers.
  • Rate-limit card attempts and add 3-D Secure, CAPTCHAs and velocity checks to stop card testing, as Visa and Stripe recommend.

Validator or BIN checker: which one do you need?

QuestionUse
Did I type this card number correctly?Credit card validator (this page)
Is it Visa, Mastercard or Amex, and how long should it be?Credit card validator
Which bank issued it, in which country, and is it prepaid?BIN checker
Is the card active, and does it have money on it?Only the issuing bank, through a real payment
What will a dispute cost me compared with a refund?Chargeback vs refund calculator

Your number never leaves this page

This validator runs entirely in your browser in JavaScript. The number you type is not sent to our server or anyone else's, and it is not saved. You can confirm it yourself: open your browser's developer tools, switch to the Network tab and press Validate, and you will see no request. The only time anything leaves the page is if you choose to click the BIN checker link, and then only the first 8 digits are used. There is also no app or APK to install, which is safer: be cautious of downloadable "card validator" apps that ask for full card details.

If your real card keeps getting declined online even though the number validates, the problem is usually the issuer, the card's country or its type rather than the number itself. Our guides on virtual cards for online purchases and the best virtual card providers explain the alternatives.

Sources

Frequently Asked Questions

What is a credit card validator?
A credit card validator checks whether a card number is correctly formed. It runs the Luhn (mod 10) checksum, checks the number's length against its network's rules and detects the network from the first digits. It catches typos, but it cannot tell whether a card is real, active or funded.
Does a valid result mean the card is real?
No. A valid result only means the number is well formed. About one random number in ten passes the Luhn check by chance. Only the issuing bank can confirm that a card exists, is active and has funds, and it does that during a real payment authorization.
Can I validate a credit card with CVV and expiry date?
No tool can genuinely validate a CVV or expiry date, because neither is mathematically linked to the card number. Only the issuer checks them during authorization, and PCI DSS forbids merchants from retaining the CVV after authorization. Our validator tells you how many digits the security code should have, but never asks for it.
Is this credit card validator free and safe?
Yes. It is free, needs no signup and runs entirely in your browser, so the number you type is never sent to a server or stored. You can confirm this in your browser's developer tools under the Network tab. For testing, use official test numbers such as Stripe's 4242 4242 4242 4242 rather than a real card.
Which card networks does the validator support?
Visa, Mastercard (including numbers starting with 2), American Express, Discover, JCB, Diners Club International, UnionPay, Maestro, Mir and RuPay. Numbers from other schemes, such as Egypt's Meeza, can still be checked with the Luhn and length tests.
Why does my card number fail the Luhn check?
Most often because of a typo: one wrong digit or two digits swapped. Re-enter the number carefully from the card. Some UnionPay cards do not use a Luhn check digit at all, so for UnionPay a failed check does not always mean the number is wrong.
What is the difference between a credit card validator and a BIN checker?
A credit card validator checks the whole number's format offline. A BIN checker looks up the first 6 or 8 digits in a database to show the issuing bank, country, card type and level. Use the validator to catch typos and the BIN checker to see who issued the card.
Is there a live credit card validator or checker?
No legitimate tool can check whether a card is live without making a real payment through the card network. Services that claim to do it run test transactions on card numbers, a fraud technique Visa calls an enumeration attack. Avoid them and never enter real card details into them.
Where can I get test credit card numbers?
Use the official test cards published by payment processors: Stripe (for example 4242 4242 4242 4242), PayPal's sandbox and Adyen all list numbers that pass validation and work only in their test environments. Generated numbers are not real accounts and should never be used for purchases.
Is there a credit card validator app or APK?
You don't need one. This validator works in any mobile or desktop browser without installing anything. Be careful with downloadable card validator apps or APK files that ask for full card details, as they can expose your card data.

We may use cookies or any other tracking technologies when you visit our website, including any other media form, mobile website, or mobile application related or connected to help customize the Site and improve your experience.

Learn More Accept All