Barcode Types & Symbologies: Which One to Use

A barcode is only as good as the symbology behind it. Pick the wrong one and you waste label space, fail a retailer’s compliance check, or print a code your scanners cannot read. This guide explains the difference between 1D and 2D barcodes and walks through the major symbologies — Code 128, Code 39, GS1-128, UPC-A, EAN-13, Interleaved 2 of 5, Data Matrix, QR Code and PDF417 — so you know exactly which barcode to use and how to print it. From an authorized Zebra partner serving all of Latin America from Panama, with USD quotes. Want to try one now? Render any symbology free in our barcode generator.

Start Here

1D vs 2D Barcodes

Every symbology falls into one of two families. Knowing which one you need rules out half the options immediately.

1D — linear barcodes

A 1D barcode stores data in the varying widths and gaps of vertical bars, read across in a single line. It is compact, fast to scan with an inexpensive laser, and perfect for short identifiers — a product number, a license plate, a shelf location. The trade-off is capacity: a linear code can only hold a few dozen characters before it grows too wide to scan. Code 128, Code 39, UPC and EAN all live here.

2D — matrix and stacked codes

A 2D barcode encodes data in both directions — a grid of squares or dots — so it holds hundreds or thousands of characters in a fraction of the footprint. Built-in error correction lets it still read when partly scratched or smudged. The cost is that you need an imager (a 2D-capable camera scanner) to read it, not a simple laser. Data Matrix, QR Code and PDF417 are the common 2D choices.

How to choose between them

If the barcode just identifies something and a database holds the detail, a 1D code is faster and cheaper. If the data itself must travel on the label — many fields, a URL, a tiny part with no room for bars — go 2D. Many operations use both: a 1D code for the human-readable item number and a 2D code beside it for the full dataset.

Linear Codes

The Major 1D Symbologies

These five linear codes cover the overwhelming majority of labels printed in retail, manufacturing and the supply chain.

Code 128

The workhorse of logistics. Code 128 encodes the full set of 128 ASCII characters — letters, digits and symbols — in a dense, reliable bar pattern. Its high data density and built-in check digit make it the default for shipping labels, license plate numbers, cartons and internal warehouse IDs. If you need a general-purpose alphanumeric barcode, this is almost always the right answer.

Code 39

The older industrial standard. Code 39 encodes uppercase letters, digits and a handful of symbols, and it is simple and robust, so it persists in defense, automotive and some manufacturing systems. It is less dense than Code 128 — the same data makes a wider bar — so for new projects Code 128 is usually the better choice unless a customer or legacy system mandates Code 39.

GS1-128

The supply-chain dialect of Code 128. GS1-128 uses the same bars but structures the data with GS1 Application Identifiers (AIs) — standardized prefixes that say “this is an SSCC,” “this is a GTIN,” “this is a lot number” or “this is an expiry date.” That structure is what lets retailers, distributors and carriers scan one label and parse every field the same way. It is the standard for pallet and shipping labels under GS1 compliance.

UPC-A & EAN-13

The barcodes on retail packaging. UPC-A encodes a 12-digit GS1 product number and is the point-of-sale standard in the US and Canada; EAN-13 encodes 13 digits and is the global standard everywhere else, including Latin America. Both are numeric-only and fixed-length because they carry a registered GTIN that identifies the product worldwide. Modern POS scanners read both interchangeably.

Interleaved 2 of 5 (ITF)

A compact numeric-only code used on shipping cartons and corrugated cases. Interleaved 2 of 5 packs pairs of digits efficiently, which makes it well suited to printing directly on cardboard — commonly as the ITF-14 carton code that carries a case-level GTIN. It only encodes digits and must contain an even number of them, so it is purpose-built for case quantities rather than general data.

Reading them

All of these linear codes read on an inexpensive laser scanner, which is why 1D still dominates fast point-of-sale and warehouse picking. Match the symbology to your scanners before you commit — our barcode scanner guide and Zebra scanner catalog help you choose, and you can preview any of these in the free barcode generator.

Matrix & Stacked Codes

The Major 2D Symbologies

When a linear code runs out of space, or the data has to live on the label itself, a 2D symbology takes over.

Data Matrix

The 2D code for small items. Data Matrix packs a lot of data into a tiny square — a few millimeters — with strong error correction, so it is the standard for marking electronic components, surgical instruments, automotive parts and pharmaceuticals. It is also the symbology of choice for direct part marking (DPM), where the code is etched or dot-peened straight onto metal. When space is scarce and the part is small, Data Matrix wins.

QR Code

The consumer-facing 2D code. QR Codes hold URLs, text and structured data and, crucially, are designed to be read by any smartphone camera. That makes them the natural choice for marketing, packaging links, menus, payments and product registration — anywhere you want a person, not just a warehouse scanner, to interact with the code. They are not typically used for high-speed item identification, where a 1D code is faster.

PDF417

A stacked 2D code that looks like several short barcodes piled on top of each other. PDF417 holds large amounts of data — up to roughly a couple of thousand characters — which is why it appears on driver’s licenses, ID cards, boarding passes and some shipping documents. Use it when you need to carry a full record on the document itself and have a horizontal strip of space to work with.

At a Glance

Barcode Symbology Comparison

The major symbologies side by side — what each one is, what it holds and where it belongs.

Symbology Type Data capacity Typical use
Code 128 1D linear Full ASCII, high density Logistics, shipping, LPN, internal IDs
Code 39 1D linear Uppercase, digits, few symbols Legacy industrial, defense, automotive
GS1-128 1D linear (Code 128 + AIs) Structured fields via GS1 AIs Supply chain, SSCC, GTIN, lot, expiry
UPC-A 1D linear 12 numeric digits (fixed) Retail point of sale (US / Canada)
EAN-13 1D linear 13 numeric digits (fixed) Retail point of sale (global / Latin America)
Interleaved 2 of 5 1D linear Numeric only, even count Shipping cartons, ITF-14 cases
Data Matrix 2D matrix High, in a very small area Small parts, electronics, DPM, pharma
QR Code 2D matrix High; URLs and text Consumer, marketing, links, payments
PDF417 2D stacked Very high (thousands of chars) IDs, licenses, boarding passes, logistics docs
Decide With Confidence

How to Pick the Right Barcode

Five questions take you from “which barcode?” to a single correct answer almost every time.

What data, and how much?

Numbers only and short? UPC, EAN or Interleaved 2 of 5. Letters and digits? Code 128. A lot of data or a full record? Go 2D — Data Matrix for tiny footprints, PDF417 for documents, QR for links.

How much space is there?

A wide shipping label leaves room for a linear code; a circuit board or a vial does not. When the label is small but the data is large, a 2D code like Data Matrix is the only thing that fits.

Retail or internal?

If the item crosses a retail checkout it needs a registered GS1 UPC-A or EAN-13. If it never leaves your operation, you are free to use Code 128 or a 2D code tuned to your workflow.

Is GS1 compliance required?

Selling into large retailers or shipping pallets to distributors usually means GS1 rules: EAN-13 / UPC-A on the consumer unit, GS1-128 with Application Identifiers on the carton and pallet.

What scan distance and speed?

Forklift scanning a pallet from a meter away favors a large, bold 1D code. A smartphone reading a marketing code favors QR. Match the symbology and its size to how, and from how far, it will be read.

Test before you commit

Render a candidate symbology at real size and scan it with your own hardware before rolling it out. Our free barcode generator produces print-resolution codes you can validate in minutes.

Print & Scan

Printing and Scanning Any Symbology

Choosing the symbology is half the job. The other half is producing a clean code and reading it reliably.

Any Zebra printer renders them via ZPL

Zebra printers generate barcodes through ZPL (Zebra Programming Language), which has native commands for Code 128, Code 39, GS1-128, UPC-A, EAN-13, Interleaved 2 of 5, Data Matrix, QR Code and PDF417. You send the data; the printer builds the symbol at the right resolution. That means one printer handles 1D and 2D on the same label. Browse the range in the Zebra printers catalog, and pair it with the right media from the Zebra supplies catalog — print quality and contrast matter as much as the symbology choice.

1D laser vs 2D imager

A laser scanner reads only linear codes — fast and inexpensive for UPC, EAN and Code 128. A 2D imager reads everything: 1D and 2D, on screens and off curved surfaces. If you print, or ever will print, a Data Matrix or QR code, specify imagers. See the options in the Zebra scanner catalog and our barcode scanner guide.

The label underneath matters

Even a perfect symbology fails on the wrong stock — a smudged or low-contrast code will not scan. Direct thermal for short-lived labels, thermal transfer on synthetics for durability; our label material guide walks through the choice, and the LPN labels guide shows it applied to warehouse license plates.

FAQ

Frequently Asked Questions

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

A 1D (linear) barcode encodes data in the widths and spacing of parallel vertical bars, read across a single horizontal line — Code 128, Code 39, UPC and EAN are examples. A 2D barcode encodes data in a pattern of squares or dots across both height and width, so it holds far more information in a smaller area and survives partial damage thanks to error correction. Data Matrix, QR Code and PDF417 are 2D. The practical split: 1D for short IDs scanned by a laser, 2D for larger or denser data scanned by an imager.

Which barcode should I use for shipping and logistics?

Use Code 128 for internal logistics and license plate numbers because it encodes the full alphanumeric set compactly and reliably. When you must follow the GS1 supply-chain standard — for example to carry an SSCC, GTIN, lot or expiry — use GS1-128, which is Code 128 structured with GS1 Application Identifiers so trading partners and carriers can scan it consistently worldwide.

What is the difference between UPC and EAN?

Both are retail point-of-sale symbologies built on the same GS1 numbering system. UPC-A encodes a 12-digit number and is the standard at retail in the United States and Canada. EAN-13 encodes 13 digits and is the global standard used in Europe, Latin America and most of the world. They are technically compatible: modern POS scanners read both, and a UPC-A number is effectively an EAN-13 with a leading zero.

Is a QR code better than a barcode?

Neither is universally better — they serve different jobs. A QR Code is a 2D symbology that holds a lot of data, including URLs, and is designed to be scanned by any smartphone camera, which makes it ideal for consumer marketing, links and payments. A traditional 1D barcode like UPC or Code 128 is faster and cheaper to scan with a laser at point of sale or on a warehouse floor. Choose QR for consumer-facing data and links, and 1D for high-speed identification of items and units.

Can a Zebra printer print all these barcode types?

Yes. Zebra printers render barcodes through ZPL (Zebra Programming Language), which has built-in commands for every common symbology — Code 128, Code 39, GS1-128, UPC-A, EAN-13, Interleaved 2 of 5, Data Matrix, QR Code and PDF417. You send the data and the printer generates the symbol at the correct resolution, so the same printer can produce 1D and 2D codes on the same label.

Get a Quote

Match the Barcode to Your Operation

Tell us what you label, where it goes and whether you ship under GS1, and we will recommend the symbology, the printer, the media and the scanner — or wire it straight into your system. Genuine Zebra hardware and supplies shipped across Latin America from Panama, with USD quotes.