Barcode Types Explained

Choosing the wrong barcode type is a surprisingly common and fixable problem. A business encodes internal SKUs in EAN-13 (a retail format that requires a GS1 company prefix), or prints QR codes for a scanning distance where a compact Code 128 would read faster and more reliably. This guide covers the practical differences between the most common symbologies so you can make the right choice from the start.

1D Barcodes: Data in Lines

One-dimensional barcodes encode data in a series of parallel bars and spaces of varying widths. A laser scanner sweeps across the symbol and interprets the light/dark pattern as binary data, which maps to a character set. All the data is stored horizontally — the height of the bars adds scanning headroom (a taller barcode is easier to scan because the laser beam has more margin for error) but does not increase data capacity.

1D barcodes are fast to scan, work at long distances, and are natively supported by every laser and CCD scanner manufactured in the last 50 years. Their limitation is data density: a practical 1D barcode holds 20–50 characters in a printable label area. For longer data, you need a 2D symbology.

2D Barcodes: Data in a Grid

Two-dimensional barcodes — including QR codes, DataMatrix, PDF417, and MaxiCode — store data in both the horizontal and vertical direction. This dramatically increases capacity: a QR code holds up to 4,296 alphanumeric characters in roughly the same physical area as a Code 128 barcode with 30 characters. 2D codes are also omnidirectional — they can be read from any angle — and include built-in error correction, which means a partially damaged or obscured code can still scan.

The trade-off is that 2D codes require a camera-based scanner (imager), not a laser scanner. Most modern handheld scanners are imagers and read both 1D and 2D. Older laser-only scanners cannot read QR codes or DataMatrix.

Code 128 — The Logistics Workhorse

Code 128 is the most widely deployed barcode in logistics, manufacturing, and general inventory management. It supports the full ASCII character set through three subsets: Subset A (uppercase letters, control characters, digits), Subset B (full printable ASCII), and Subset C (numeric pairs — two digits per bar module, the most dense encoding for numeric-only data). A single Code 128 symbol can switch between subsets mid-stream, optimising density automatically.

GS1-128 is Code 128 with standardised Application Identifiers (AIs) that specify what data type follows each prefix: (01) for GTIN, (10) for lot number, (17) for expiry date, and dozens more. GS1-128 is the standard for shipping carton labels in retail supply chains. If you are shipping to a major retailer, their routing guide will likely require GS1-128 on inner and outer cartons.

For internal inventory with alphanumeric SKUs, plain Code 128 is the right choice. Use the Code 128 generator to create labels for your warehouse.

Code 39 — The Legacy Alphanumeric Standard

Code 39 predates Code 128 by over a decade and remains in active use in healthcare (FDA UDI compliance for some legacy medical devices), US Department of Defense contracting, and automotive supply chains. It supports 43 characters: uppercase A–Z, digits 0–9, and seven special characters (space, -, ., $, /, +, %). No lowercase letters.

Code 39 is less dense than Code 128 — the same 10-character string produces a Code 39 barcode about 40% wider than Code 128. For new applications, Code 128 is almost always the better technical choice. Use Code 39 only when a specification or trading partner mandates it. See our Code 39 generator.

UPC-A and EAN-13 — Retail Barcodes

UPC-A (Universal Product Code) is the North American retail standard, encoding 12 digits in a fixed format. EAN-13 (European Article Number) is the international equivalent at 13 digits — a UPC-A is technically an EAN-13 with a leading zero. Any EAN-13 scanner reads UPC-A. Both are maintained by GS1, and valid numbers require a GS1-issued company prefix.

These symbologies are for retail point-of-sale scanning. They carry a GTIN (Global Trade Item Number) that identifies a product in the GS1 registry. They are not appropriate for internal inventory barcodes unless your products are already in the GS1 system. Use UPC-A for North American retail and EAN-13 for international markets.

QR Codes — High-Capacity, Smartphone-Readable

QR codes are the most widely recognised 2D symbology, ubiquitous on advertising, packaging, restaurant menus, and event tickets. They hold up to 7,089 numeric characters or 4,296 alphanumeric characters, include built-in Reed-Solomon error correction at four levels (L, M, Q, H), and are readable from any direction by any smartphone camera.

For product labelling, QR codes work best when the encoded data is long (a URL, a contact record) or when users will scan with a phone rather than a dedicated scanner. For short alphanumeric codes scanned by warehouse equipment, Code 128 is faster and more reliable. See our QR code generator.

DataMatrix and PDF417

DataMatrix is a compact 2D symbology common on small components (circuit boards, surgical instruments) where label real estate is extremely limited. It can encode data in a symbol as small as a few millimetres square. PDF417 is a stacked 2D symbology used on driver's licences, airline boarding passes, and shipping labels requiring high data capacity in a rectangular format. Neither is typically generated for label printing use cases — they are produced by the issuing authority's system.

Choosing the Right Barcode

Use CaseRecommended TypeReason
North American retailUPC-APOS scanner standard; requires GS1 prefix
International retailEAN-13Global retail standard; requires GS1 prefix
Internal inventory / SKUCode 128Alphanumeric, dense, universally supported
Warehouse locationsCode 128Fast, alphanumeric, handles long location codes
URL / contact / WiFiQR CodeHigh capacity, smartphone readable
Asset tags (phone scan)QR CodeURL-encoded asset record, no scanner needed
Asset tags (scanner)Code 128Short alphanumeric ID, faster scanner read
Legacy healthcare / DoDCode 39Mandated by specification
Shipping cartons (retail)GS1-128Required by most retailer routing guides

Frequently Asked Questions

Can I mix barcode types on the same label?

Yes. A label can carry more than one barcode — for example, a retail product label with an EAN-13 for POS scanning and a QR code linking to the product page. The free label maker supports multiple barcode elements per label in the Pro version.

Which barcode type holds the most data?

QR Code at error correction level L holds the most data of any common symbology: up to 7,089 numeric characters or 4,296 alphanumeric. For 1D symbologies, Code 128 Subset C is the densest, encoding two digits per module.

Do I need a special scanner to read QR codes?

Any modern smartphone camera reads QR codes without an app on iOS and Android. Dedicated QR scanners (imager-type handheld scanners) are faster and more accurate in high-volume environments. Older laser-only scanners cannot read QR codes.

Can I make up my own UPC or EAN numbers?

For products sold through retailers, no — GS1-issued numbers are required to prevent collisions in the global product database. For internal use only, any consistent numeric format is fine as long as it is not used externally.

Generate labels right now — free

The free tool runs entirely in your browser. No account, no uploads.

    More small-business tools: PromptedPaperwork