Security

Credit Card Number Validator

Check whether a card number passes the Luhn checksum and identify the card network from its prefix.

Also available in:EspañolPortuguêsFrançaisDeutschItalianoNederlandsPolski

Test card numbers for development

Visa4242 4242 4242 4242
Mastercard5555 5555 5555 4444
American Express3782 822463 10005
Discover6011 1111 1111 1117

A passing checksum only means the digits are internally consistent. Whether the account exists or has funds can only be confirmed by the issuing bank.

Everything runs in your browser. Your input is not uploaded to a server.

About the Card Validator

Every payment card number carries a check digit calculated with the Luhn algorithm, which catches most single-digit typos and transpositions before a request ever reaches a payment processor. This tool runs that check and identifies the issuing network from the number prefix.

How to use the Card Validator

  1. Enter the card number; spaces and dashes are ignored.
  2. See whether the Luhn checksum passes.
  3. Read the detected card network and expected length.
  4. Use the generated test numbers for development rather than a real card.

Frequently asked questions

Does passing Luhn mean the card is real?

No. It only means the digits are internally consistent. Whether the account exists, has funds, or is active can only be answered by the issuing bank.

How does the Luhn algorithm work?

Starting from the right, double every second digit, subtract 9 from any result above 9, sum everything including the untouched digits, and check that the total divides by 10.

Is it safe to enter a card number here?

The check runs entirely in your browser with no network request. Even so, use the published test numbers rather than a live card — good habit, and it is what the tool is for.

How is the card network identified?

From the leading digits: 4 for Visa, 51–55 and 2221–2720 for Mastercard, 34 and 37 for American Express, 6011 and 65 for Discover.