QuikbenchQuikbench

Barcode Types Explained: UPC, EAN, and Code 128 — Which One Do You Need?

Most people only run into the word "barcode" when they need one for a specific purpose — listing a product on a marketplace, labeling inventory, or printing a shipping label — and at that point, the format matters more than it seems. Different barcode types encode data differently and are read by different scanning contexts, so using the wrong one can mean a barcode that looks fine but simply won't scan where you need it to.

UPC-A: retail products in the US and Canada

UPC-A is the 12-digit barcode you'll find on nearly every retail product sold in North America — the one under the black-and-white lines at a grocery store checkout. It requires a registered manufacturer prefix (from GS1) if you intend to sell through a store that scans it at checkout, since retailers validate that the code maps to a registered product. If you're just labeling internal inventory rather than selling through retail channels, this requirement doesn't apply.

EAN-13: the international retail standard

EAN-13 is UPC-A's international cousin — 13 digits instead of 12, used as the standard retail barcode across Europe, Asia, and most of the world outside North America. Functionally, it's UPC-A with an extra leading digit; most modern scanners read both formats interchangeably. If your product will be sold internationally or your marketplace explicitly asks for EAN-13, use this over UPC-A.

Code 128: everything that isn't retail

Code 128 is the workhorse for internal use — inventory tracking, warehouse logistics, shipping labels, asset tags, and anything where you control both the barcode and the scanner. Unlike UPC-A and EAN-13, it isn't limited to numeric data or a fixed length: it can encode letters, numbers, and symbols, and the length can vary based on what you need to store. If you're not selling through a retail point-of-sale system, Code 128 is almost always the right default.

QR codes vs. traditional barcodes

QR codes are a separate category entirely — a 2D matrix rather than a 1D line pattern — and can hold far more data (URLs, contact details, whole blocks of text) than a traditional barcode can. They also don't require specialized retail scanning hardware; any smartphone camera can read one. Use a traditional barcode (UPC-A, EAN-13, Code 128) when you're working within a system that expects one, like retail checkout or existing inventory software. Use a QR code when you're linking to something digital or want something scannable from a phone without dedicated hardware.

Try it yourself

Our Barcode Generator creates UPC-A, EAN-13, and Code 128 barcodes, and our Barcode Scanner reads them straight from your camera — both run entirely in your browser.

This guide covers the barcode formats most people actually need. There are other, more specialized formats (Code 39, ITF, PDF417) used in niche industries not covered here.

Frequently asked questions

Only if you're not selling through a retail point-of-sale system that validates the code. If you are, you'll typically need a registered UPC-A or EAN-13 from GS1 — arbitrary numbers won't scan correctly at checkout even if they look valid.

The most common causes are: insufficient white space (quiet zone) around the barcode, printing it too small for the scanner's resolution, or using a format the scanner isn't configured to read. Try increasing the size and margin before assuming the data itself is wrong.

No — a standard printer works fine for most use cases, as long as the print resolution is sharp enough that the lines don't blur together. For high-volume retail labeling, a dedicated thermal label printer produces more consistent results, but it's not a requirement for most small-scale use.