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.

What the digits under a product barcode mean
DigitsBarcodeHow to read them
12UPC-AU.P.C. Company Prefix and item reference (11 digits), then the check digit
13, starting 0EAN-13 of a UPCThe same GTIN-12 with a leading 0
13EAN-13GS1 Prefix (first 3 digits), the rest of the company prefix and item reference, then the check digit
13, starting 978 or 979ISBNA book: prefix, registration group, publisher, title, check digit
13, starting 977ISSNA magazine or other serial
8EAN-8 or UPC-EA short number for small packs; a UPC-E stands for a longer UPC-A
14ITF-14Indicator digit, the 12 digits of the item's GTIN-13 without its check digit, then a new check digit

Reading a UPC Barcode

UPC-A barcode 036000291452 with its parts marked: the first 11 digits are the U.P.C. Company Prefix and the item reference, the last digit 2 is the check digit, with the guard bars and the quiet zones on each side.
UPC-A 036000291452: the first digit stands left of the bars and the check digit right of them; the ten digits in between are printed in two groups of five.

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
EAN-13 for 5901234123457

Open in the barcode lookupMake this barcode

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.

  1. Take the digits before the check digit of EAN-13 5901234123457: 590123412345.
  2. 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.
  3. Add the results: 83.
  4. 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

EAN-13 for 5901234123457
Show the calculation
How the check is calculated
#CharacterValueWeightProduct
155×15
299×327
300×10
411×33
522×12
633×39
744×14
811×33
922×12
1033×39
1144×14
1255×315
Sum83

Nearest multiple of ten at or above 83 is 90: 90 − 83 = 7

Make this barcodeOpen the check digit calculator

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.

UPC-A barcode 036000291452 with three digits enlarged: the first digit 0 in number set A is a space, bar, space and bar of 3, 2, 1, 1 modules; the digit 3 is 1, 4, 1, 1; the check digit 2 in set C starts with a bar: 2, 1, 2, 2.
UPC-A 036000291452 with three digits enlarged: 0 in set A is 3-2-1-1 modules (space, bar, space, bar), 3 in set A is 1-4-1-1, and the check digit 2 in set C, which starts with a bar, is 2-1-2-2.
  1. Find the left guard: a thin bar, a thin space and a thin bar.
  2. Take the next seven modules and measure each space and bar in modules, using the thinnest bar as one module.
  3. 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.
Number set A: widths of space, bar, space and bar, in modules
DigitWidthsDigitWidths
03-2-1-151-2-3-1
12-2-2-161-1-1-4
22-1-2-271-3-1-2
31-4-1-181-2-1-3
41-1-3-293-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.