Credit Card Validator
Check a card number with the Luhn algorithm and identify the likely brand. Format check only.
Runs in your browser Your input never leaves your device.
About this tool
Checks whether a card number is well formed. It removes spaces and dashes, requires 12 to 19 digits, runs the Luhn checksum and guesses the brand (Visa, Mastercard, American Express, Discover, Diners Club or JCB) from the starting digits. That is all it does. A number that passes the Luhn check is only correctly formatted: it does not prove the card exists, is active, has funds or belongs to anyone. The tool does not check expiry dates or security codes. It runs in your browser and nothing is sent to our server, but you should still avoid pasting real card numbers on any website and use test numbers instead.
How to use it
- Type or paste the card number. Spaces and dashes are allowed.
- Read the Luhn result, the guessed brand and the digit count.
- Use a published test number if you are checking a payment form.
Example
A widely published Visa test number; changing the last digit to 2 makes it fail.
4111 1111 1111 1111
✓ Passes the Luhn check Brand: Visa Length: 16 digits
Common problems
- Passes Luhn but the payment is declined
- Luhn only catches typos. The issuer still has to approve the card, so a passing number can be fake, expired or blocked.
- Brand shows Unknown
- Only the six listed brands are recognized by their leading digits. Other networks, such as UnionPay or Maestro, are reported as Unknown even if the number is valid.
- Error asking for a card number
- Input must be 12 to 19 digits after spaces and dashes are removed. Letters and other symbols are not accepted.