Credit Card Validator – Luhn Check & Card Type Detection
Check whether a credit card number passes the Luhn (mod 10) checksum and see which network issued it — Visa, Mastercard, Amex, Discover, JCB, Diners, Maestro, UnionPay, Elo, Hipercard, Dankort, or Mada. A step-by-step breakdown shows every doubled digit and the running sum. Built for developers testing payment forms — runs fully in your browser, so use test numbers only.
🔒 Pure browser tool — nothing is uploaded.
Card Number
Card Details
Test Card Numbers
Click to use these test numbers:
Invalid test numbers:
Validation Result
Card Number Prefixes
| Card | Prefix | Length |
|---|---|---|
| Visa | 4 | 16 |
| Mastercard | 51-55, 2221-2720 | 16 |
| American Express | 34, 37 | 15 |
| Discover | 6011, 65 | 16 |
| JCB | 35 | 16 |
| Diners Club | 36, 38 | 14 |
| Maestro | 5018, 5020, 5038, 6304, 6759, 6761-63, 6771 | 12-19 |
| UnionPay | 62 | 16-19 |
| Elo | 5066, 5067, 509, 6363 | 16 |
| Hipercard | 6062, 3841 | 16 |
| Dankort | 5019 | 16 |
| Mada | 5297, 5892, 4370, 4903 | 16 |
How to validate a credit card number
- Type or paste a card number into the field — it auto-formats into 4-digit groups as you type.
- Click Validate Card Number (or press Enter), or tap one of the test-card buttons.
- Read the result: the detected network, digit count, and whether the Luhn checksum passes.
- Open the Luhn Algorithm Breakdown to see every digit, which ones are doubled, and the running sum mod 10.
The Luhn check confirms the number is internally consistent — it cannot tell you whether a card is real, active, or funded. Use it for client-side form validation to catch typos before a number ever reaches a payment processor, and always test with the provided dummy numbers rather than live cards.
Related developer tools: