How to Read a Barcode: The Numbers, Digits and Bars
To read a barcode, read the digits printed under the bars: their count tells you the type, and the type tells you which digits are the prefix, the item number and the check digit. This guide explains the numbers on UPC, EAN, ISBN and ITF-14 barcodes, the check digit and how to read the bars by eye.
By the Barcode.codes editorial teamReviewed
How to Read a Barcode Number
Start with the digits printed under the bars: their count tells you the type, and the type tells you which digits are the prefix, the item and the check digit.
| Digits | Barcode | How to read them |
|---|---|---|
| 12 | UPC-A | U.P.C. Company Prefix and item reference (11 digits), then the check digit |
| 13, starting 0 | EAN-13 of a UPC | The same GTIN-12 with a leading 0 |
| 13 | EAN-13 | GS1 Prefix (first 3 digits), the rest of the company prefix and item reference, then the check digit |
| 13, starting 978 or 979 | ISBN | A book: prefix, registration group, publisher, title, check digit |
| 13, starting 977 | ISSN | A magazine or other serial |
| 8 | EAN-8 or UPC-E | A short number for small packs; a UPC-E stands for a longer UPC-A |
| 14 | ITF-14 | Indicator digit, the 12 digits of the item's GTIN-13 without its check digit, then a new check digit |
Reading a UPC Barcode
Read the twelve digits as one number, the two outside digits included: 036000291452. Here the first digit starts the U.P.C. Company Prefix 036000, and the last is the check digit.
The First Digits Name the Issuer, Not the Country
The first three digits of an EAN-13 are the GS1 Prefix of the GS1 office that issued the company prefix. GS1 states that the prefix does not show where the product was made.
Try it: barcode number check
A UPC, EAN, GTIN-14 or ISBN number, with its check digit.
- Type
- EAN-13 (GTIN-13)
- GS1 Prefix
- 590: Issued by GS1 Poland.
- Check digit
- 7, correct
Check the Last Digit by Hand
The last digit is a check digit: weight the other digits 3, 1, 3, 1 from the right, add them up, and the check digit is what brings the total to the next multiple of 10.
- Take the digits before the check digit of EAN-13 5901234123457: 590123412345.
- From the right, multiply the digits by 3, 1, 3, 1 and so on: 5 × 3, 4 × 1, 3 × 3 and so on to the left.
- Add the results: 83.
- Subtract from the next multiple of 10: 90 − 83 = 7, which matches the last digit.
If your result differs from the printed check digit, a digit was misread or mistyped. The weights are the same for UPC-A, EAN-13, EAN-8 and ITF-14, because they are counted from the right.
Try it: check digit calculator
12 digits without the check digit.
Check digit
7
5901234123457
Show the calculation
| # | Character | Value | Weight | Product |
|---|---|---|---|---|
| 1 | 5 | 5 | ×1 | 5 |
| 2 | 9 | 9 | ×3 | 27 |
| 3 | 0 | 0 | ×1 | 0 |
| 4 | 1 | 1 | ×3 | 3 |
| 5 | 2 | 2 | ×1 | 2 |
| 6 | 3 | 3 | ×3 | 9 |
| 7 | 4 | 4 | ×1 | 4 |
| 8 | 1 | 1 | ×3 | 3 |
| 9 | 2 | 2 | ×1 | 2 |
| 10 | 3 | 3 | ×3 | 9 |
| 11 | 4 | 4 | ×1 | 4 |
| 12 | 5 | 5 | ×3 | 15 |
| Sum | 83 | |||
Nearest multiple of ten at or above 83 is 90: 90 − 83 = 7
How to Read a Barcode Manually
Each digit of a UPC or EAN barcode is seven modules wide: two bars and two spaces of one to four modules, whose widths you can look up in GS1's number set table.
- Find the left guard: a thin bar, a thin space and a thin bar.
- Take the next seven modules and measure each space and bar in modules, using the thinnest bar as one module.
- Look up the four widths in number set A below; on the right half of a UPC-A, after the middle guard, use set C, which starts with a bar.
| Digit | Widths | Digit | Widths |
|---|---|---|---|
| 0 | 3-2-1-1 | 5 | 1-2-3-1 |
| 1 | 2-2-2-1 | 6 | 1-1-1-4 |
| 2 | 2-1-2-2 | 7 | 1-3-1-2 |
| 3 | 1-4-1-1 | 8 | 1-2-1-3 |
| 4 | 1-1-3-2 | 9 | 3-1-1-2 |
Why an EAN-13 Has One Digit Without Bars
An EAN-13 encodes only 12 digits as bars. The left half mixes number sets A and B, and the pattern of A and B among its six digits spells the first digit, which is why that digit is printed outside the bars.
Reading a Barcode Without a Scanner
Type the digits under the bars into a lookup, or let a phone or laptop camera read the code in the browser.
- Digits under the bars: type them into the barcode lookup to see the type, the GS1 Prefix and whether the check digit is right.
- A camera: the Barcode.codes scanner reads 1D and 2D barcodes in the browser, with no app.
- A photo or screenshot: the barcode reader finds and reads every barcode in an image.
- 2D codes: QR codes and Data Matrix codes have no digits to read by eye, so they need a scanner.
Barcode lookup explains a barcode number: type, prefix and check digit.
Barcode scanner reads barcodes with your camera.
Frequently Asked Questions
What Does a 0 at the Start of a Barcode Mean?
On a 13-digit number it means the barcode carries a UPC: GTIN-13s are never issued from a prefix that starts with 0, so the leading 0 is the UPC-A written in 13 digits. On a 12-digit UPC-A, the first digit is usually the start of the brand's U.P.C. Company Prefix.
Why Are Some Bars Longer Than Others?
Those are the guard bars at the start, the middle and the end of UPC and EAN barcodes. GS1's standard extends them downward by five modules, so they frame the two halves of the number.
How Do I Read a Barcode on My Phone?
Open the Barcode.codes scanner in your phone's browser, allow the camera and point it at the barcode. It shows the type and the number, and for product numbers whether the check digit is right.
Can You Read a QR Code by Eye?
Not in practice: a QR code stores bits in small squares, with error correction mixed in, so it needs a scanner or a camera. The Barcode.codes reader can read one from a photo or a screenshot on a computer.
Sources
The facts in this guide come from these sources, checked on October 8, 2026.
GS1 General Specifications, Release 26.0, ratified January 2026 defines the GS1 identification keys, barcodes and Application Identifiers; the text names the sections used.
BWIPP symbology references (Code 128, Code 39, Data Matrix, PDF417, Aztec Code, MaxiCode) documents the character sets, sizes and standards of the encoder the generator uses.
Related Barcode Guides
- How do barcodes work?
How bars and modules hold data and how scanners read them.
- What is a UPC code?
The 12 digits, the check digit and how to get one.
- What is a barcode?
What a barcode is, what it holds and where it is used.
- What is an ISBN?
The book number, its five parts, and ISBN-10 vs ISBN-13.
- Barcode country codes
The GS1 prefixes and the offices that issue them.