Back to All Blog Posts
Barcode Guides

Barcode Types Explained: Which One to Use for Retail, Shipping, Stock and Tickets

By 4 min read
Different barcode types side by side: EAN-13, Code 128, QR code and Data Matrix
Short answer

Use EAN-13 or UPC-A for products sold in shops, ITF-14 for outer cartons, GS1-128 for pallets and logistics labels with batch or expiry data, Code 128 for your own stock, asset and shipping labels, QR codes for links customers scan with phones, Data Matrix for tiny parts and medicine packs, and PDF417 or Aztec for IDs and tickets.

Most barcode guides read like a dictionary: forty types in alphabetical order. That’s not how anyone chooses. You start from the job, such as “I sell jars of honey” or “I need to label 300 laptops”, and the right barcode almost picks itself.

Linear (1D) vs 2D in one minute

  • Linear barcodes are the classic black lines. They hold a short number or code, read left to right, and work with cheap laser scanners.
  • 2D barcodes (QR, Data Matrix, PDF417, Aztec) store data in a grid. They hold much more in less space, survive some damage and can be read by phone cameras, but need camera-based scanners.

Which barcode for which job

JobBarcodeWhy
Product sold in shopsEAN-13 / UPC-AEvery retail checkout reads them; carry a GS1 GTIN
Very small product packsEAN-8 / UPC-ECompact versions for lipsticks, gum and small items
Outer cartons and casesITF-14Prints well on brown corrugated board
Pallets, batch and expiry labelsGS1-128Holds GTIN, batch, expiry and serial numbers in one code
Your own stock, assets, shippingCode 128Letters and numbers, compact, read by almost all scanners
Older industrial or government systemsCode 39Simple and widely supported, but wide
Books and magazinesISBN / ISSNEAN-13 built from the ISBN or ISSN
Links, menus, payments for phonesQR codeEvery phone camera reads it
Tiny parts, medicines, electronicsData MatrixLots of data in a few millimetres
ID cards, driving licencesPDF417Holds a lot of text on a wide, short strip
Train and airline tickets on phonesAztec, PDF417 or QRReads well from screens, needs no quiet zone (Aztec)
Fresh produce, couponsGS1 DataBarSmall, can carry weight and expiry
Libraries, blood banks (legacy)CodabarOld and simple, still in older systems

Retail barcodes: EAN and UPC

These carry a GTIN, a number registered to your company through GS1. Their whole value comes from that registration; the bars only carry the number. If you sell through shops or marketplaces, this is the barcode you need. Our guide to EAN-13 vs UPC-A explains which of the two, and how to get barcodes for your products covers the numbers.

Code 128: the workhorse for internal labels

For anything that stays inside your business, like warehouse bins, asset tags, job cards, document tracking and shipping references, Code 128 is usually the best choice. It encodes letters, numbers and symbols, is compact, and every modern scanner reads it. You don’t need GS1 for internal codes; you just need a numbering scheme that won’t repeat.

Code 128 or Code 39?

Code 39 is older and simpler, and some systems still require it. But it only supports capital letters, digits and a few symbols, and the same data takes up much more space than Code 128. Unless your software asks for Code 39 specifically, pick Code 128.

GS1-128: logistics with extra data

GS1-128 is Code 128 with a set of standard rules. Data is split into fields called Application Identifiers, written in brackets: (01) for the GTIN, (10) for the batch or lot, (17) for the expiry date, (00) for the shipping container’s serial code. Large retailers and distributors often require GS1-128 labels on pallets and cases.

2D codes: QR, Data Matrix, PDF417, Aztec

  • QR code: made for phones. Use it for anything a customer scans: websites, menus, Wi-Fi, payments. See our guides on static vs dynamic codes and QR code print sizes.
  • Data Matrix: the industrial cousin. Smaller than a QR code for the same data, common on electronic parts, surgical instruments and medicine packs (as GS1 DataMatrix).
  • PDF417: a stacked barcode found on many ID cards and driving licences, and on some boarding passes.
  • Aztec: used for many mobile train and airline tickets; it reads well from a phone screen.

Questions to ask before you choose

  1. Who will scan it?

    Customers with phones: QR. Shop tills: EAN/UPC. Your own warehouse scanners: check what they read, then usually Code 128.

  2. Does someone else require a format?

    Retailers, couriers and regulators often specify one. Their spec wins.

  3. How much space is there?

    Tiny parts need Data Matrix; cartons can take ITF-14.

  4. How much data?

    Just an ID: linear barcode. A link, batch and expiry, or a whole address: 2D.

Test with the real scanner. A barcode that scans on your phone may not scan on an old warehouse laser scanner, and the reverse. Print a test label and try it with the equipment that will actually be used.

Frequently asked questions

What is the most common barcode type?

For products in shops, EAN-13 (and UPC-A in North America). For internal and shipping labels, Code 128. For phones, the QR code.

What is the difference between Code 128 and Code 39?

Both encode letters and numbers, but Code 128 supports the full character set and is much more compact. Code 39 is older and wider; use it only when a system requires it.

Can a phone scan normal barcodes?

Yes, with a barcode-reading app or a browser-based barcode reader that uses the camera. The built-in camera app on most phones only opens QR codes.

Do I need GS1 for a Code 128 barcode?

Not for internal use such as stock or asset labels. GS1-128, the version with standard data fields for supply chains, uses GS1 numbers.

Which barcode holds the most data?

2D codes. A QR code can hold several thousand characters, and PDF417 and Data Matrix also hold far more than linear barcodes.

Create any barcode type

EAN, UPC, Code 128, GS1-128, Data Matrix, PDF417 and more, drawn in your browser.

Open Barcode Generator
CleanPDF Team

The team behind CleanPDF’s browser-based PDF, image, QR code and calculator tools. We write these guides to solve everyday document and number problems.