← Back to Blog
Barcodes & QR Codes

Barcode Types: The Complete Guide to Choosing the Right Symbology

Eric YinJuly 2, 2026976 views

A barcode type, also called a symbology, is the specific encoding standard that maps data to a scannable pattern of bars, spaces, or modules. Label Toolkit supports all major symbologies in its free browser-based designer, so you can generate, preview, and print any barcode without installing software. Choosing the wrong symbology causes scan failures, retailer chargebacks, and compliance fines, so this guide covers every major type with the concrete specs you need.

  • 1D (linear) barcodes encode data in parallel bars and are standard for retail point-of-sale, shipping, and shelf labeling.
  • 2D barcodes (QR, Data Matrix) store far more data in a grid and are preferred for electronics, pharmaceuticals, and direct-part marking.
  • The right symbology depends on data capacity, scanner hardware, industry mandate, and available label real estate.
  • Every symbology has a mandatory quiet zone (blank margin) measured in multiples of the narrowest bar, called the X-dimension; skipping it is one of the most common causes of scan failure.

What is a barcode symbology?

A symbology is a complete specification that defines how characters map to bars and spaces (or dark and light modules), what characters are legal, how the scanner verifies the data with a check digit, and what the physical size constraints are. Two barcodes can look superficially similar but be completely different symbologies that require different decoders. Think of it like file formats: a PNG and a WebP file are both images, but a program built to read one may refuse the other.

Every symbology spec sets an X-dimension, the width of the narrowest element, usually expressed in millimeters or thousandths of an inch (mils). Print density on a Zebra thermal printer is measured in dots per millimeter (dpmm) or DPI. A 203 DPI printer produces roughly 8 dpmm; a 300 DPI printer produces about 12 dpmm. The X-dimension you pick must be a whole multiple of the dot size, otherwise the printer rounds edges and scanners reject the symbol.

1D barcode types (linear symbologies)

One-dimensional barcodes encode information in a single row of parallel bars. They are fast to scan, work with every laser and CCD scanner made in the last 40 years, and are mandatory in most retail and logistics chains.

Code 128

Code 128 is the most versatile 1D symbology. It encodes all 128 ASCII characters, uses a three-subset system (A, B, and C) that allows numeric-only data to be packed two digits per symbol character, and supports a self-checking Mod-103 check character. Minimum X-dimension for most applications is 0.25 mm (roughly 10 mils). Quiet zones must be at least 10X on each side. In ZPL, you generate a Code 128 barcode with the ^BC command, for example: ^FO50,50^BCN,100,Y,N,N^FD123456789^FS. The parameters set orientation (N = normal), bar height (100 dots), human-readable line (Y), check digit (N, auto), and mode (N, automatic subset selection).

GS1-128

GS1-128 is Code 128 with a mandatory FNC1 character inserted after the start code, which flags the payload as a GS1 Application Identifier (AI) string. An AI like (00) introduces an 18-digit Serial Shipping Container Code (SSCC); (01) introduces a 14-digit GTIN. GS1-128 labels are required by most major retailers and 3PLs for carton and pallet identification. The GS1 General Specifications mandate a minimum X of 0.495 mm for distribution labels and a quiet zone of at least 10X.

Code 39

Code 39 (also called Code 3 of 9) was one of the first alphanumeric symbologies and remains common in automotive and defense supply chains (AIAG and MIL-STD-130). It encodes 43 characters: A-Z, 0-9, and seven special characters. Each character uses five bars and four spaces, three of which are wide. This makes Code 39 physically larger than Code 128 for the same payload, so it is a poor choice on small labels. Quiet zones are 10X minimum. Code 39 has an optional Mod-43 check character that many readers do not verify by default, which is a known risk in high-volume scanning environments.

UPC-A and UPC-E

The Universal Product Code (UPC-A) encodes exactly 12 digits and is the standard barcode on North American retail products. It is technically a subset of EAN-13 (see below) with an implied leading zero. The nominal X-dimension at 100 percent magnification is 0.33 mm, and the symbol is 37.29 mm wide including quiet zones. UPC-E is a 6-digit compressed version for small packages; it suppresses leading zeros and trailing zeros in the manufacturer code.

EAN-13 and EAN-8

The International Article Number (EAN-13) encodes 13 digits and is the global equivalent of UPC used outside North America. The check digit is Mod-10. EAN-8 is a compressed 8-digit version for small items. Both symbologies are governed by GS1 and use the same nominal X of 0.33 mm at 100 percent magnification. EAN-13 is 37.29 mm wide at nominal size; printing below 80 percent magnification (29.83 mm) is not recommended because scanner read rates drop sharply.

ITF-14

Interleaved 2 of 5 (ITF-14) encodes exactly 14 digits (a GTIN-14) and is typically printed directly on corrugated cardboard cases because it tolerates the rough surface and slight dot gain. It uses a bearer bar, a rectangular frame around the symbol, to prevent partial scans from edges. Minimum X is 0.635 mm for direct print on corrugated. Quiet zones are 10X, but the bearer bar effectively enforces this. ITF-14 cannot encode letters, so it is purely for numeric trade item identifiers.

Codabar

Codabar encodes digits 0-9 and six special characters. It was once common in libraries, blood banks, and FedEx airbills, but has largely been replaced by Code 128 in new implementations. Its main survival niche is legacy systems that are expensive to update.

2D barcode types (matrix symbologies)

Two-dimensional barcodes store data in a two-dimensional grid of dark and light modules. A single 2D code can hold hundreds to thousands of characters, supports error correction (so a partially damaged symbol still scans), and can encode binary data and Unicode text. They require a 2D imager or camera scanner; traditional laser line scanners cannot read them.

QR Code

Quick Response (QR) codes were developed by DENSO WAVE in 1994 for automotive component tracking. A QR code can encode up to 3,116 numeric characters or 2,953 bytes of binary data, depending on version (1 through 40, where version 1 is 21x21 modules and version 40 is 177x177 modules). Error correction comes in four levels: L (7% recovery), M (15%), Q (25%), and H (30%). Higher error correction makes the symbol physically larger for the same payload.

The minimum module size for reliable scanning is roughly 0.25 mm with a high-quality imager; for consumer smartphone scanning, 0.33 mm or larger is more reliable. The quiet zone is 4 modules on every side, per the ISO/IEC 18004 standard maintained by DENSO WAVE. In ZPL, use ^BQ to place a QR code: ^FO50,100^BQN,2,5^FDQA,https://labeltoolkit.com^FS generates a QR code with error correction level Q and module size 5 dots.

Side-by-side comparison of a QR Code and a Data Matrix barcode at equal physical sizes, showing finder patterns and module grids, no text overlay

Data Matrix

Data Matrix (standardized as ISO/IEC 16022) encodes up to 3,116 numeric or 2,335 alphanumeric characters in a square or rectangular grid. It is mandatory in the pharmaceutical industry under FDA 2D labeling rules and is the primary symbology for GS1 DataMatrix on healthcare products. Crucially, Data Matrix can be printed at very small sizes, as small as 1 mm x 1 mm in direct-part marking (DPM) on metal parts using laser etching or dot peen, where a QR code of the same data capacity would be physically larger. The finder pattern is an L-shaped solid border on two sides and an alternating border on the other two.

PDF417

PDF417 (Portable Data File, 417) is a stacked linear barcode, technically a 2D symbology, that encodes up to 1,108 bytes or 1,850 text characters. It is used on US driver licenses (AAMVA standard), airline boarding passes (IATA), and some shipping labels. It requires a 2D imager but is taller and narrower than a square QR code, which can fit certain label geometries better. The quiet zone is 2X on left and right, and 2 rows on top and bottom.

Aztec Code

Aztec Code is used almost exclusively on transport tickets (European rail, some airlines) where small size and high error correction are critical. It has no quiet zone requirement because the finder pattern is a bullseye in the center of the symbol, not on the edges. It is uncommon outside transport ticketing.

Choosing the right barcode type: comparison table

SymbologyDimensionsMax data capacityTypical X-dimensionQuiet zonePrimary use cases
Code 1281DVariable, ~48 chars practical0.25-0.50 mm10X each sideShipping, warehouse, general logistics
GS1-1281DVariable with AIs0.495 mm min (distribution)10X each sideRetail cartons, pallet labels, healthcare
Code 391D43 characters0.25-0.50 mm10X each sideAutomotive (AIAG), defense (MIL-STD-130)
UPC-A1D12 digits0.33 mm (nominal)9X each sideNorth American retail POS
EAN-131D13 digits0.33 mm (nominal)7X left, 7X rightGlobal retail POS
ITF-141D14 digits0.635 mm min (corrugated)10X (bearer bar)Case and pallet, GTIN-14
QR Code2D3,116 numeric / 2,953 bytes0.25-0.33 mm per module4 modules all sidesURLs, marketing, inventory, GS1 Digital Link
Data Matrix2D3,116 numeric / 2,335 alpha0.25 mm (DPM: smaller)1 module all sidesPharma, electronics, DPM, healthcare UDI
PDF4172D (stacked)1,850 text chars / 1,108 bytes0.27 mm2X sides, 2 rows top/bottomDriver licenses, boarding passes

How to choose a barcode symbology: a decision workflow

  1. Identify the industry mandate first. If a retailer, hospital, or government agency tells you what to use, you have no choice. GS1 retail = UPC or EAN. US pharma UDI = Data Matrix. Pallet to a major retailer = GS1-128 or ITF-14. Confirm in the trading partner's routing guide before designing a single label.
  2. Assess your data payload. Digits only with 14 or fewer characters and going on a corrugated case? ITF-14. Mixed alphanumeric under 48 characters? Code 128. Need to encode a full URL or structured data with error correction? QR Code or Data Matrix.
  3. Check scanner hardware at the scan point. If scanners are laser line guns (common in warehouses built before 2015), 2D codes will not scan. If they are omnidirectional imagers or smartphone cameras, any symbology works.
  4. Calculate the available label real estate. Measure the printable area in millimeters, subtract the quiet zones, then verify the symbol fits at a legal X-dimension. A Code 128 barcode encoding 20 characters at X = 0.25 mm is roughly 35-40 mm wide, plus 5 mm of quiet zone on each side.
  5. Match print resolution to the X-dimension. At 203 DPI (8 dpmm), the smallest dot is 0.125 mm. A legal minimum X of 0.25 mm = 2 dots, which is achievable but tight. At 300 DPI (12 dpmm), 0.25 mm = 3 dots, giving better edge definition. For pharma Data Matrix at small sizes, use 300 DPI or 600 DPI media.
  6. Generate a test print and verify with a barcode verifier. A verifier (not just a scanner) grades the symbol against ISO/IEC 15416 (1D) or ISO/IEC 15415 (2D) on metrics like modulation, minimum reflectance difference, and edge determination. A grade of C or better is the usual commercial threshold; grade A or B is required for GS1 distribution labels.
Flowchart showing the barcode selection decision tree from industry mandate through data payload to scanner hardware to label size, clean minimal style, no text in the image

What is a GTIN and how does it relate to barcode types?

A Global Trade Item Number (GTIN) is a GS1-issued numeric identifier for a product, not a barcode itself. A GTIN-12 is the payload of a UPC-A. A GTIN-13 is the payload of an EAN-13. A GTIN-14 is the payload of an ITF-14 or GS1-128 with AI (01). The barcode is just the physical carrier. You can encode the same GTIN-13 in an EAN-13 barcode for a retail shelf or in a GS1 DataMatrix for a healthcare label, and both are valid as long as the correct symbology is specified in the relevant standard.

Quiet zones: the most commonly skipped requirement

A quiet zone is the blank, unprinted margin surrounding a barcode symbol. Scanners look for the quiet zone to know where the barcode starts and ends. Print anything inside it, including a label border, a logo, or even a stray ink dot, and the scan fails. For 1D codes the quiet zone is expressed as a multiple of the X-dimension: 10X on each side for Code 128 means at a 0.25 mm X, you need 2.5 mm of clear space on every horizontal edge. For QR Code, the quiet zone is 4 modules wide on all four sides regardless of module size.

How Label Toolkit handles barcode generation

Label Toolkit's browser-based designer generates barcodes in real time as you type. You pick the symbology from a dropdown, enter your data, and the preview updates instantly. The designer enforces quiet zones automatically by calculating the symbol's outer boundary and flagging overlap with other design elements. For ZPL export, the tool maps each symbology to its correct ZPL command: ^BC for Code 128 and GS1-128, ^BQ for QR Code, ^BE for EAN-13, ^BU for UPC-A. You can also use the Label Toolkit documentation to review every supported command and its parameters before printing.

If you need to print variable barcodes across a batch of labels (serial numbers, GTINs from a product catalog, tracking codes from a spreadsheet), the data merge feature links any barcode field to a CSV or spreadsheet column. Each row generates a unique barcode automatically. This ties directly into the broader ZPL and Zebra printing workflow for warehouses sending bulk print jobs to Zebra printers.

Frequently asked questions

What is the difference between a 1D and a 2D barcode?

A 1D barcode encodes data in a single horizontal row of bars and spaces and can only be read by scanning left to right across the symbol. A 2D barcode uses a grid of dark and light modules in both directions, holds far more data, and requires a camera or 2D imager to decode. Common 1D types include Code 128 and UPC; common 2D types include QR Code and Data Matrix.

Which barcode type should I use for shipping labels?

For most parcel shipping within North America and Europe, Code 128 or GS1-128 is the right choice. Carriers such as UPS, FedEx, and USPS specify GS1-128 or proprietary variants of Code 128 in their label specifications. Check your carrier's current routing guide before printing because the required AIs and field positions differ by carrier.

What is the minimum size for a QR code to scan reliably?

The absolute minimum is roughly 1 cm x 1 cm for a smartphone camera under good lighting, but 2.5 cm x 2.5 cm (about 1 inch square) is the practical minimum for reliable consumer scanning. Industrial imagers at close range can read smaller QR codes, down to around 5 mm x 5 mm, depending on the imager's resolution and the module size.

What is a GS1 Application Identifier?

A GS1 Application Identifier (AI) is a two-to-four digit numeric prefix that appears inside parentheses in the human-readable text of a GS1-128 or GS1 DataMatrix barcode. It tells any reader exactly what type of data follows, such as (01) for GTIN, (10) for batch number, or (17) for expiry date. AIs allow multiple data fields to be concatenated in one barcode without ambiguity.

Can I print any barcode type on a standard Zebra thermal printer?

Yes, Zebra thermal printers support all major 1D and 2D symbologies natively through ZPL commands. The limiting factor is print resolution: a 203 DPI printer can produce most 1D codes and standard-size QR codes, but for small Data Matrix codes (under 10 mm) or high-density QR codes, a 300 DPI or 600 DPI printer gives significantly better scan rates and ISO verifier grades.

Ready to generate your first barcode label? Create a free Label Toolkit account and design, preview, and print any symbology in your browser, no installation required.

Related reading: Barcode Types Explained: 1D vs 2D and How to Choose the Right Symbology

#barcode types #barcode symbology #QR code #Code 128 #Data Matrix #UPC #EAN #GS1-128 #ITF-14 #1D vs 2D barcode
EY
Written by Eric Yin
View profile →