Code 128, Code 39 or QR? Choosing a barcode type
The right barcode depends on three questions: what you need to store, who will scan it, and how much room the label has. Here is the short answer, then the detail.
The short answer
- Your own SKUs, bins, orders or asset tags: Code 128.
- Products sold in shops or on marketplaces: EAN-13 or UPC-A, using numbers you own (see UPC and EAN codes explained).
- Shipping cartons of a retail product: ITF-14.
- A link people open with a phone: QR code.
- Very small parts or labels: Data Matrix, if your scanners read 2D codes.
- An older system that asks for it by name: Code 39.
Compared
| Type | Holds | Typical use | Scanned by |
|---|---|---|---|
| Code 128 | Any letters, digits and symbols | SKUs, warehouse, shipping, asset tags | Any barcode scanner, phone apps |
| Code 39 | Capital letters, digits, a few symbols | Older industrial, automotive and defence systems | Any barcode scanner |
| EAN-13 | 13 digits | Retail products worldwide | Every checkout |
| UPC-A | 12 digits | Retail products in the US and Canada | Every checkout |
| ITF-14 | 14 digits | Outer cartons and cases | Warehouse scanners |
| QR code | Text or a URL, up to a few thousand characters | Links, menus, manuals, tickets | Phone cameras, 2D scanners |
| Data Matrix | Text, very compact | Small parts, electronics, healthcare | 2D (imager) scanners |
Code 128: the default for internal labels
Code 128 can encode every ASCII character, so codes like TS-BLK-M or po-2026-0183 work as they are. It packs digits two to a symbol, which keeps numeric codes short, and its check character protects against misreads. If nobody outside your business needs to scan the label, Code 128 is almost always the right choice.
Code 39: only when a system requires it
Code 39 is older and simpler. Standard Code 39 has only capital letters, digits, space and - . $ / + %, and it is about 30–50% wider than Code 128 for the same text, which matters on small labels. Choose it when an existing scanner setup, customer or industry standard asks for Code 39 specifically.
EAN-13 and UPC-A: for things that are sold
These are the retail barcodes. A UPC-A is really an EAN-13 with a leading zero, and checkouts worldwide read both. What matters is the number, not the symbol: to sell through retailers or on Amazon, the number should come from a GS1 company prefix registered to you. For internal use only, the 200–299 prefix range is reserved for in-store numbering.
ITF-14: for cartons
ITF-14 carries the 14-digit GTIN of a case or carton. It prints well on corrugated cardboard and is usually framed by a thick "bearer bar" that stops a partial scan being read as a shorter code.
QR code and Data Matrix: 2D codes
2D codes store far more in less space and still scan when part of the code is damaged. Two things to check first:
- Scanners. Classic laser scanners can't read 2D codes. Phones and most modern imager scanners can.
- Purpose. QR codes are what people expect to point a phone at, so use them for links. Data Matrix is the industrial choice for tiny marks on parts and devices.
Size and quiet zone matter more than type
Whichever type you pick, leave clear space on both sides of a linear barcode (the "quiet zone", about 10 times the width of the narrowest bar for Code 128), keep bars from getting too thin on small labels, and print dark bars on a light background. Why a barcode won't scan covers these in detail.