---
title: "How to Read a Barcode: What the Bars and Numbers Mean"
description: "How to read a barcode: what the digits of a UPC or EAN mean, how the bars encode them, how the check digit works, and how to scan any barcode free online."
url: https://barcodejar.com/guides/how-to-read-a-barcode
source: BarcodeJar (free barcode tools)
---

# How to Read a Barcode

To read a barcode, scan it with a scanner or phone, or read the digits underneath: on a retail UPC or EAN they are a GS1 prefix, a company number, an item number and a final check digit. The bars encode exactly the same digits in a pattern of black and white widths.

**Short answer:** you don’t need to decode bars by hand. Point a phone at the code with our [online barcode scanner](https://barcodejar.com/barcode-scanner), or upload a photo to [scan barcode from image](https://barcodejar.com/scan-barcode-from-image). To understand a retail number, read the digits under the bars: GS1 prefix, then company prefix, then item reference, then the check digit. Then use the [barcode lookup](https://barcodejar.com/barcode-lookup) to find the product.

## What do the numbers on a barcode mean?

Take this EAN-13 barcode as an example:

[EAN-13: 9520123456788](https://barcodejar.com/ean-13-barcode-generator)

| Digits | Part | Meaning |
| --- | --- | --- |
| `952` | GS1 prefix | Identifies the issuing GS1 organisation. 952 is reserved by GS1 for examples and demonstrations. |
| `0123` | Rest of the company prefix | Together with the GS1 prefix, identifies the brand owner. Company prefixes vary in length. |
| `45678` | Item reference | Chosen by the brand owner for this specific product variant. |
| `8` | Check digit | Calculated from the first 12 digits to catch misreads. |

Because company prefixes vary in length, you can’t tell where the company part ends just by looking. A large brand with a short prefix has more digits left for its products. Some prefixes are special: **978/979** mean a book (the ISBN), **977** a magazine (ISSN), and **20–29** are for in-store use, such as weighed produce. Check any prefix with [barcode country codes](https://barcodejar.com/gs1-country-codes).

A 12-digit **UPC-A** works the same way, but its first digit is a number-system digit: 0, 1, 6, 7 and 8 for normal products, 2 for random-weight items, 3 for drugs, 4 for in-store use and 5 for coupons.

## How do the bars encode the digits?

A UPC or EAN barcode is 95 equal-width columns called **modules**. A bar or space can be 1, 2, 3 or 4 modules wide. Reading left to right:

1.  **Left quiet zone:** a blank margin so the scanner knows where the code starts.
2.  **Start guard** (bar-space-bar, 3 modules): the slightly longer bars at the left edge.
3.  **Six left-hand digits**, 7 modules each, every digit made of 2 bars and 2 spaces.
4.  **Centre guard** (5 modules): the long bars in the middle.
5.  **Six right-hand digits**, 7 modules each.
6.  **End guard** (3 modules) and the right quiet zone.

That adds up to 3 + 42 + 5 + 42 + 3 = 95 modules. Left-hand digits start with a space and right-hand digits start with a bar, and the patterns differ in parity, so a scanner can tell which way up it is reading and can scan the code upside down.

EAN-13 has one more digit than there are positions. The first digit isn’t drawn as bars at all: it is encoded in which of two patterns (odd or even parity) each of the six left-hand digits uses. For a UPC-A, all left-hand digits use odd parity, which is why a UPC-A reads as an EAN-13 starting with 0.

| Digit | Left, odd (L) | Left, even (G) | Right (R) |
| --- | --- | --- | --- |
| 0 | `0001101` | `0100111` | `1110010` |
| 1 | `0011001` | `0110011` | `1100110` |
| 2 | `0010011` | `0011011` | `1101100` |
| 3 | `0111101` | `0100001` | `1000010` |
| 4 | `0100011` | `0011101` | `1011100` |
| 5 | `0110001` | `0111001` | `1001110` |
| 6 | `0101111` | `0000101` | `1010000` |
| 7 | `0111011` | `0010001` | `1000100` |
| 8 | `0110111` | `0001001` | `1001000` |
| 9 | `0001011` | `0010111` | `1110100` |

1 = a dark module (bar), 0 = a light module (space).

## How does the check digit work?

The check digit lets a scanner detect most single-digit errors and swapped neighbours. For an EAN-13 or UPC-A:

1.  Starting from the digit just left of the check digit and moving left, multiply the digits alternately by 3 and 1.
2.  Add up the results.
3.  The check digit is the number you add to reach the next multiple of 10.

For 952012345678: (8×3) + (7×1) + (6×3) + (5×1) + (4×3) + (3×1) + (2×3) + (1×1) + (0×3) + (2×1) + (5×3) + (9×1) = 102. The next multiple of 10 is 110, so the check digit is **8**. The [check digit calculator](https://barcodejar.com/check-digit-calculator) does this for UPC, EAN, GTIN-14, SSCC and ISBN.

## How do I read other barcode types?

Other symbologies use different patterns, and most don’t follow the GS1 number structure:

-   **[Code 128](https://barcodejar.com/code-128-barcode-generator) and [Code 39](https://barcodejar.com/code-39-barcode-generator)** encode letters and numbers chosen by whoever made the label, such as a SKU or asset tag. The printed text is usually the data itself.
-   **[GS1-128](https://barcodejar.com/gs1-128-barcode-generator)** shows data in brackets: `(01)` is the GTIN, `(17)` an expiry date as YYMMDD, `(10)` a batch or lot, `(21)` a serial number and `(00)` an SSCC pallet code.
-   **QR codes and Data Matrix** have no printed digits. Scan them to see the content, with a phone camera or the [QR code scanner](https://barcodejar.com/qr-code-scanner).

[GS1-128 with GTIN, expiry and batch](https://barcodejar.com/gs1-128-barcode-generator)

## Tools for reading barcodes

| You have | Use |
| --- | --- |
| The physical product and a phone or webcam | [Online barcode scanner](https://barcodejar.com/barcode-scanner) |
| A photo, screenshot or PDF page | [Scan barcode from image](https://barcodejar.com/scan-barcode-from-image) or [barcode decoder](https://barcodejar.com/barcode-decoder) |
| Just the number | [Barcode lookup](https://barcodejar.com/barcode-lookup), [UPC lookup](https://barcodejar.com/upc-lookup) or [ISBN lookup](https://barcodejar.com/isbn-lookup) |
| A number you want to check | [Barcode validator](https://barcodejar.com/barcode-validator) |

## Frequently asked questions

### How do you read a barcode?

The easiest way is to scan it: use a barcode scanner, a phone app or our free [online barcode scanner](https://barcodejar.com/barcode-scanner). To read one by eye, look at the digits printed under the bars. On a retail barcode they split into a GS1 prefix, a company number, an item number and a check digit.

### Does a barcode tell you the country of origin?

No. The first digits of an EAN-13 show which national GS1 organisation issued the company’s prefix, not where the product was made. A company registered with GS1 UK can manufacture anywhere and still use a 50x prefix.

### Can I find out what product a barcode belongs to?

Often, yes. Type the number into the [barcode lookup](https://barcodejar.com/barcode-lookup), which searches open product databases. The barcode itself contains only the number; the product name and price live in a retailer’s or brand’s database.

### What does the last digit of a barcode mean?

It is a check digit, calculated from all the other digits. Scanners use it to catch misreads. You can verify it with the [check digit calculator](https://barcodejar.com/check-digit-calculator).

### Do barcodes contain the price?

Normally no. A standard UPC or EAN holds only the product number, and the till looks up the price. The exception is variable-weight items (such as deli or meat counter labels with a prefix of 2 in UPC or 20–29 in EAN), where the store may encode the price or weight in the code.

### How do I read a barcode from a photo?

Upload the image to [scan barcode from image](https://barcodejar.com/scan-barcode-from-image). It finds and decodes every barcode in the picture in your browser, without uploading the image.

## Related free tools

[**Online Barcode Scanner**Scan any barcode with your phone or webcam camera.](https://barcodejar.com/barcode-scanner)[**Scan Barcode From Image**Upload a photo or screenshot and read every barcode in it.](https://barcodejar.com/scan-barcode-from-image)[**Barcode Lookup**Look up any barcode number to see the product.](https://barcodejar.com/barcode-lookup)[**Check Digit Calculator**GS1 check digits for UPC, EAN, GTIN, SSCC and ISBN.](https://barcodejar.com/check-digit-calculator)[**Barcode Country Codes**Which country is a barcode from? GS1 prefix lookup.](https://barcodejar.com/gs1-country-codes)[**Barcode Decoder**Decode a barcode image to text, type and raw data.](https://barcodejar.com/barcode-decoder)[**UPC vs EAN**The difference, and which one you need.](https://barcodejar.com/guides/upc-vs-ean)[**What Is a GTIN?**GTIN-8, 12, 13 and 14 in plain English.](https://barcodejar.com/guides/what-is-a-gtin)
