Credit Card Number Validator — Luhn Check and Brand

Developer

A card number validator runs the Luhn checksum (ISO/IEC 7812) on a card number in your browser and identifies the brand, such as Visa or Mastercard, from its leading digits (IIN/BIN).

What is it

The last digit of a card number is a Luhn check digit designed to catch typos: starting from the second digit on the right, double every other digit (subtract 9 when the result exceeds 9); if the total is a multiple of 10, the number is structurally valid. The first few digits (IIN/BIN) identify the issuing network, which is how the brand is detected. This tool is meant for building and testing payment forms — the number is never sent anywhere, and passing Luhn does not mean a card is real or active.

Luhn: from the second-rightmost digit, double every other digit (subtract 9 if >9) → valid when the total is a multiple of 10

How to use

  1. 1Enter the card number (spaces and hyphens allowed).
  2. 2Press validate.
  3. 3Read the Luhn result, detected brand, and digit count.

Reference

Credit Card Number Validator — Luhn Check and Brand Reference
BrandStarts withLength
Visa413, 16, 19
Mastercard51–55, 2221–272016
American Express34, 3715
JCB3528–358916–19
Discover6011, 644–649, 6516–19
UnionPay6216–19

Sources & standards

FAQ

Where is the card number sent?

Nowhere. The Luhn calculation and brand detection run entirely in your browser and the number is never stored. Even so, prefer published test numbers over real card numbers.

Does passing Luhn mean the card is real?

No. Luhn is only a structural check that catches typos. Whether a card is issued, unexpired, or funded can only be confirmed by the card network and issuer.

Are there test card numbers for development?

Yes. Use the test numbers published by payment providers — for example 4111 1111 1111 1111 (Visa format) passes the Luhn check.

Related tools