Developer Tools · Batch checks
Bulk Luhn checker.
Check a list of test card numbers, or any numbers that carry a Luhn check digit. Output is masked by default, and the list never leaves your browser.
Short answer: the Luhn check doubles every second digit from the right, adds the digits, and passes when the total is divisible by 10. This page does it for every row, and in card mode it also matches the brand and length. It cannot tell you a card is real, active or has funds.
Use test numbers, not live cards
This tool is meant for developers, QA testers and anyone cleaning a list of identifiers that use the Luhn check. The sensible input is the test card numbers that payment providers publish, or lists of IDs such as IMEIs. Do not paste a list of live customer card numbers into any web page. Here the numbers are processed locally and output is masked, but the safest habit is to keep real card data inside systems that are built and audited for it.
What it checks
The Luhn algorithm, described by Hans Peter Luhn in a 1960 patent, is a modulus-10 checksum. It is used on payment card numbers, IMEIs, Canadian SINs and other identifiers. Working from the rightmost digit, every second digit is doubled; a doubled value above 9 has 9 subtracted; everything is summed; a total divisible by 10 passes. The tool has two modes. In any number mode it applies only that test to numbers of 2 to 40 digits. In card mode, which is the default, it also looks at the prefix and length.
Card mode recognises Visa (starts with 4; 13, 16 or 19 digits), Mastercard (51 to 55 or 2221 to 2720; 16), American Express (34 or 37; 15), Discover (6011, 644 to 649, 65 or 622126 to 622925; 16 to 19), JCB (3528 to 3589; 16 to 19), Diners Club (30, 36, 38 or 39; 14 to 19) and UnionPay (62; 16 to 19). These ranges are the commonly published ones, summarised in the Wikipedia article on payment card numbers. A prefix not in the table is reported as an unrecognised brand with the length unchecked.
Worked example
Take 79927398713, the standard example. From the right: 3 stays, 1 doubles to 2, 7 stays, 8 doubles to 16 and becomes 7, 9 stays, 3 doubles to 6, 7 stays, 2 doubles to 4, 9 stays, 9 doubles to 18 and becomes 9, 7 stays. The total is 3 + 2 + 7 + 7 + 9 + 6 + 7 + 4 + 9 + 9 + 7 = 70, so it passes. Change the last digit to 0 and the total is 67, so it fails.
The Visa test number 4111 1111 1111 1111 passes the Luhn sum and matches Visa's prefix and a 16-digit length, so the row reads Pass with Visa in the brand column. 4111 1111 1111 1112 fails the sum. A 16-digit number starting with 4 that passes but is 18 digits long fails on length: it is Visa-prefixed but Visa lengths are 13, 16 or 19.
Masking and exports
With masking ticked, both the table and the CSV show only the last four digits, with dots in front. Brand and the reason text stay readable, so you can still see which rows failed and why. Untick the box only when you need full numbers in the export, for instance when the list is already synthetic test data. The CSV guards against spreadsheet formula injection by prefixing any cell that starts with =, +, - or @ with an apostrophe.
Privacy
The page runs the check inside a sandboxed frame with no network access, and it stores nothing in cookies or local storage. The result file leaves only as a download that you start. The advertising on this page lives outside the frame.
Common mistakes
A Luhn pass does not mean a card exists. Random 16-digit strings pass about one time in ten. Do not treat a pass as an authorisation, and do not use this to test whether a stolen number works: it has no connection to any card network and cannot do that. Another trap is treating other numbers like a card: a 9-digit SIN or a 15-digit IMEI passes Luhn but should be checked in any number mode. Finally, do not feed the page numbers with letters or leading apostrophes from a spreadsheet; rows with characters other than digits, spaces and hyphens fail with a clear reason.
What this tool does not do
It does not check the card's expiry, its security code, the issuing bank, or whether the account is open. It does not contact any card network. It does not try to guess missing digits. For numbers that are not cards, use the dedicated pages for IMEI, SIN or GTIN, which apply their own rules.
Common mix-ups
-
Often assumedThe Luhn sum tells you which bank or brand issued the card.
What the source saysISO/IEC 7812-1:2017 specifies a numbering system for identifying card issuers, including the format of the issuer identification number (IIN) and the primary account number. Issuer identity comes from that numbering scheme, which is what the brand column here reads. [1]
Checked against these sources on .
Frequently asked questions
What is the Luhn algorithm?
A modulus-10 checksum that doubles every second digit from the right, adds all the digits and passes when the total is divisible by 10. It catches most single-digit errors and many swapped digits.
What is the difference between card mode and any number mode?
Card mode also matches the brand prefix and the length for that brand. Any number mode only applies the Luhn sum to numbers of 2 to 40 digits.
Does a pass mean the card is real?
No. Many random numbers pass the Luhn sum. Passing says nothing about whether a card was issued, is active or has funds.
Which card brands are recognised?
Visa, Mastercard, American Express, Discover, JCB, Diners Club and UnionPay, using their commonly published prefix and length ranges. Other prefixes are reported as unrecognised.
Why is the output masked?
Card numbers are sensitive. With masking on, only the last four digits appear in the table and the exported CSV.
Should I paste real customer card numbers?
No. Use published test numbers. This page processes the list locally, but real card data belongs only in systems built for it.
How many rows can I check?
Up to 50,000 rows from a file of up to 5 MB.
Is anything uploaded?
No. The list is read in your browser inside a frame with no network access. The only output is a CSV you download.
Sources
Retrieved
Format check only — not a lookup
This page tests whether each value is structurally valid under the published rule. It does not contact any registry, bank, carrier or issuer, and a pass does not show that a number was issued, is active or belongs to anyone. Your list is processed in your browser and is not uploaded.