Card & Check-digit Validator
Is the number well formed? Luhn, GS1 and ISBN check digits, worked out step by step.
Number to check
Spaces and hyphens are ignored. Nothing you type is stored or sent.
How the check digit was worked out
Check a list
IMEI, ISBN, barcodes, ISSN · up to 5,000 linesOne number per line, using the type chosen above. Card numbers are left out of lists — check them one at a time.
| Line | Number | Result | Type | Details |
|---|
About the Card & Check-digit Validator
Check whether a number is well formed before you use it: a payment card number, a phone's IMEI, a book's ISBN, a product barcode (EAN-13, UPC-A, EAN-8, GTIN-14, SSCC) or a journal's ISSN. Each of these ends in a check digit calculated from the other digits, so most typing mistakes — one wrong digit, or two neighbouring digits swapped — can be caught without looking the number up anywhere.
Type or paste a number and the tool recognises what it is, tells you whether the check digit is right, and shows the calculation step by step. For cards it also names the network from the leading digits (Visa, Mastercard, RuPay, American Express…). For IMEI, ISBN, barcodes and ISSN it can calculate a missing check digit and convert between ISBN-10 and ISBN-13. Everything happens in your browser; nothing you type is stored or sent.
How to use it
- Paste or type the number. Spaces, hyphens and labels such as
ISBN:are ignored. - Leave the type on Auto-detect, or choose it (payment card, IMEI, ISBN, barcode, ISSN or any Luhn number) if the digits could be read more than one way.
- Read the verdict: a correct check digit, the number type, and details such as the card network, the IMEI's TAC, the ISBN-10/13 equivalent or the GS1 prefix.
- Open the step-by-step section under the result to see every digit, its weight and the sum (for a card number it shows the Luhn test of the whole number).
- Missing the last digit of an IMEI, ISBN, barcode or ISSN? Tick The last digit is missing to calculate it. To check many numbers at once, use Check a list (card numbers are checked one at a time).
Examples
4242 4242 4242 4242
Valid format — Visa, 16 digits, Luhn check digit correct
A published test number from Stripe's documentation: it passes every format check but never works for real payments.
26-053179-311383-7
Valid IMEI — TAC 26053179, serial 311383, check digit 7
The worked example of 3GPP TS 23.003 Annex B: the doubled digits and the rest add up to 53, and 60 − 53 = 7.
978-92-95055-12-4
Valid ISBN-13 · ISBN-10: 9295055128
The example from the ISBN Users' Manual. Only ISBNs beginning with 978 have an ISBN-10 form.
629104150021 (with “The last digit is missing” ticked)
6291041500213
GS1's own example: weights 1, 3, 1, 3… give 57, and the next multiple of ten is 60, so the check digit is 3.
Common uses
- Catching a mistyped card number in a payment form you are building or testing (with published test numbers).
- Checking the IMEI of a second-hand phone against the one printed on the box (dial *#06# to see it).
- Validating ISBNs, EANs and UPCs in a product or library catalogue — up to 5,000 per list, with CSV export.
- Working out the check digit for a new barcode number from your GS1 company prefix, or for an SSCC.
- Learning how the Luhn, GS1 and mod 11 algorithms work, with every step shown.
How each check digit works
- Luhn (cards, IMEI) — starting from the right, double every second digit (subtract 9 when the result is above 9), add all the digits; the total must end in 0. It catches every single-digit mistake and most swaps of neighbouring digits.
- GS1 (EAN-13, UPC-A, EAN-8, GTIN-14, GSIN, SSCC, ISBN-13) — multiply the digits by 3 and 1 alternately, starting with the digit next to the check digit; the check digit brings the sum up to the next multiple of ten.
- ISBN-10 — weights 10, 9 … 2 on the first nine digits; the check digit makes the total divisible by 11, and a value of 10 is written X.
- ISSN — weights 8 … 2 on the first seven digits, modulus 11, and 10 is again written X.
Sources: 3GPP TS 23.003 §6.2 and Annex B for IMEI, GS1's check digit method, the ISBN Users' Manual (Appendix 1) and ISSN.org.
Card networks
The network is read from the first digits (the issuer identification number), using the ranges listed in the IIN table of Wikipedia's Payment card number article. For example, Visa numbers start with 4, Mastercard with 51–55 or 2221–2720, American Express with 34 or 37, RuPay with 60, 65, 81, 82 or 508, and Discover with 6011, 644–649 or 65. Some prefixes are shared — numbers starting with 65 are issued on Discover, RuPay and Troy — and then every possibility is shown.
The tool only names the network. It does not look up the issuing bank and leaves card numbers out of lists. For a card number it only tests whether the Luhn total ends in 0 — it never works out or suggests the correct check digit — so it is a format checker, not a card generator, and it cannot tell whether a card is real or active.
What a valid check digit means
A correct check digit shows that the number is well formed — not that it exists. A card number can pass and still be expired, blocked or never issued; an IMEI can pass and belong to a stolen phone; a barcode can pass without being registered to any product. To know more, ask the issuer: the bank for a card, your operator or the national device registry for an IMEI, and GS1's Verified by GS1 service for barcodes.
The barcode GS1 prefix (for example 890 for GS1 India) shows which GS1 office issued the company prefix, not where the product was made — GS1 says so itself on its prefix list.
Limitations
- Card network ranges change over time and some national schemes overlap with others; a number on a range the tool does not list is shown as “not recognised”, but its Luhn result still applies.
- ISBN hyphens are not checked or added, because their positions depend on registration-group ranges that change.
- Numbers are checked for form only. Nothing is looked up online.
- Lists are limited to 5,000 lines, and card numbers are left out of lists on purpose.
Privacy
Numbers are checked in your browser and are never sent, logged or stored — not even in this browser's saved settings (only your chosen type is remembered). Avoid pasting real card numbers into any website you do not trust; for testing, use the published test numbers in the examples.
Frequently asked questions
Is it safe to type my card number here?
The check runs entirely in your browser: the number is not sent anywhere or saved. You can load the page, go offline and it still works. Even so, you rarely need to check a real card — for testing payment forms, use published test numbers such as 4242 4242 4242 4242.
Does “valid” mean the card works?
No. It means the number has the right length for its network and a correct Luhn check digit, so it was probably typed correctly. Only the issuing bank can say whether a card exists, has funds or is blocked.
How do I find my phone’s IMEI?
Dial *#06# on the phone, or look in the settings (About phone), on the SIM tray or on the box. An IMEI has 15 digits; a 16-digit number is usually the IMEISV, which replaces the check digit with a two-digit software version — the tool converts it back to the IMEI.
How do I convert an ISBN-10 to an ISBN-13?
Paste the ISBN-10: the tool shows the ISBN-13, which is 978 followed by the first nine digits and a new check digit. Going back works only for ISBNs that start with 978. ISBN-10s are no longer issued — since 1 January 2007 every ISBN has 13 digits.
Can it calculate a missing check digit?
Yes, for IMEI (from 14 digits), ISBN-10 (9 digits), ISBN-13 (12 digits), barcodes (7, 11, 12, 13, 16 or 17 digits) and ISSN (7 digits): tick The last digit is missing. It deliberately never calculates card check digits.
Does barcode prefix 890 mean the product was made in India?
No. 890 means the company prefix was issued by GS1 India. Companies use their prefix for products made anywhere, so the prefix says nothing about the country of origin.