How to Read a Barcode: By Eye, Phone, or Scanner

Learning how to read a bar code sounds technical, but the basics are simple. A barcode is a number written in bars. You can get that number from the printed digits, with a phone or scanner, or by measuring the bars yourself.

This guide covers all three methods. It then follows one test barcode from bars to digits to check digits. It is written for people who make and print barcodes, so the troubleshooting focuses on labels you print yourself.

Quick note: The numbers in this guide are for learning only. Barcode images are not official product identifiers. Real retail and marketplace numbers come from GS1 or your local GS1 member organization.

Quick answer: how to read a barcode

A barcode can be read three ways: by reading the printed digits, by scanning it with a phone camera or handheld scanner, or by measuring the bars and spaces by eye. Digits are fastest, scanning suits data capture, and decoding by eye is mainly for learning and troubleshooting.

Pick the method that matches your goal. If you only need the number, read the digits. If you need the data in a system, scan it. If the digits are smudged, or you want to see how barcodes work, decode the bars.

What a barcode actually contains

A barcode stores a short piece of data, usually a number, as a pattern of dark bars and light spaces. The digits printed beneath it are a human-readable copy of that data. Scanners read the bars, while people can read the digits.

Barcodes come in two families:

  • 1D (linear) barcodes are lines of different widths, read across in one direction. UPC, EAN, and Code 128 are 1D.
  • 2D barcodes use patterns in two directions and can hold more data. QR codes are 2D.

This guide focuses on 1D barcodes, because most product and warehouse labels use them.

Comparison of a 1D linear barcode and a 2D QR code

Which barcode type do you have?

The barcode type decides how to read it. UPC-A has 12 digits and is common in the United States and Canada. EAN-13 has 13 digits and is used widely elsewhere, including the UK and Australia. Code 128 can hold letters and numbers and is common on warehouse and shipping labels.

Type

What it holds

Typical use

UPC-A

12 digits

North American retail

EAN-13

13 digits

Retail in much of the world

Code 128

Letters, numbers, symbols

SKUs, inventory, logistics

QR code

Text, links, more

Marketing, tracking

Count the digits first. Twelve digits point to UPC-A. Thirteen point to EAN-13. A mix of letters and numbers usually means Code 128 or a similar format.

A UPC-A number becomes an EAN-13 when you add a leading zero. Both are GTINs (Global Trade Item Numbers). GS1 documentation on GTIN formats]

To make your own, try the Code 128 barcode generator or the EAN-13 barcode generator.

How to read the numbers on a barcode

The numbers on a UPC-A barcode follow a set layout: one number system digit, then company digits, then item digits, then a final check digit. An EAN-13 uses 13 digits and begins with a GS1 prefix. The check digit is calculated from the other digits, so scanners can catch misreads.

UPC-A: the 1-5-5-1 layout

Our test number is 123456789012. It is a made-up value, so its parts don’t belong to a real company. Here is the split:

  • 1 is the number system digit.
  • 23456 are the company digits.
  • 78901 are the item digits (the item reference).
  • 2 is the check digit.

Treat this as a simple model, because company prefix lengths can vary. GS1 documentation on GS1 Company Prefix length

The first digit can matter. Standard retail products use digits such as 0 or 7. A 2 marks store-made labels for items sold by weight, and those labels can carry weight or price data. A 3 marks drug and health items. GS1 US documentation on UPC number system characters

EAN-13 and the GS1 prefix

An EAN-13 starts with a GS1 prefix. That prefix shows which GS1 member organization allocated the number. It does not show where the product was made. GS1 says the product may have been produced anywhere in the world.

Looking up who a number belongs to

The digits alone do not name a product. A store system matches the number to a product in its own database. To check who licensed a company prefix, use an official GS1 resource.GS1 member organization verification service

how-to-read-a-barcode-upc-a-guards-and-halves

How to read a barcode with a phone or scanner

To read a barcode with a phone, open a camera or scanning app, fill the frame with the whole barcode, and hold steady in good light. Handheld scanners suit repeated work. Phones and scanners both return the digits, which you should compare against the printed number.

Phone camera or scanning app

  1. Open your camera or a barcode scanning app.
  2. Place the whole barcode in the frame, including the blank margins.
  3. Keep the barcode flat and avoid glare.
  4. Hold the phone steady until it reads the code.
  5. Compare the result with the digits printed below.

Support for 1D barcodes differs by phone, app, and system version, so test yours.

Handheld scanners

Many USB and Bluetooth scanners act like a keyboard and type the digits into whichever field is active. Scanner manufacturer documentation on keyboard emulation A scanner also needs the barcode type switched on in its settings. If it reads one type but not another, check that setting first.

From an image with an online barcode reader

An online barcode reader can decode a barcode from an uploaded image. Use a straight, sharp, high-resolution picture. Check the tool’s privacy notice before uploading anything private.

how-to-read-a-barcode-upc-a-digit-groups

Skip the setup and try it now

Upload a CSV or Excel file, map one column, and preview every row before exporting.

How to read a barcode by eye (without a scanner)

Reading a UPC-A barcode by eye means measuring each bar and space, then matching every group of seven narrow units to a digit. A UPC-A barcode has 95 units in total, including guard patterns at the start, middle, and end. The method suits learning and troubleshooting, not daily work.

GS1 General Specifications on UPC-A symbol structure

The basics

Think of the barcode as a row of tiny squares. Each square is called a module. A dark module is a 1. A light module is a 0.

  • The start guard is 101.
  • The middle guard is 01010.
  • The end guard is 101.
  • The left six digits use one pattern set. The right six digits use the opposite (inverted) set.

A handy clue: left-side digits start with a light module. Right-side digits start with a dark one.

Digit pattern reference

Digit Left side Right side
0 0001101 1110010
1 0011001 1100110
2 0010011 1101100
3 0111101 1000010
4 0100011 1011100
5 0110001 1001110
6 0101111 1010000
7 0111011 1000100
8 0110111 1001000
9 0001011 1110100

GS1 General Specifications table of UPC-A digit patterns

This table is for UPC-A. EAN-13 uses the same right-side patterns but adds a second set of left-side patterns, so do not use this table to decode an EAN-13 by eye. GS1 General Specifications on EAN-13 symbol structure

“Code 128 is the safe default for anything you made up yourself. Retail symbologies are for numbers somebody issued to you.”

— Rule of thumb for picking a symbology

Worked example: bars to digits

Take our test barcode and remove the three guards. Twelve 7-module groups remain:

Group Side Digit
0011001 Left 1
0010011 Left 2
0111101 Left 3
0100011 Left 4
0110001 Left 5
0101111 Left 6
1000100 Right 7
1001000 Right 8
1110100 Right 9
1110010 Right 0
1100110 Right 1
1101100 Right 2

Reading down gives 1-2-3-4-5-6-7-8-9-0-1-2. Try the first row yourself. 0011001 is two light modules, two dark, two light, then one dark. That is the left-side pattern for 1.

  • • To decode any UPC-A barcode this way:
  • • Find the start, middle, and end guards.
  • • Split the barcode into a left half and a right half.
  • • Cut each half into groups of seven modules.
  • • Match each group to a digit in the table.
  • • Check the last digit with the math below.
Labeled UPC-A barcode diagram showing guard patterns and digit groups

Confirm the mapping yourself

A good tool will suggest a mapping from your header row, but you should always confirm it before generating. An auto-guess that picks the wrong column produces a batch that looks fine and encodes the wrong data.

Verify the number with the check digit

A UPC-A check digit is the 12th digit, calculated from the first 11 digits with a modulo 10 formula. Recalculating it and comparing the result to the printed digit shows whether the number was read or typed correctly. GS1 publishes the same method for all GTIN formats.

Using 123456789012:

01   Write the first 11 digits: 1 2 3 4 5 6 7 8 9 0 1.
02   Add the digits in odd positions (1st, 3rd, 5th, 7th, 9th, 11th): 1 + 3 + 5 + 7 + 9 + 1 = 26.
03   Multiply that sum by 3: 26 x 3 = 78.
04   Add the digits in even positions (2nd, 4th, 6th, 8th, 10th): 2 + 4 + 6 + 8 + 0 = 20.
05   Add the two results: 78 + 20 = 98.
06   Find the amount needed to reach the next multiple of 10: 100 – 98 = 2. If the total already ends in 0, the check digit is 0.
07   Compare with the 12th digit. It is 2. They match.

A match means the number is structurally valid. It does not prove the barcode is genuine.

You can confirm the math with a tool. The UPC-A barcode generator calculates the check digit from 11 digits and validates 12-digit values. Change the last digit and the row should be flagged as an error. GS1 also offers a free check digit calculator.

UPC-A Barcode Guide and Validation Tools

Pick the right method

Each method fits a different job. Use this table to choose.

Situation Best method Main risk
Clean barcode, you only need the number Read the printed digits Misreading a digit. The check digit can catch it
Quick one-off check Phone camera or scanning app Poor light, glare, uneven app support
Many labels or data entry Handheld scanner Scanner not set to read that barcode type
Smudged digits, or you want to learn Decode the bars by eye Slow and easy to miscount
QR or other 2D code Phone camera or 2D-capable scanner Not practical to read by eye
Checking a batch of printed labels Read-back test with your real scanner Testing with a better device than you use on the job

Generate from a spreadsheet in one pass

Paste or upload, validate every row, then export SVG, PNG, ZIP or a PDF label sheet.

Why a barcode won't read, and how to fix it

A barcode can fail to read because of print or setup problems, and sometimes because the number or check digit is wrong. Common causes include low contrast, a barcode that is too small or stretched, a cropped quiet zone, blurry printing, glare, and a scanner not set to read that barcode type.

The quiet zone is the blank margin around a barcode. Scanners need it to find where the bars start and stop. GS1 General Specifications on quiet zone requirements

  • • Contrast and color: Use dark bars on a light background. Avoid red, orange, or yellow bars, because some red-light scanners can’t see them.
  • • Size: Do not shrink a barcode below the minimum for its type.
  • • Stretching: Scale proportionally. SVG export keeps bars sharp when you resize for print.
  • • Quiet zone: Keep text, borders, and artwork away from the edges of the barcode.
  • • Print scale: Print at 100% scale. Turn off “fit to page,” which can resize the barcode.
  • • Test paper: Print one page on plain paper before using label sheets.
  • • Print quality: Use a clean, high-resolution print. Faded ink, a worn ribbon, or low resolution can blur the bars.
  • • Scanner settings: Turn on the barcode type you are printing.
  • • Data: Check the digit count and the check digit before printing.
  • • Surface: Flatten curved or creased labels.

If you need a different layout, the barcode label generator offers sheet and thermal label layouts, including custom rows and columns.

Run a read-back test on printed labels

A read-back test means scanning your printed labels with the device you will use in real work, then comparing each result with your source data. It catches print and data problems before a full run.

  • ✓ Validate the data first. If your numbers live in a spreadsheet, the Excel and CSV bulk barcode generator validates each row before export.
  • ✓ Print a small sample. Include labels from the start, middle, and end of the run.
  • ✓ Scan with your real device. Use the same scanner or phone your team will use.
  • ✓ Compare each result to the source row. A scan that works but returns the wrong value is still a failure.
  • ✓ Test in real conditions. Try normal lighting, distance, and handling.
  • ✓ Log failures and fix the cause. Check the troubleshooting list above, then print again.
  • ✓ Print the full batch only after the sample passes.

What reading a barcode can't tell you

A successful scan shows that a pattern decoded into a number. It does not prove a product is genuine, that a seller owns the number, where the product was made, or in most cases what it costs. Official retail numbers come from GS1 or your local GS1 member organization.

Our tools create barcode images from values you provide. They do not issue official UPC, EAN, GTIN, or GS1 numbers. Random or test numbers should never be used as real retail or marketplace identifiers. Marketplaces set their own product ID rules, so check the current requirements before you list. Current marketplace documentation on product identifier requirements

Next step: generate and test your labels

Now that you know how to read a bar code, put it to work. Paste your values or upload a CSV or Excel file with Bulk Barcode Generator, review every row, and export PNG, SVG, ZIP, or PDF labels. Then run the read-back test before you print.

Frequently Asked Questions

Does a barcode contain the product's price?

Usually not. A standard retail barcode holds an identifier number, and the store’s system links that number to a price. Some in-store or variable-weight labels can include price data, so check how your own labels are set up.

Excel may strip leading zeros when a column is stored as numbers. Format the barcode column as Text before entering values, then check the leading digits again before generating or printing.

Printed digits are meant to match the encoded data, but a mislabeled or edited label can differ. Code 128 text is optional and can be formatted differently. Scan the barcode to confirm what it really holds.

Not in practice. QR codes pack data in a grid with extra error correction, so use a phone camera or a 2D-capable scanner instead.

Sources

Ready when you are

Turn your spreadsheet into barcodes

Paste your codes or upload a CSV/Excel file, validate every row, and export PNG, SVG, ZIP or print-ready PDF labels — free, with no signup.