Toolvist

Credit Card Validator

Validate card numbers with the Luhn algorithm and detect the card type.

Spaces and dashes are ignored. Nothing is stored or sent.

Validation

—

Detected network: —

Length: —

Masked: —

Check digit: —

Enter a card number to validate it.

Free Credit Card Validator (Luhn Check)

Verify whether a card number is structurally valid using the Luhn algorithm, and detect the issuing network (Visa, Mastercard, American Express, etc.). Nothing is stored or transmitted — the check runs purely in your browser.

Card numbers carry a Luhn checksum; bank accounts use a different scheme, which the IBAN Validator checks. Neither tool stores what you paste.

How to use the Card Validator

  1. 1 Enter the card number you want to check.
  2. 2 Read whether it passes the checksum, and which card type the prefix suggests.
  3. 3 Check the length against the expected range for that issuer.
  4. 4 Clear the field when you are done.

How to Use

Type or paste a card number (spaces and hyphens are ignored) and the result updates instantly. You can also generate valid test numbers for each network.

  • Luhn (mod 10) checksum validation
  • Detects Visa, Mastercard, Amex, Discover, JCB, Diners and UnionPay
  • Shows the number length and masked form
  • Generate valid test numbers for development
  • No card data is ever sent anywhere

What Luhn does and does not check

The Luhn algorithm catches most typos and single-digit errors, so it is the standard pre-check for card input forms. It cannot confirm that a card exists, is active, or has funds — only your payment processor can do that.

Frequently asked questions

Does a valid number mean the card is real?

No. The check is the Luhn algorithm, a simple checksum that catches typos and most transposed digits. Any number can be constructed to pass it — a made-up 16 digits with the right check digit will validate. Only the issuing bank can confirm a card exists.

How does Luhn work?

Double every second digit from the right, subtract 9 from any result above 9, then sum everything. If the total is divisible by 10 the number is well-formed. It is designed to catch single-digit errors and most adjacent transpositions, not to prove authenticity.

Is it safe to enter my card number here?

The check runs locally and nothing is transmitted, but you should not paste a real card number into a web page you do not control. Test with the published dummy numbers that issuers reserve for exactly this purpose.

Related Security & Cryptography Tools

Browse all Security & Cryptography Tools →

You might also need

Tools from other categories that people pair with the Card Validator:

Browse the full tool directory →