A barcode decoder reads the bar-and-space widths of a one-dimensional barcode to recover its digits or characters, then validates the check digit that guards against misreads.
Example
9780306406157Type: EAN-13 (ISBN-13)
Check digit: ✓ valid
ISBN-10: 0306406152
GS1 prefix: 978 — Books / periodicals (where the barcode was registered, not where it was made)What is the Barcode Decoder (UPC / EAN / ISBN)?
Linear barcodes encode data in the relative widths of bars and spaces. The families you meet in practice are UPC-A (12 digits, North American retail), EAN-13 (13 digits, the global standard, with ISBN-13 as the book-specific subset), Code 128 (variable-length alphanumeric, used in logistics) and Code 39 (older, alphanumeric, common on ID badges and inventory tags).
Every retail barcode ends in a check digit computed from the preceding digits with a weighted sum. It exists because a scanner reading at speed across a curved package will occasionally misread a bar; a failing check digit turns a silent data corruption into a rejected scan.
In an EAN-13 the leading digits carry meaning too: the first two or three identify the GS1 numbering organisation that issued the prefix, which is roughly (but only roughly) a country of registration.
How to use the Barcode Decoder (UPC / EAN / ISBN)
- Upload a clear, straight-on image of the barcode.
- Read the decoded digits and the symbology the decoder identified.
- Confirm the check-digit validation passed before trusting the number.
When to use it
- Reading a product code from a photograph for catalogue or inventory work.
- Validating that a generated barcode carries a correct check digit before printing.
- Recovering an ISBN from a book cover photo.
Barcode Decoder (UPC / EAN / ISBN) at a glance
| UPC-A | 12 digits — North American retail |
| EAN-13 | 13 digits — global; ISBN-13 is a subset |
| Code 128 | Variable-length alphanumeric, logistics |
| Check digit | Weighted modulo-10 sum, always the last digit |
Frequently asked questions
What is the check digit for?
It catches misreads. Every retail barcode's last digit is computed from the others, so a single misread digit produces an arithmetic mismatch and the scan is rejected rather than silently wrong.
What is the difference between UPC and EAN?
UPC-A is 12 digits and EAN-13 is 13. An EAN-13 beginning with 0 is exactly a UPC-A with a leading zero, which is why modern scanners treat them as one system.
Does the barcode tell me the country of origin?
No — the GS1 prefix identifies the numbering organisation the company registered with, not where the product was made. A 50x prefix means UK-registered, not UK-manufactured.
Last reviewed · found a mistake? contact@decoder.tools · view as markdown