Guide

Barcode types, explained: which format does your label need?

Retail, logistics, books and the 2D family sorted by job, with the GS1 caveats spelled out.

Last reviewed 2026-06-11

Barcode formats aren't interchangeable. A retail scanner expects EAN or UPC, a warehouse system reads Code 128, and a pharmacy verification system wants a serialized Data Matrix.

Print the wrong symbology and the bars are just decoration.

This is the map: what each common format is for, who assigns the numbers, and where the expensive mistakes hide.

Retail products: EAN-13 and UPC-A

Anything sold at a register carries an EAN-13 in most of the world or a UPC-A in North America. The number inside is a GTIN issued through GS1, the global standards body, and the last digit is a checksum that scanners verify on every beep.

The expensive mistake is buying recycled or resold number prefixes from third parties. Amazon and major retailers check GTINs against the GS1 database, and listings with numbers that don't trace back to the brand get rejected or removed. A generator like ours renders the barcode image; the number itself has to come from a GS1 license if the product is headed for retail.

Cartons and logistics: ITF-14 and GS1-128

Cases and cartons use ITF-14, a 14-digit format built to print reliably on corrugated cardboard. The thick bearer bars around it aren't decoration; they equalize printing pressure and stop partial reads when a scanner beam clips the symbol at an angle.

GS1-128 goes further and packs structured data like batch numbers, weights and best-before dates into one symbol using application identifiers. If a trading partner sends you a spec sheet full of bracketed numbers like (01) and (17), GS1-128 is what they're describing.

Internal labels: Code 128 and Code 39

For asset tags, shelf locations, pick tickets and anything that never leaves your own system, Code 128 is the default: compact, alphanumeric, with a built-in checksum. You can encode any numbering scheme you like, because the only scanner that matters is yours.

Code 39 is the older alternative that survives in labs, libraries and legacy systems. It's bulkier and has no mandatory checksum, but it prints forgivingly and almost every reader ever made understands it.

Books and serials: ISBN and ISSN

Book barcodes are EAN-13 symbols carrying an ISBN that starts with 978 or 979. The numbers come from a national ISBN agency, like Bowker in the US or Nielsen in the UK, not from a barcode generator. The small add-on symbol you sometimes see next to one usually encodes the price, with 90000 meaning no price set.

Periodicals use ISSN in the dashed form like 0317-8471, where the final character can be an X. Same arrangement: the registry assigns, the generator renders.

A confession from our own changelog: the ISSN mode on this site shipped with a validator that rejected the dash the encoder required, so for its first two weeks it could render exactly nothing. The dash is part of the format, not punctuation you can strip.

The 2D family: QR, Data Matrix, PDF417 and Aztec

  • QR codes are the consumer-facing 2D format: phone cameras, menus, payments, marketing. Capacity is large and error correction is built in.
  • Data Matrix is the industrial sibling. It stays readable at very small sizes, which is why it's etched on circuit boards and surgical tools, and pharmaceutical serialization rules like DSCSA in the US and FMD in the EU rely on it.
  • PDF417 is the stacked format on boarding passes, shipping documents and the back of North American driver's licenses, where the AAMVA standard mandates it.
  • Aztec lives on train and event tickets. It needs no quiet zone, which is part of why it tolerates small phone screens so well.

What's coming: GS1 Digital Link and Sunrise 2027

Sunrise 2027 is the industry's target date for retail scanners to accept 2D codes alongside the traditional stripes. The format that makes this useful is GS1 Digital Link: a QR code that carries the GTIN inside a web URL, so one symbol both scans at the register and opens a product page.

It's a target, not a legal deadline, and the stripes aren't leaving packaging any time soon. But if you're designing packaging today, leaving room for a QR-sized symbol next to the EAN is cheap insurance. Our GS1 Digital Link builder constructs the URI with the GTIN, batch, serial and expiry in the standard layout.

Common questions

Can I use a QR code instead of an EAN-13 on a product?

Not on its own yet. Most point-of-sale scanners still expect the 1D stripe, and retailers require it. The transition plan, Sunrise 2027, adds 2D alongside the stripe rather than replacing it.

Do I have to buy my barcode number?

Only if the product is sold through retail or marketplaces, in which case the GTIN must come from GS1. Internal labels, asset tags and member cards can use any scheme you invent, rendered as Code 128.

Code 128 or QR for inventory?

If your scanners are laser guns and the data is a short ID, Code 128. If you scan with phones or need more than an ID in the label, QR or Data Matrix. Mixed fleets usually end up on QR.