Barcode Validator - EAN/UPC/Code128/Code39 Check
Validate EAN/UPC/Code39/Code128/ITF-14 barcodes for length, charset, and check digits with batch paste — all locally in your browser.
This tool runs in your browser: what you enter is processed on your device and normally never appears in a request to any server.
Usage Guide
ISBNs, EAN-13s, and IMEIs all carry self-checking digits. Before books go on shelves, goods go into inventory, or devices enter an asset ledger, a format check stops scanner misreads and transcription errors at the door. This tool auto-detects four common formats — ISBN-13 (978/979 book prefix), ISBN-10 (mod-11 variant), EAN-13 (retail barcodes), and IMEI (device identifiers, Luhn) — recomputes the check digit, and breaks the number down. Format validation only, fully local.
1. How to validate
All arithmetic happens in the browser. In scan-driven intake, this single step catches one-digit misreads before they reach the database.
- Paste the number (hyphens and spaces in ISBNs are ignored; 15-digit IMEISV is recognized).
- Validate: the tool infers the format from length and prefix, recomputes the check digit, and reports identification, pass/fail, and the breakdown.
- When the format is ambiguous, the closest candidates are listed with their differences (e.g., “looks like EAN-13 but the check digit should end in 7”).
2. How the four formats are told apart
ISBN-13: 13 digits starting 978 or 979 (the book prefix), checked with alternating 1,3,1,3… weights mod 10. EAN-13: 13 digits with country/application prefixes — 45/49 Japan, 69 mainland China, 2 for in-store codes — same algorithm as ISBN-13; the difference is domain, not math. ISBN-10: 10 characters (last may be X), positional weights 10 down to 2, mod 11; books published before 2007 use this. IMEI: 15 digits with Luhn; 14 digits is the legacy no-check-digit form, and 16 digits is usually IMEISV where the two software-version digits sit outside the Luhn sum.
3. The algorithms at a glance
EAN/ISBN-13: odd positions ×1, even ×3; the check digit is what brings the sum to the next multiple of ten. ISBN-10: weights 10..2, remainder 0 passes, remainder 10 is written X. Luhn (IMEI): from the second-rightmost digit, double every other digit and add the digits of the products; total mod 10 must be 0. Each scheme is designed to catch single-character errors; the alternating 1/3 weights also catch all adjacent transpositions, while Luhn misses a few (09↔90). Know the blind spots when you pick one for your pipeline.
4. Practical scenarios
- Library work: pre-2007 books carry ISBN-10; convert by prefixing 978 and recomputing. Modern barcodes match the ISBN-13.
- Retail intake: EAN-13 is the global retail code; a 12-digit scan is almost certainly UPC-A — prepend 0 and validate as EAN-13.
- Device ledgers: dial *#06# to display the IMEI; dual-SIM phones legitimately have two.
- Scanner noise (CR/LF, spaces): the tool tolerates whitespace, but strip control characters in your own pipeline.
5. Boundaries and compliance
This validates self-consistency, not existence: a valid ISBN does not mean the book is in print, a valid EAN does not mean the product prefix is registered with GS1, and a valid IMEI says nothing about whether the device is legitimately on a network — lost/stolen checks go through carriers and regulators.
6. Integration notes
- Make format a hard gate and prefix-of-origin a soft hint so cross-border new items aren’t rejected.
- Batch mode validates line by line; the failure list is copy-ready for reconciliation.
- Cross-check with the Regex Library tool’s barcode entries — same rules, convenient for wiring both ends.
FAQ
ISBN-13 (the 978/979 book prefix), ISBN-10 (pre-2007 books), EAN-13 (retail barcodes), and IMEI (device identifiers) — auto-detected with the check digit recomputed; hyphens and spaces are ignored automatically.
Yes — prepend a 0 and validate as EAN-13 (UPC-A is a subset).
No. It only confirms the number is self-consistent; in-print status, GS1 registration, and network status go through the corresponding official channels.
Dial *#06# and it displays; dual-SIM phones legitimately show two IMEIs.
Books published before 2007 carry ISBN-10; the two are convertible — ISBN-13 is the number with a 978 prefix and a recomputed check digit.
Roughly: 69 means mainland China, 45/49 Japan, and a leading 2 an in-store code. Treat it as a hint rather than a hard rule, so legitimate cross-border new items are not blocked.