Validate any card number with Luhn check and brand detection
Spaces and dashes are ignored. Validation is format-only — no real card data is sent anywhere.
Load a test number
Valid card number
Passes Luhn check and has a recognised length for this brand.
Formatted Number
Detected Brand
Visa
Valid lengths: 13, 16, 19 digits
Digit Count
16
Correct length for this brand
Checks
| Position (R→L) | Digit | Action | Value |
|---|---|---|---|
| 1 | 6 | keep | 6 |
| 2 | 6 | ×2 = 12 − 9 = 3 | 3 |
| 3 | 3 | keep | 3 |
| 4 | 0 | ×2 = 0 | 0 |
| 5 | 3 | keep | 3 |
| 6 | 8 | ×2 = 16 − 9 = 7 | 7 |
| 7 | 2 | keep | 2 |
| 8 | 1 | ×2 = 2 | 2 |
| 9 | 1 | keep | 1 |
| 10 | 5 | ×2 = 10 − 9 = 1 | 1 |
| 11 | 1 | keep | 1 |
| 12 | 0 | ×2 = 0 | 0 |
| 13 | 2 | keep | 2 |
| 14 | 3 | ×2 = 6 | 6 |
| 15 | 5 | keep | 5 |
| 16 | 4 | ×2 = 8 | 8 |
| Sum | 50 (mod 10 = 0) → ✓ valid | ||
The Credit Card Validator uses the Luhn algorithm to instantly verify whether a card number is structurally valid and detects the card brand by prefix — Visa, Mastercard, Amex, Discover, Diners Club, or JCB. Ideal for developers testing checkout flows and payment integrations, it runs entirely in the browser with no data transmitted anywhere.
The Luhn algorithm (also called Modulus 10) is a simple checksum formula used to validate card numbers. Starting from the rightmost digit, every second digit is doubled; if doubling produces a number greater than 9, subtract 9. If the total sum of all digits is divisible by 10, the number is valid.
No. It only checks that the number is mathematically valid (correct format and Luhn checksum). It cannot verify whether a card account actually exists, has funds, or is active. Use it for testing payment forms with synthetic test numbers only.
Card brands are identified by their IIN (Issuer Identification Number) — the first several digits of the card number. For example, Visa numbers always start with 4, Amex with 34 or 37, and Mastercard with 51–55 or the 2221–2720 range.
Card networks publish official test numbers. Visa typically uses 4111 1111 1111 1111, Mastercard uses 5500 0000 0000 0004, and Amex uses 3714 496353 98431. The sample buttons in this tool load well-known passing test numbers for each brand.