Credit Card Number Validator — Luhn Check and Brand
DeveloperA 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.
How to use
- 1Enter the card number (spaces and hyphens allowed).
- 2Press validate.
- 3Read the Luhn result, detected brand, and digit count.
Reference
| Brand | Starts with | Length |
|---|---|---|
| Visa | 4 | 13, 16, 19 |
| Mastercard | 51–55, 2221–2720 | 16 |
| American Express | 34, 37 | 15 |
| JCB | 3528–3589 | 16–19 |
| Discover | 6011, 644–649, 65 | 16–19 |
| UnionPay | 62 | 16–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.