Home › Barcode Types Guide
Barcode Types Guide — UPC, EAN, Code 128, QR & All Major Formats
Last updated: April 2026
There are dozens of barcode formats in active use across retail, logistics, healthcare, marketing, and government. Each was designed for a specific combination of data type, data volume, physical label size, and scanning environment. Choosing the wrong format can result in barcodes that retail scanners refuse, supply chain systems reject, or online marketplaces decline to accept. This guide covers every major barcode format in use today: what data it encodes, what industries use it, and exactly when to choose it over the alternatives.
Quick access: UPC-A · EAN-13 · Code 128 · ITF-14 · Code 39 · PDF417 · QR Code
Part 1: 1D Barcode Formats
One-dimensional (1D) barcodes encode data in a series of parallel bars and spaces of varying widths. They are read by a laser, LED, or CCD scanner that sweeps across the barcode horizontally. All standard retail, logistics, and inventory barcodes are 1D formats. They are fast to scan, work at long distances, and are readable even on low-resolution or slightly damaged labels — making them the dominant format for supply chain and retail applications where throughput matters.
UPC-A — North American Retail Standard
UPC-A (Universal Product Code type A) encodes exactly 12 digits and is the barcode printed on virtually every consumer product sold in a North American grocery store, pharmacy, or mass merchandise retailer. The structure is fixed: the first digit is a number system character indicating the product category (0 for standard items, 2 for random-weight items, 3 for pharmaceuticals, 5 for coupons); digits 2–7 encode the GS1 Company Prefix; digits 8–11 are the manufacturer's item reference; digit 12 is the check digit. UPC-A encodes numeric data only.
GS1 registration required: Yes, for retail use. Register at gs1us.org (US) or gs1ca.org (Canada).
Use when: selling physical products at retail in the US or Canada; listing on Amazon, Walmart, or Google Shopping (US feeds).
EAN-13 — International Retail Standard
EAN-13 (European Article Number, 13 digits) is the international counterpart to UPC-A. It encodes 13 digits and covers all GS1 member countries worldwide. Every UPC-A number is also a valid EAN-13 — prepend a zero to convert. EAN-13 is required for retail in Europe, Australia, Japan, and most markets outside North America, and for Amazon's international marketplaces. All modern retail scanners worldwide read both formats. At GS1 nominal size, UPC-A and EAN-13 are identical in width (37.29mm) — only the digit count and leading digit range differ.
GS1 registration required: Yes, for retail use.
Use when: selling internationally, on Amazon outside the US, or to any non-North American retailer.
EAN-8 — Compact International Format
EAN-8 encodes 8 digits in a significantly shorter barcode, designed for packaging too small to accommodate a full EAN-13 — lipstick tubes, single-serve sachets, small batteries, and confectionery items. EAN-8 numbers are not truncations of EAN-13 numbers; they are assigned separately by GS1 and require a specific application to GS1 demonstrating that your packaging genuinely cannot accommodate EAN-13. GS1 issues EAN-8 numbers less readily than EAN-13, and the application process may take several weeks.
Use when: packaging is genuinely too small for EAN-13 minimum size (approximately 30mm wide) and you sell in international retail.
UPC-E — Compressed North American Format
UPC-E is a 6-digit compressed version of UPC-A for use on very small packaging in North American retail. It is derived mathematically from a UPC-A by suppressing zeros in specific positions — only certain UPC-A numbers can be expressed as UPC-E (those with significant zero sequences in the item reference). Scanners decode UPC-E back to the full 12-digit UPC-A at the point of sale, so no separate GTIN registration is needed — the underlying GTIN is the same as the parent UPC-A.
Use when: North American retail packaging is too small for full UPC-A and the product's UPC-A has a compressible zero sequence.
Code 128 — High-Density Alphanumeric
Code 128 encodes all 128 ASCII characters — uppercase and lowercase letters, digits, punctuation, and control characters — at high density. It is the standard format for FedEx, UPS, and USPS shipping labels; Amazon FBA FNSKU labels; warehouse bin and shelf tags; healthcare patient wristbands; and any application requiring alphanumeric data without GS1 registration. Code 128 has three sub-types (A, B, C) that are selected automatically by most generators to minimise barcode width for the given data. Code 128C is used for numeric-only data and produces the shortest possible barcode for digit strings.
GS1 registration required: No, for internal use. GS1-128 (a structured subset) requires GS1 registration.
Use when: encoding alphanumeric SKUs, serial numbers, tracking codes, lot numbers, or any internal identifier not requiring GS1 compliance.
Code 39 — Legacy Alphanumeric Standard
Code 39 supports uppercase letters, digits 0–9, and 7 special characters. It is self-checking (the bar pattern structure inherently detects single-character errors) and does not require a check character. Code 39 produces barcodes approximately 60–80% wider than Code 128 for the same data, making it inefficient for small labels. Despite this, Code 39 remains a mandatory requirement in automotive supplier labels (AIAG standard), US Department of Defense asset labelling (MIL-STD-1189), and some legacy healthcare systems. Code 39 Extended supports the full ASCII character set by pairing characters, but produces even wider barcodes.
Use when: your industry standard, customer specification, or existing scanning equipment explicitly requires Code 39. Otherwise use Code 128.
ITF-14 — Shipping Cases and Pallets
ITF-14 (Interleaved 2 of 5, 14 digits) encodes a 14-digit GTIN-14 and is used to label trade cases, display units, and pallets in the retail supply chain. It is typically printed directly on corrugated cardboard using thick bars designed to remain scannable despite the rough surface texture of cardboard. ITF-14 barcodes have distinctive bearer bars (thick horizontal lines above and below the barcode) that protect the barcode from scan errors caused by cardboard surface irregularities. ITF-14 is not used at the consumer unit level — it identifies the outer case or pallet containing multiple consumer units.
GS1 registration required: Yes — GTIN-14 is derived from a GS1 Company Prefix.
Use when: labelling shipping cases, display units, or pallets for retail distribution centre receiving.
GS1-128 — Structured Supply Chain Data
GS1-128 (formerly EAN-128) is a standardised application of Code 128 that uses GS1 Application Identifiers (two-to-four-digit numeric prefixes defined by GS1) to encode multiple structured data elements in a single barcode. A single GS1-128 barcode can encode a GTIN, a lot number, an expiry date in YYMMDD format, and a serial number — all in sequence, with each element identified by its AI prefix so any GS1-compliant scanner can parse the individual fields. GS1-128 is required in pharmaceutical supply chains in many markets, fresh food tracking, and on many retailer distribution centre compliance labels.
Use when: a retailer, regulator, or trading partner requires structured data elements (lot, expiry, serial) alongside a GTIN in a single barcode.
Codabar — Financial and Library Applications
Codabar (also called NW-7 or USD-4) is an older numeric barcode that encodes digits 0–9 and six special characters. It was widely used in blood bank labels and libraries before Code 128 became dominant. Codabar is still found in some library systems, FedEx air waybills (certain formats), and some medical applications in the US. It has no check digit by default. For new implementations, Code 128 is preferred; Codabar is maintained for compatibility with existing systems.
Use when: integrating with an existing library, blood bank, or financial system that uses Codabar.
MSI Plessey — Retail Shelf Tags
MSI (Modified Plessey) is a variable-length numeric barcode primarily used for retail shelf edge labels in the US. It encodes price look-up (PLU) codes on supermarket shelf tags. MSI includes a check digit calculated using the Luhn or Mod10 algorithm. Its use is largely confined to existing point-of-sale systems in US grocery retail. For new applications outside grocery shelf labelling, Code 128 is more appropriate.
Use when: generating shelf edge labels for US grocery retail systems that use MSI Plessey.
Part 2: 2D Barcode Formats
Two-dimensional (2D) barcodes encode data in a matrix of dots, squares, or geometric patterns arranged in both horizontal and vertical dimensions. They hold far more data than 1D barcodes — a QR code can hold several thousand characters compared to a few dozen for a 1D barcode of the same physical size. They require an image sensor (camera) rather than a laser scanner to read, which means smartphones can read them natively. They also have built-in error correction, allowing them to remain scannable even when partially damaged or obscured.
QR Code — Universal 2D Consumer Standard
QR (Quick Response) codes are the dominant 2D format worldwide for consumer-facing applications. They encode up to 4,296 alphanumeric characters or 7,089 numeric characters. Any smartphone camera reads them without a dedicated app. QR codes have four error correction levels: L (7% recovery), M (15%), Q (25%), and H (30%) — higher correction allows more of the code to be obscured while remaining scannable, which is important for codes with logo overlays or on textured surfaces. QR codes support URLs, plain text, WiFi credentials, contact cards (vCard), phone numbers, email addresses, SMS, geographic coordinates, calendar events, and more.
Use when: linking physical materials to digital content, providing WiFi access, sharing contact details, payment links, or any consumer-facing application where a smartphone is the scanning device.
Data Matrix — Industrial and Pharmaceutical
Data Matrix is a compact square 2D format that encodes large amounts of data in a very small physical area. A Data Matrix code measuring 5mm × 5mm can encode a full GTIN-14 plus a serial number — something impossible for any 1D format at that size. Data Matrix is the mandatory format under the EU Falsified Medicines Directive (FMD) for pharmaceutical packaging — every individual drug pack sold in Europe must carry a GS1 Data Matrix encoding the product GTIN, lot number, expiry date, and serial number. Data Matrix is also widely used in aerospace component labelling, electronics board-level traceability, and small part marking where direct part marking (laser engraving) is used rather than label printing.
Use when: very small label space is available; pharmaceutical compliance (EU FMD); industrial or aerospace part traceability; direct part marking applications.
PDF417 — High-Capacity Document Barcode
PDF417 is a stacked linear (2D) barcode that can encode up to approximately 1,800 ASCII characters or 2,710 numeric digits. It is used on driver's licences in North America (the barcode on the back of a US or Canadian driver's licence is PDF417), airline boarding passes (as a fallback to QR codes), and some shipping labels requiring high data capacity. PDF417 codes are typically read by dedicated scanners rather than smartphone cameras — smartphone barcode apps can read them, but standard phone cameras do not decode PDF417 natively in camera apps.
Use when: high data capacity is needed and the scanner is a dedicated device; driver's licence and government ID applications; airline boarding passes.
Aztec Code — Transit and Ticketing
Aztec Code is a 2D matrix format developed by Welch Allyn (now part of Honeywell) in 1995. It has exceptional density and a distinctive bullseye-pattern finder in the centre. Aztec Code is the standard format for European rail tickets (used by Eurostar, Deutsche Bahn, SNCF, and most European rail operators), many transit systems, and some airline boarding passes. It can be read even at very low print quality, making it suitable for thermal ticket printing. Unlike QR codes, Aztec Code does not require a quiet zone around the barcode, allowing it to be printed edge-to-edge on a ticket.
Use when: rail and transit ticketing, particularly in European systems; applications where print quality may be low or the code must print without a surrounding quiet zone.
Quick Decision Guide
| Your Application | Recommended Format | Notes |
|---|---|---|
| Retail product — US / Canada | UPC-A | GS1 registration required |
| Retail product — International | EAN-13 | Prepend zero to UPC-A for conversion |
| Retail product — very small pack | UPC-E or EAN-8 | Only if packaging cannot fit UPC-A/EAN-13 |
| Shipping case / pallet | ITF-14 | GS1 registration required; bearer bars recommended |
| Amazon FBA FNSKU label | Code 128 | FNSKU preset in BatchPrintGTIN; Avery 5160 layout |
| Warehouse / inventory label | Code 128 | No GS1 registration needed for internal use |
| Automotive supplier label | Code 39 | AIAG standard requirement |
| Supply chain with lot / expiry data | GS1-128 | GS1 Application Identifiers required |
| Consumer QR — URL, WiFi, contact | QR Code | Error correction H for printed codes |
| Pharmaceutical pack (EU) | Data Matrix (GS1) | EU FMD mandatory; serialised GTIN required |
| Driver's licence / government ID | PDF417 | AAMVA standard for North American licences |
| Rail / transit ticket | Aztec Code | European rail standard; UIC 918.3 |
| Library / blood bank (legacy) | Codabar | Only if existing system requires it |
| Grocery shelf edge label | MSI Plessey | Only for systems using MSI PLU codes |
Selling internationally or on Amazon non-US
EAN-13 — same GS1 number as UPC-A with a leading zero prepended
Internal warehouse or asset tracking
Code 128 — no registration needed, encodes any alphanumeric data at high density
Consumer-facing QR code
QR Code — smartphone readable, supports URLs, WiFi, vCard, and 15+ content types
Shipping cases to a retailer DC
ITF-14 and/or GS1-128 — check retailer's supplier requirements document
Pharmaceutical or industrial traceability
Data Matrix (GS1) for small-space serialised encoding; GS1-128 for label-based encoding
Frequently Asked Questions
What is the difference between a barcode format and a GTIN?
A GTIN (Global Trade Item Number) is a number — a 12, 13, or 14-digit string that uniquely identifies a product in GS1's global registry. A barcode format is the visual symbol used to encode and print that number so a scanner can read it. UPC-A is the barcode format that prints a GTIN-12; EAN-13 prints a GTIN-13; ITF-14 prints a GTIN-14. The format is the picture; the GTIN is the data inside it.
Can a single barcode encode both a product GTIN and a serial number?
Not in a standard UPC-A or EAN-13. For a single barcode to encode multiple data elements — a GTIN plus a lot number, expiry date, or serial number — you need GS1-128 (for 1D linear barcodes) or GS1 Data Matrix (for 2D barcodes). Both use GS1 Application Identifiers to structure the data. QR codes can encode any freeform data including serialised product identifiers, but the parsing of that data depends on your scanning software rather than a universal GS1 standard.
Do I need GS1 registration to use Code 128 or QR codes?
No. Code 128, Code 39, QR Code, Data Matrix (non-GS1), and most other formats can be used for internal applications with any data you choose — no GS1 registration is needed. GS1 registration is only required when your barcode encodes a GS1 GTIN intended for retail point-of-sale scanning or submission to a marketplace like Amazon, Walmart, or Google Shopping.
Why does my retail scanner not read QR codes?
Standard retail laser scanners (the kind at grocery checkout) are designed to read 1D barcodes only — they use a laser beam that sweeps horizontally and cannot decode 2D patterns. Reading QR codes requires an imaging scanner (one with a camera sensor) or a smartphone. Many modern retail and warehouse scanners are 2D imaging scanners that read both 1D and 2D codes, but older laser-only scanners are still widespread in retail environments.
What is the maximum data a QR code can hold?
A QR code at maximum version (Version 40) with error correction level L can encode up to 4,296 alphanumeric characters, 7,089 numeric digits, or 2,953 bytes of binary data. In practice, QR codes used for URLs and typical business applications are far smaller — a typical URL QR code is Version 3–7, encoding 20–60 characters. Larger QR codes have more modules and require a larger physical print size to scan reliably. For most practical business uses, keep QR code content under 100 characters to ensure reliable scanning at typical print sizes.
