How to use the Card Number Validator (Luhn)
- Enter a card number (test numbers like 4111 1111 1111 1111 work).
- Read whether it passes the Luhn check.
- See the detected card network and length.
What does this tool do?
Card numbers end in a check digit calculated with the Luhn algorithm, which catches most single-digit typos and swapped digits. Developers use this check to validate input before sending it to a payment processor.
The first digits identify the network: 4 for Visa, 51–55 or 2221–2720 for Mastercard, 34 or 37 for American Express.
Why use it?
- Luhn validation.
- Network detection.
- Runs only in your browser.
Accuracy and limits
- Passing the check doesn't mean a card is real or active. Use test numbers — never share real card details with websites you don't trust.
Privacy
The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.
Last reviewed by the M2Toolkit team.