What Is a Barcode? Meaning, Parts and Uses Explained

A barcode is a pattern of bars or squares that stores a number or text so a scanner can read it. Product barcodes hold a number, not a price: the store's system looks it up. This guide explains 1D and 2D barcodes, the parts of a barcode, what barcodes are used for and how to get one.

By the Barcode.codes editorial teamReviewed

What a Barcode Is

A barcode is data written as a pattern a machine can read: bars and spaces of different widths in a 1D barcode, or a grid of dark and light squares in a 2D barcode.

1D and 2D Barcodes

A 1D or linear barcode, such as a UPC-A, is read across its width, so it holds a short string such as a product number. A 2D barcode, such as a QR code or a Data Matrix, stores data in rows and columns of small squares called modules. It holds much more data in the same space, up to a full web address or a block of text.

A Barcode Holds Data, Not a Database

A product barcode carries only its number. The name, the price and the stock count live in the store's own system, which looks the number up when the barcode is scanned. That is why one product can ring up at different prices in different stores.

The Parts of a Barcode

A retail barcode has blank margins on both sides, guard patterns at the start, middle and end, the data characters, a check digit and the digits printed underneath.

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.
The parts of a UPC-A barcode, 036000291452: the company prefix and item reference, the check digit, the guard bars and the quiet zones that must stay blank.

Quiet Zones and Guard Patterns

The quiet zones are blank margins that tell the scanner where the barcode begins and ends; a UPC-A needs 9 modules on each side. The guard patterns, the taller bar pairs at the edges and in the middle, frame the two halves of the number.

The Number Under the Bars

The digits printed under the bars are the human readable interpretation of the same number. In retail that number is a GTIN of 8, 12, 13 or 14 digits, built from a GS1 Company Prefix, with a check digit at the end that lets the scanner catch a misread.

What Barcodes Are Used For

Barcodes let a machine enter a number or a text quickly and without typing errors, so they are used wherever items are counted, sold, shipped or looked up.

  • Products in stores: a UPC-A or EAN-13 carries the GTIN that the checkout looks up.
  • Cartons and pallets: an ITF-14 carries the carton's GTIN, and a GS1-128 the shipping data such as the SSCC.
  • Books and magazines: an EAN-13 carries the ISBN or ISSN.
  • Internal labels: Code 128 or Code 39 carry your own asset, bin or part numbers.
  • Links for phones: a QR code carries a web address that phone cameras open.

Check a Barcode Number

Type the number under a barcode to see its type, its GS1 Prefix and whether its check digit is right.

Try it: barcode number check

A UPC, EAN, GTIN-14 or ISBN number, with its check digit.

Type
UPC-A (GTIN-12)
GS1 Prefix
003: Issued by GS1 US.
Check digit
2, correct
UPC-A for 036000291452

Open in the barcode lookupMake this barcode

A correct check digit shows the number is well formed, not that it is registered to a company. Verified by GS1 shows which company a GTIN is licensed to.

How to Get a Barcode for a Product

A product sold in stores needs a GTIN from GS1, and the barcode is then drawn from that number.

  1. Get a GTIN from your GS1 Member Organization: GS1 US in the United States, or the GS1 office of your country.
  2. Choose the barcode your retailers scan: UPC-A in the United States and Canada, EAN-13 in most other countries.
  3. Draw the barcode at the size GS1 sets, then print a test and scan it.

What is a UPC code? the UPC, its digits and the GS1 US options.

Barcode generator draws a barcode for a number you already have.

Frequently Asked Questions

Is a QR Code a Barcode?

Yes. A QR code is a 2D barcode: it stores data in a grid of square modules instead of bars. GS1's standard describes it as a two-dimensional barcode symbology.

Can a Barcode Have Letters?

Yes, depending on the type. Code 128 holds all 128 ASCII characters and Code 39 holds capital letters, digits and a few symbols, while retail UPC and EAN barcodes hold digits only.

How Many Digits Does a Barcode Have?

It depends on the type. A UPC-A has 12 digits, an EAN-13 has 13, an EAN-8 and a UPC-E have 8, and an ITF-14 on a carton has 14. Code 128 and 2D barcodes have no fixed length.

Does a Barcode Contain the Price?

No. A product barcode holds the product number, and each store's system holds its own price for that number. A few in-store codes, such as labels on weighed food, can include a price, but those are set by the store, not by the product's brand.

Can I Make My Own Barcode?

You can draw any barcode with a generator, and for internal labels your own numbers are enough. A product sold in stores needs a GTIN licensed from GS1, and Verified by GS1 shows which company a GTIN belongs to.

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.

Verified by GS1 is GS1's service that shows which company a GTIN is licensed to.

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.