My Tools Garage

Credit Card Validator

Check a card number with Luhn and detect its brand.

in-browser

Validated locally with the Luhn algorithm — never use a real card here, and nothing is sent anywhere.

How to use

  1. 1 Paste or type a card number (spaces and dashes are fine).
  2. 2 See whether it passes the Luhn check and length test.
  3. 3 Read the detected brand and the formatted grouping.
  4. 4 Copy the formatted number if you need it.

About Credit Card Validator

The Credit Card Validator checks whether a payment card number is well-formed and identifies the issuing brand.

It runs the Luhn (mod-10) checksum that every major network uses as a first line of defence against typos, then confirms the number has a length appropriate to its brand.

From the leading digits it recognises Visa, Mastercard (including the 2-series range), American Express and Discover.

This is the same lightweight check a payment form runs before it ever contacts a bank: it cannot tell you that a card exists, has funds, or is active, but it instantly catches mistyped digits and obviously invalid input.

The tool also formats the number into readable groups — four-digit blocks for most brands and the 4-6-5 grouping Amex uses — so you can compare it against a printed card at a glance.

Everything happens locally in your browser; the number is never sent anywhere, which is exactly why you should only ever paste test numbers here, never a real card.

Developers use it to verify the test cards their payment gateway expects, to debug a checkout form, or to confirm that their own Luhn implementation agrees with a reference.

FAQ

Does a valid result mean the card is real?

No. It only means the number is well-formed and passes Luhn. Only the issuing bank can confirm a card exists or has funds.

Which brands are detected?

Visa, Mastercard (including the 2221–2720 series), American Express and Discover, based on their issuer prefixes.

Is the number sent to a server?

No. Validation is done in your browser. Even so, never enter a real card number — use published test numbers.