Barcode Decoder (UPC / EAN / ISBN)
Read linear barcodes from an image and validate their check digits.
This bench is being wired up
The barcode-decoder decoder is on the roadmap. The heavier binary and cryptographic parsers ship after the core text and token decoders — all of which are already live and working.
Browse the live decodersInput is processed on your device. Nothing you paste is sent anywhere.
What is the Barcode Decoder (UPC / EAN / ISBN)?
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.
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.
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
How to use the Barcode Decoder (UPC / EAN / ISBN)
- 1Upload a clear, straight-on image of the barcode.
- 2Read the decoded digits and the symbology the decoder identified.
- 3Confirm the check-digit validation passed before trusting the number.
When you would reach for 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) — frequently asked questions
Last reviewed · questions or corrections: contact@decoder.tools