Check Digit Calculator
Validate or compute check digits for card numbers and IMEIs (Luhn), EAN-13, EAN-8, UPC-A and GTIN-14 barcodes, and ISBN-10 and ISBN-13, with ISBN conversion.
Free · No sign-up · Your inputs stay in your browser
Input
Validate and compute check digits (Luhn, EAN, ISBN)
Output
5 of 5 valid
| Input | Type | Result | Also |
|---|---|---|---|
| 4539 1488 0343 6467 | Luhn (card, IMEI, SIN) | valid | Check digit for 4539148803436467 itself: 8 |
| 978-0-596-52068-7 | ISBN-13 / EAN-13 | valid | ISBN-10: 0596520689 |
| 0-596-52068-9 | ISBN-10 | valid | ISBN-13: 9780596520687 |
| 4006381333931 | GTIN-13 (EAN-13) | valid | - |
| 490154203237518 | Luhn (IMEI or card) | valid | Check digit for 490154203237518 itself: 3 |
Luhn (mod 10) protects card numbers and IMEIs; GTIN weights digits 3,1,3,1 from the right and covers EAN, UPC and ISBN-13; ISBN-10 uses weights 10 down to 2 with X for 10. A check digit catches typos, not fraud: a valid Luhn number says nothing about whether the card exists. Use your payment provider's published test numbers for test payments.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
What a check digit catches
Check digits detect typing errors: every single wrong digit and most swaps of two adjacent digits. They prove nothing about whether a card, product or book exists. Validate format early in a form to catch typos, and leave real validation to the payment provider or the catalogue.
Test card numbers
Payment providers publish test numbers that pass Luhn and work only in test mode, such as Stripe's 4242 4242 4242 4242. Use those rather than generating numbers that might belong to someone. The GTIN algorithm is documented by GS1.