Barcode Types Explained: UPC, EAN, Code 128, Code 39, QR Code & More

June 1, 2025 12 min read Snipinsta Team
Reference Guide Barcodes Standards

There are over 30 standardized barcode formats in use worldwide — from the familiar striped UPC codes on cereal boxes to QR codes on restaurant menus to Data Matrix stamps on prescription bottles. Each format was designed to solve a specific problem: storage capacity, scan speed, error tolerance, physical size, or read angle.

This guide explains every major barcode type: what it looks like, how much data it stores, and which industries use it — so you know exactly which format to use or what you're looking at.

Barcode Categories: 1D vs 2D

All barcodes fall into one of two fundamental categories based on how they encode data:

1D (Linear) Barcodes

Encode data as a sequence of parallel bars and spaces of varying width. Data is read in one direction only (left to right).

  • Typically stores 8–80 characters
  • Can only encode numbers or limited characters
  • Requires a database lookup for full product info
  • Scans with laser or image scanners
  • Examples: UPC, EAN, Code 128, Code 39
2D (Matrix) Barcodes

Encode data both horizontally and vertically in a grid of dots, squares, or hexagons. Data is read in two directions.

  • Stores hundreds to thousands of characters
  • Can encode full text, URLs, and binary data
  • Built-in error correction (can be read when damaged)
  • Requires camera/image scanner (no laser)
  • Examples: QR Code, Data Matrix, PDF417

Retail Barcodes: UPC and EAN

These are the barcodes you see on virtually every product sold in a store. They identify a specific product globally through the GS1 system.

UPC-A (Universal Product Code)

  • Digits: 12 (numeric only)
  • Used in: United States, Canada, Australia, New Zealand
  • Typical size: 37.29mm × 25.91mm at 100% scale
  • Used for: Retail consumer products

The most common barcode in North American retail. The 12-digit number includes a manufacturer prefix (assigned by GS1), a product reference, and a check digit. You need a GS1 company prefix to use UPC-A barcodes in commercial retail.

Generate UPC-A barcode free →

UPC-E (Short UPC)

  • Digits: 6 (displayed) — decoded to a 12-digit UPC-A
  • Used in: Same markets as UPC-A
  • Used for: Small packaging where space is limited (candy bars, pens, small cosmetics)

UPC-E suppresses zeros from a standard UPC-A code, producing a smaller barcode. Any UPC-E code can be expanded back to its full 12-digit UPC-A equivalent.

EAN-13 (European Article Number)

  • Digits: 13 (numeric only)
  • Used in: Everywhere outside North America; also accepted in the US/Canada
  • Used for: Global retail products

The international standard for retail barcodes. EAN-13 extends UPC-A by adding a country/region prefix digit. Any EAN-13 scanner also reads UPC-A codes. If you're selling internationally, use EAN-13 rather than UPC-A.

Generate EAN-13 barcode free →

EAN-8 (Short EAN)

  • Digits: 8 (numeric only)
  • Used for: Very small packages (lipstick, matchboxes, small bottles)

Like UPC-E for European products. A shortened EAN code assigned by GS1 only when the standard EAN-13 barcode is physically too large for the packaging.

ISBN (International Standard Book Number)

  • Digits: 13 (same encoding as EAN-13 with 978/979 prefix)
  • Used for: Books, periodicals

Every published book has an ISBN barcode. It's technically an EAN-13 code with a "978" or "979" prefix — any EAN-13 scanner can read an ISBN barcode. The 13-digit number (without the prefix) is the book's ISBN-13 identifier.

Industrial & Logistics Linear Barcodes

These 1D barcode formats are used where products need to encode more data or support alphanumeric characters beyond what UPC/EAN provides.

Code 128

  • Characters: Full ASCII (128 characters, including letters, numbers, symbols)
  • Length: Variable (typically 8–48 characters in practice)
  • Used for: Shipping labels (FedEx, UPS, USPS, DHL), manufacturing, warehousing, ID cards

The workhorse of shipping and logistics. Code 128 is compact (smaller than Code 39 for the same data), supports all ASCII characters, and is the default format for most shipping carrier labels. If you're shipping packages, your tracking barcode is almost certainly Code 128.

Generate Code 128 barcode free →

Code 39

  • Characters: 43 (uppercase letters, digits 0–9, and 7 special characters)
  • Length: Variable
  • Used for: Automotive (VIN), military, healthcare, inventory management, old US government systems

One of the oldest barcode standards (1974). Code 39 is simpler to implement than Code 128 and doesn't require a check digit, making it popular in early industrial systems. It's less compact than Code 128 — a Code 39 barcode needs roughly 30% more space than a Code 128 barcode encoding the same data.

Generate Code 39 barcode free →

Code 93

  • Characters: Full ASCII via escape sequences
  • Used for: Canada Post tracking, some inventory systems

A more compact, higher-density version of Code 39. Used by Canada Post for its tracking codes and in some internal warehouse systems as a Code 39 replacement.

ITF / ITF-14 (Interleaved 2 of 5)

  • Characters: Numeric only, must be even number of digits
  • Used for: Outer carton labels, wholesale packaging (GS1-128 and ITF-14 are both common)

ITF-14 is the 14-digit version used on shipping cartons in the GS1 system. It's typically printed directly on corrugated cardboard (where other barcodes might bleed or distort) because its thick bars can tolerate lower print quality.

Codabar

  • Characters: Digits 0–9 plus 6 special characters
  • Used for: Blood banks, libraries, FedEx air waybills, photo labs

An older format (1972) that remains in use in specific industries — particularly blood banking, where it's required by some regulatory standards, and FedEx, where it encodes air waybill numbers.

2D Matrix Barcodes

2D barcodes store far more data than linear barcodes and include error correction, meaning they can still be decoded when partially damaged or obscured.

QR Code (Quick Response Code)

  • Capacity: Up to 7,089 numeric, 4,296 alphanumeric, or 2,953 bytes of binary data
  • Error correction: 4 levels (L, M, Q, H) — up to 30% damage recovery at level H
  • Used for: URLs, contact cards (vCard), Wi-Fi credentials, payments, marketing
  • Read by: Any smartphone camera, no special app needed on iOS/Android

The most widely recognized 2D barcode globally. Invented by Denso Wave (Toyota subsidiary) in 1994 for tracking car parts; now ubiquitous on restaurant menus, marketing materials, payments (Alipay, WeChat Pay), boarding passes, and product packaging. Free to use — the patent expired in 2015.

Data Matrix

  • Capacity: Up to 3,116 numeric or 2,335 alphanumeric characters
  • Size: Can be printed as small as 1mm × 1mm
  • Error correction: Reed-Solomon
  • Used for: Electronics component marking (PCBs, chips), medical devices, pharmaceutical packaging, aerospace parts

The choice format for tiny, high-density marking where a QR code would be too large. Data Matrix codes are laser-etched directly onto electronic components, medical instruments, and aerospace parts where space is extremely limited and the marking must survive harsh environments.

Aztec Code

  • Capacity: Up to 3,832 numeric or 3,067 alphanumeric characters
  • Error correction: Reed-Solomon (23% overhead by default)
  • Used for: Transportation tickets (rail, bus, airlines) in Europe, Middle East

Distinguished by its concentric squares pattern in the center. Aztec codes are the standard for e-tickets on European rail and bus networks (Deutsche Bahn, Eurostar, TfL) and on some airline boarding passes.

MaxiCode

  • Used for: UPS shipping labels (printed in the center of the label)

A UPS-proprietary format that encodes postal/address data for automated sorting. The distinctive hexagonal grid with a bullseye center is the MaxiCode on UPS labels.

Stacked & PDF417 Barcodes

Stacked barcodes are a hybrid — they encode more data than a 1D barcode by stacking multiple rows of linear code, but don't use the full matrix structure of a 2D barcode.

PDF417

  • Capacity: Up to 1,850 ASCII characters or 1,108 bytes
  • Error correction: Reed-Solomon (adjustable)
  • Used for: Driver's licenses (mandatory in US/Canada), boarding passes (IATA standard), ID cards, government documents

The tall, rectangular barcode on the back of every US and Canadian driver's license is PDF417. It encodes all the license data (name, address, DOB, license class, restrictions) so it can be machine-read at traffic stops or age-verification checkpoints. The same format is used on IATA boarding passes (the long barcode at the bottom).

GS1 DataBar (RSS)

  • Used for: Fresh produce, small items at retail, coupons, healthcare

A family of small linear barcodes used where UPC/EAN would be too large. GS1 DataBar Expanded can encode supplementary data like weight, expiry dates, and batch numbers alongside the product identifier — increasingly used in fresh food (fruit, vegetables, loose items).

Specialized Barcodes by Industry

Industry Common Format What It Encodes
Retail (US/Canada) UPC-A Product identifier (GS1 company + item code)
Retail (Global) EAN-13 Product identifier with country prefix
Books / Publishing ISBN-13 (EAN-13) Book identifier (ISBN-13 with 978/979 prefix)
Shipping / Logistics Code 128 / GS1-128 Tracking numbers, SSCC, lot numbers, expiry dates
Outer cartons ITF-14 14-digit GTIN for cases/pallets
Healthcare / Pharma GS1-128 / Data Matrix GTIN + lot number + expiry date + serial (GS1)
Automotive / Manufacturing Code 39 / Code 128 Part numbers, VIN, serial numbers
Electronics PCBs Data Matrix Component ID, manufacturer, revision code
Driver's Licenses (US) PDF417 All license data per AAMVA standard
Airline boarding passes PDF417 / Aztec / QR Flight, seat, passenger name, PNR (IATA BCBP)
Transport tickets (Europe) Aztec Journey details, validation status
Blood banks Codabar Donor ID, blood product codes (ISBT 128 moving to Code 128)
Libraries Codabar / Code 39 Patron cards, item barcodes
Marketing / Advertising QR Code URLs, contact info, offers, app links
Payments QR Code Payment instructions (Alipay, WeChat, UPI, EMVCo)

Quick Comparison: Choosing the Right Format

Not sure which barcode type to use? Here's a decision guide:

Your Situation Recommended Format Why
Selling in US/Canada retail stores UPC-A Required by most US/Canada retailers; GS1 standard
Selling in international retail stores EAN-13 Global standard; scannable everywhere including US
Shipping packages (parcel) Code 128 Required by FedEx, UPS, USPS, DHL for tracking barcodes
Internal inventory / asset tracking Code 39 or Code 128 Both widely supported; Code 128 is more compact
Linking to a website or URL QR Code All smartphones scan QR codes natively; supports URLs
Sharing contact info or Wi-Fi password QR Code Supports vCard, Wi-Fi, and other rich data types
Small component / part marking Data Matrix Can be printed very small; error correction; survives etching
Government ID or driver's license PDF417 Mandated by AAMVA for US/Canada driver's license back panels
Fresh produce with variable weight GS1 DataBar Encodes GTIN + weight/price; smaller than EAN-13

How to Generate Any Barcode Format Free

Snipinsta's free barcode generator supports all major 1D and 2D barcode formats — no account or app download needed:

  1. Go to snipinsta.app/barcode-generator
  2. Select your barcode type (UPC, EAN, Code 128, QR, etc.)
  3. Enter the data to encode
  4. Customize size, colors, and label text
  5. Download as PNG or SVG for print or digital use

Need to scan or read an existing barcode from an image? Use the free barcode reader — upload any photo and get the decoded value instantly.

Frequently Asked Questions

For retail products in the US/Canada, UPC-A. Globally, EAN-13. For shipping, Code 128. For 2D codes, QR Code. For small component marking, Data Matrix.

1D barcodes encode data in a horizontal sequence of bars (UPC, EAN, Code 128) and store 8–80 characters. 2D barcodes encode data in both directions (QR Code, Data Matrix, PDF417) and can store hundreds to thousands of characters, plus error correction.

UPC-A has 12 digits and is used primarily in the US/Canada. EAN-13 has 13 digits and is used globally. UPC-A is a subset of EAN-13 — prepending a zero to any UPC-A produces a valid EAN-13. All EAN-13 scanners also read UPC-A.

For US/Canada retail use UPC-A; for global distribution use EAN-13. Both require a GS1-registered company prefix to be valid for commercial retail use. For internal use (not sold at retail), any format works — Code 128 or Code 39 are common for inventory labels.

Traditional barcodes (UPC, Code 128) are 1D linear codes storing a number or short string. QR codes are 2D matrix codes that store far more data (URLs, full contact cards, Wi-Fi passwords) and work even when partially damaged. QR codes are scanned by cameras; traditional barcodes work with laser scanners too.

No. Laser barcode scanners only read 1D linear barcodes. Image-based scanners (CCD or camera scanners) read both 1D and 2D codes. Smartphone cameras can read QR codes natively and most 2D formats with scanner apps. The Snipinsta online barcode reader supports all common 1D and 2D formats from uploaded images.

Barcode Format Quick Reference

Most common formats at a glance:

  • UPC-A 12 digits, US retail
  • EAN-13 13 digits, global retail
  • Code 128 Variable, shipping
  • Code 39 Variable, industrial
  • QR Code 2D, URLs + data
  • PDF417 2D, driver's license
  • Data Matrix 2D, parts marking