Skip to main content
Calculators and validators100% FreeInstant

Credit Card Validator: Check a Card Number Format

This free credit card validator checks whether a card number is correctly formed. It runs the Luhn check, recognizes the card brand and tests the length. It does not contact a bank, and the number never leaves your browser.

By Debmedia Technologies LLP · Kolkata, India · Updated

What Is a Credit Card Validator?

A credit card validator checks whether a card number is correctly formed, without contacting any bank. Card numbers follow strict rules: the first digits identify the network, the length depends on the brand and the last digit is a check digit calculated from the others. A validator tests all three.

Developers use a credit card validator to test checkout forms, support staff use it to catch typing mistakes, and learners use it to understand how card numbers work. It cannot tell you whether a card is real, active or funded, because only the card issuer knows that.

How to Use This Credit Card Validator

  1. Type or paste a card number. Spaces and dashes are fine.
  2. Please use a test number from your payment provider, such as 4242 4242 4242 4242, and never a real card.
  3. Press Validate number.
  4. Read the three checks: the Luhn test, the brand and the length.

How the Luhn Check Works

The Luhn algorithm catches most typing errors. Starting from the right, double every second digit, subtract 9 from any result above 9, add everything together and check that the total is divisible by 10. A single wrong digit, or two swapped digits next to each other, almost always breaks the sum. You can read the full method in the Luhn algorithm explained on Wikipedia.

Card Brands and Lengths

BrandStarts withLength
Visa413, 16 or 19
Mastercard51 to 55, 2221 to 272016
American Express34, 3715
Discover6011, 65, 644 to 64916 to 19
Diners Club36, 38, 300 to 30514 to 16
JCB3528 to 358916 to 19
RuPay60, 65, 81, 82, 50816

Keeping Your Card Safe

  • The check runs only in your browser, and the number is not sent to us.
  • Still, never type a real card number into a tool you do not need to.
  • Use the test numbers that payment providers publish in their documentation.
  • A valid format is not a guarantee that a card works or belongs to anyone.

If you are building a payment or sign-up form, check how its page answers with the status code checker and review its security settings with the header viewer. For the numbers behind a business, try the ad earnings calculator. All checks on this page run in your browser.

Where This Check Helps

Use a credit card validator to test your own checkout forms, to explain card number rules to a team and to catch typing errors before a payment attempt. Real payment decisions always come from the card issuer, so a format check is only the first, quick filter.

Frequently Asked Questions

It means the number has the right format and passes the Luhn check. It does not mean the card exists, has money or is active. Only the card issuer can confirm that.
It is a simple checksum used by card numbers. It catches most typing mistakes, such as a wrong digit or two swapped digits.
Please do not. The tool works only in your browser, but you should never type a real card number into a tool you do not need to. Use test numbers from your payment provider instead.
The first digits of a card number identify the issuer network. For example, numbers starting with 4 are Visa, and 51 to 55 or 2221 to 2720 are Mastercard.

Disclaimer: results come from live requests and can change as records and servers change. We cannot guarantee that every answer matches what every visitor sees.