Credit Card Validator
Check whether a credit card number is valid with the Luhn algorithm and identify the card brand: Visa, Mastercard, Elo, American Express, Hipercard or Diners Club.
Want to generate instead?How credit card validation works
- Starting from the right, double every second digit.
- If the doubled value is greater than 9, subtract 9.
- Add up all the digits.
- If the total is a multiple of 10, the number is valid.
The tool also checks whether the number of digits matches the brand identified by the leading digits.
How to identify the card brand
- Visa: starts with 4 (16 digits)
- Mastercard: starts with 51 to 55 or 2221 to 2720 (16 digits)
- American Express: starts with 34 or 37 (15 digits)
- Elo (Brazilian brand): its own ranges, such as 636368, 438935 and 504175 (16 digits)
- Hipercard (Brazilian brand): starts with 606282 (16 digits)
- Diners Club: starts with 36, 38 or 300 to 305 (14 digits)
Is it safe to validate a card here?
Yes. The calculation runs in your browser and the number is never sent to any server. Even so, avoid typing full details of real cards on websites you do not know.
Frequently asked questions
How can I tell if a card number is valid?
The last digit of a card number is calculated with the Luhn algorithm. If the check passes and the number of digits matches the brand, the number is valid.
Does a valid number mean the card has available credit?
No. Validation only confirms the number is mathematically correct. Credit limit, status and cardholder can only be verified by the issuing bank.
How do I find the card brand from the number?
From the leading digits, known as the BIN or IIN. Visa starts with 4, Mastercard with 51 to 55 or 2221 to 2720, American Express with 34 or 37, and Elo and Hipercard have their own ranges.
Is it safe to validate a card here?
The calculation runs in your browser and the number is never sent to any server.