Types of Barcodes: Every 1D and 2D Barcode Type Explained

There are two types of barcodes: 1D barcodes, such as UPC, EAN, Code 128 and ITF-14, and 2D barcodes, such as QR Code, Data Matrix, PDF417 and Aztec. This guide compares every type the Barcode.codes generator makes, what each one holds, who issues its numbers and how to identify a barcode.

By the Barcode.codes editorial teamReviewed

Barcode Types at a Glance

Barcode types fall into two families: 1D barcodes, read across their bars, and 2D barcodes, read as a grid or as stacked rows.

Barcode types the Barcode.codes generator makes
TypeFamilyData it holdsWho issues the numbers
UPC-A1D12 digits: a GTIN-12GS1 US
UPC-E1D8 digits: a GTIN-12 with zeros left outGS1 US
EAN-131D13 digits: a GTIN-13, ISBN or ISSNA GS1 office, the ISBN or the ISSN agency
EAN-81D8 digits: a GTIN-8A GS1 office
ITF-141D14 digits: the GTIN of a cartonA GS1 office
GS1-1281DGS1 data such as GTIN, batch, dates and SSCCA GS1 office
Code 1281DAll 128 ASCII charactersYou
Code 391DDigits, capital letters, space and - . $ / + %You
Code 931DThe Code 39 characters, more compactYou
Interleaved 2 of 51DAn even number of digitsYou
QR Code2DUp to 7,089 digits, or text and linksYou
Data Matrix2DUp to 3,116 digits, or textYou
PDF4172D, stackedUp to 2,713 digits in this generatorYou
Aztec Code2DUp to 3,832 digitsYou
MaxiCode2DUp to 138 digits, fixed sizeYou or your carrier

1D Barcode Types

1D barcodes, also called linear barcodes, are the familiar bars and spaces; they hold a short number or text and are read by every kind of scanner.

Six 1D barcode types: UPC-A 036000291452, EAN-13 5901234123457, EAN-8 96385074 for products, ITF-14 15901234123454 for cartons, and Code 128 and Code 39 with the text BC-2026-0042 and CODE39 for internal labels.
Six 1D barcode types: UPC-A, EAN-13 and EAN-8 for products, ITF-14 for cartons, and Code 128 and Code 39 for your own labels.

Retail Barcodes: UPC and EAN

  • UPC-A: the 12-digit product barcode of the United States and Canada.
  • UPC-E: a compressed UPC-A for small packs, only for numbers with enough zeros.
  • EAN-13: the 13-digit product barcode used in most other countries, and for books and magazines.
  • EAN-8: an 8-digit barcode for packs too small for an EAN-13.

GS1 requires a barcode of this family on every item scanned at a store checkout. The numbers come from GS1, so these barcodes always carry a GTIN.

Logistics Barcodes: ITF-14 and GS1-128

ITF-14 carries the GTIN of a carton and is printed straight onto corrugated board. GS1-128 carries several pieces of GS1 data, such as the batch, the expiry date and the pallet's SSCC, each marked by an Application Identifier.

Barcodes for Your Own Labels

Code 128, Code 39, Code 93 and Interleaved 2 of 5 hold data you choose, such as asset tags, bin locations or part numbers. Code 128 holds all ASCII characters and packs digits two to a character, while Code 39 holds capitals, digits and a few symbols. None of them needs a GS1 number.

Code 128 vs Code 39 the two barcodes for your own labels compared.

2D Barcode Types

2D barcodes store data in two directions, so they hold far more than a 1D barcode in the same space, but they need an image-based scanner or a phone camera.

Four 2D barcode types, each holding https://barcode.codes/: QR Code, Data Matrix, PDF417 and Aztec Code.
Four 2D barcode types holding the same web address: QR Code, Data Matrix, PDF417 and Aztec Code.

Matrix Codes: QR, Data Matrix, Aztec and MaxiCode

  • QR Code: 21 × 21 to 177 × 177 modules, with four error correction levels; phone cameras open the links in it.
  • Data Matrix: 10 × 10 to 144 × 144 modules, or rectangular, so it fits very small labels.
  • Aztec Code: from 15 × 15 modules, with error correction set as a share of the data.
  • MaxiCode: a fixed-size code of hexagons around a central bull's-eye, also known as UPS Code.

Stacked Codes: PDF417

PDF417 stacks 3 to 90 rows of codewords, so it is wide and short like a 1D barcode but holds as much as a 2D one. Its size and error correction level can be set for the space and the print quality.

How to Identify a Barcode Type

Count the digits and look at the shape: most retail barcodes can be told apart by their length, and most 2D codes by their finder patterns.

  • 12 digits: a UPC-A.
  • 13 digits: an EAN-13; one starting with 978 or 979 is a book's ISBN, and with 977 a magazine's ISSN.
  • 8 digits: an EAN-8, or a UPC-E if it starts with 0 or 1 and the generator expands it to a UPC-A.
  • 14 digits in a thick frame: an ITF-14 on a carton.
  • Three squares in the corners: a QR code.
  • A solid L along two edges: a Data Matrix.

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

Barcode reader names the type of any barcode in a photo or a scanned page.

Frequently Asked Questions

What Is the Most Common Barcode Type?

On products in stores it is the UPC and EAN family, because GS1 requires it for items scanned at retail checkouts. Outside retail there is no single answer: the table above shows which type fits which data.

How Many Types of Barcodes Are There?

There is no single count: standards bodies define dozens of symbologies, many with variants. The Barcode.codes generator makes 23 types, which cover retail, books, logistics, internal labels and 2D codes.

Which Barcode Type Holds the Most Data?

Among the types here, a QR code at version 40 with low error correction holds the most: 7,089 digits. Aztec Code holds up to 3,832 digits and Data Matrix up to 3,116.

What Type of Barcode Has 12 Digits?

A UPC-A. Its 12 digits are a GTIN-12: the company prefix, the item reference and a check digit.

What Type of Barcode Is a QR Code?

A 2D matrix barcode. It stores data in a square grid of modules, found by the three squares in its corners.

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.

GS1 US: How to get a UPC barcode describes the single GTIN and GS1 Company Prefix options and their limits.