Luhn / Test Card Validator
Check a number with the Luhn algorithm, find the card brand, and get public test card numbers for Stripe and Razorpay. Test numbers only.
Numbers
Stays in your browserOfficial public test card numbers
Official public test card numbers
| Brand | Gateway | Number | Note |
|---|---|---|---|
| Visa | Stripe | 4242424242424242 | Succeeds |
| Visa (debit) | Stripe | 4000056655665556 | Succeeds |
| Mastercard | Stripe | 5555555555554444 | Succeeds |
| Mastercard (2-series) | Stripe | 2223003122003222 | Succeeds |
| American Express | Stripe | 378282246310005 | Succeeds |
| Discover | Stripe | 6011111111111117 | Succeeds |
| Diners Club | Stripe | 3056930009020004 | Succeeds |
| JCB | Stripe | 3566002020360505 | Succeeds |
| UnionPay | Stripe | 6200000000000005 | Succeeds |
| Visa | Razorpay | 4386289407660153 | Domestic test card |
| Mastercard | Razorpay | 5267318187975449 | Domestic test card |
| Visa | Common | 4111111111111111 | Widely used test number |
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Free Online Luhn / Test Card Validator
Check whether a number passes the Luhn rule and which card brand it belongs to. Use the list of public test numbers when you build or test a payment form. It gives developers a quick browser-based way to solve a focused luhn / test card validator task before moving the result into a project.
How to use Luhn / Test Card Validator
Enter one number per line. Spaces and dashes are ignored.
Common mistakes
- Pasting a real card number: use a test number instead.
- Reading "valid" as "this card works": it only passed the Luhn check.
Frequently asked questions
What is the Luhn algorithm?
A simple check-digit rule used by card numbers, IMEI numbers and some ID numbers. It catches most single-digit mistakes and swapped neighbours. It does not say the number is a real account.
Can this tell me if a card is real?
No. Only the card issuer can. This tool only checks the shape of the number.
Are the test numbers safe to use?
They are published by the payment gateways for testing in their test modes. They do not work for real payments. Always check the gateway documentation for the latest list.
Is the number stored?
No. It is not saved, logged or sent. Even so, please use test numbers only.
How do I use this luhn / test card validator tool?
Use the interactive controls above; processing stays in your browser and the result is intended as a practical starting point for development work.
More DevOps & Network
Docker Compose BuilderBuild a Docker setup by picking servicesDockerfile LinterFind problems in a DockerfileKubernetes YAML ValidatorCheck Kubernetes files before deploying.env Parser & ValidatorCheck .env settings files.gitignore GeneratorCreate a .gitignore for your projectNginx Config GeneratorCreate a web server config.htaccess GeneratorCreate redirects and HTTPS ruleschmod CalculatorWork out file permission numbers