ZairussalamTools

Choosing Between CODE128, EAN-13, UPC, and ITF-14 Barcodes

A decision tree for picking the right barcode format — what each encodes, length limits, checkdigit rules, and when to pick CODE128 versus retail-specific formats.

·Ibrahimsyah Zairussalam·

Pick the wrong barcode format and your scanner rejects it at the warehouse. Or worse, your label passes your own QA, ships, and the retailer's system chokes on it three weeks later. The formats aren't interchangeable. Each exists for a reason and was standardized by someone who cared a lot about a very specific use case.

Here's how to pick without regret.

The Fast Decision Tree

Before the deep-dive, the 30-second version:

  • Internal warehouse, serial numbers, SKUs you control → CODE128
  • Retail product with UPC/EAN assigned by GS1 → EAN-13 (world) or UPC-A (North America)
  • Shipping carton or pallet, outer packaging → ITF-14
  • Legacy system, older scanners, or industrial → CODE39
  • 2D, URL, or high data density → not this article, use QR

That covers 95% of decisions. The rest is nuance.

CODE128: The Default for Anything You Control

CODE128 is the Swiss Army knife. It encodes the full ASCII set, gets impressively dense (three characters per bar pattern in its compact mode), and every barcode scanner made in the last 20 years reads it without fuss.

  • What it encodes: all 128 ASCII characters
  • Length: variable, practically up to ~80 characters before label width becomes a problem
  • Checkdigit: mandatory, calculated automatically by any generator
  • Use it for: internal SKUs, work-in-progress tracking, asset tags, ticket IDs, shipping label human-readable parts

Its biggest win is flexibility. You want to encode WH-A-04-2026-00182? Done, fits easily. You want to switch from alphanumeric SKUs to all-digit part numbers mid-project? Same format, same scanners, no change needed.

CODE128 also has a subset called GS1-128 that adds Application Identifiers — structured prefixes like (01) for GTIN or (3102) for weight in kilograms. If you're shipping to a retailer who uses EDI and asks for "GS1-128 compliant carton labels," that's what they mean.

EAN-13 and UPC-A: The Retail Standards

These are the barcodes on consumer products at checkout. You don't get to pick the numbers — they're issued by GS1, the global standards organization, and you pay an annual fee for a range.

  • EAN-13: 13 digits, used worldwide
  • UPC-A: 12 digits, used in North America (a subset of EAN-13 with a leading zero)
  • Checkdigit: mandatory, last digit, calculated with a specific weighted algorithm
  • Use them for: products sold through retail channels — supermarkets, big-box stores, Amazon

The first few digits identify the country and the company. The next chunk is the product within your company. The last digit is the checkdigit. You can't just make up numbers; scanners at retail checkouts cross-reference against GS1's registry, and retailers will refuse product with unregistered codes.

Don't improvise retail barcodes

If you're launching a physical product, buy your GS1 prefix before you print a single label. "Found a free barcode generator online" is how brands end up with recall-level inventory problems. The $30–250/year GS1 membership is cheap compared to redoing every label.

ITF-14: For Outer Cartons

ITF stands for Interleaved 2 of 5. It's used specifically for shipping cartons and cases — the big brown boxes that hold dozens of retail units.

  • What it encodes: exactly 14 digits (a packaging indicator plus the 13-digit GTIN)
  • Checkdigit: mandatory, standard GTIN algorithm
  • Use it for: master cartons, case packs, pallet labels

ITF-14 is designed to print well on corrugated cardboard, where ink bleed can confuse finer barcode formats. The bars are thick, the contrast is high, and scanners pick it up from farther away. You'll see it every time a warehouse forklift scans a pallet without the operator leaving their seat.

If you sell to retailers who handle pallet-level receiving, you'll need ITF-14 on your cartons alongside the EAN-13/UPC-A on the individual units inside.

CODE39: The Legacy Holdout

CODE39 is older than CODE128 and encodes a limited set — uppercase A-Z, digits 0-9, and a handful of symbols (-, ., space, $, /, +, %). It's less dense, takes more label real estate for the same data, and doesn't natively include a checkdigit.

  • What it encodes: 43 characters (uppercase only)
  • Length: variable, but gets wide fast
  • Checkdigit: optional (Mod 43)
  • Use it for: legacy industrial systems, old military/government specs, libraries still running systems from 2003

If you're starting a new project in 2026, skip CODE39. If you're integrating with a system that's been running for 20 years and specifies CODE39, use CODE39. The format exists today mostly because rewriting those old systems is nobody's priority.

Side-by-Side Reference

CODE128
  • Full ASCII, variable length
  • Dense, great for small labels
  • Universal modern scanner support
  • Best for internal / non-retail use
  • Mandatory checkdigit (auto-calculated)
EAN-13 / UPC-A
  • Digits only, fixed length (13 or 12)
  • Issued by GS1, not freely chosen
  • Required for retail channels
  • Checkdigit is last digit, strict algorithm
  • Not appropriate for internal-only use

Quick Reference Table

FormatEncodesLengthCheckdigitBest For
CODE128Full ASCIIVariable (~1–80)Yes, autoInternal SKUs, WIP, tickets
EAN-13Digits13Yes, last digitRetail products (worldwide)
UPC-ADigits12Yes, last digitRetail products (North America)
ITF-14Digits14Yes, last digitShipping cartons, pallets
CODE39Uppercase + digits + 7 symbolsVariableOptionalLegacy industrial systems
GS1-128Structured data with AIsVariableYesLogistics with EDI requirements

About Checkdigits

Retail and logistics formats have mandatory checkdigits because a misread in those contexts is expensive. A single misread UPC at checkout charges the wrong price, triggers inventory drift, and takes a store manager half an hour to reconcile. The checkdigit catches ~99% of single-character errors.

For internal barcodes where a misread just means rescanning, the checkdigit matters less — but CODE128 includes one anyway. Don't disable it.

What About QR Codes?

QR codes are a separate tool. They're 2D, encode hundreds of characters, and work great for URLs, Wi-Fi credentials, payment requests, and anything that benefits from being scanned by a phone camera.

They're not the right choice for:

  • Retail checkout (scanners are mostly 1D laser units)
  • Conveyor belt scanning (1D scanners track motion better)
  • Anything that needs to be read at a distance or at speed

Different tool, different job.

Printing Realities

One last thing: the best-chosen barcode format will still fail if the print is bad. Some rules that hold across every format:

  • Minimum size matters. A barcode printed too small for its data density becomes unreadable. Generators warn about this — listen to them.
  • Quiet zones are not optional. The white space around a barcode is part of the spec. Trimming it to save label space breaks scans.
  • Contrast. Black on white or very dark on very light. Colored backgrounds, shiny laminates, and low-toner prints all cause failures.
  • Test on the actual scanner. A barcode that scans fine in your office may fail on a retailer's 5-year-old handheld unit with a dirty lens.

The Bottom Line

CODE128 if you control both ends. EAN-13 or UPC-A if it's going to retail. ITF-14 if it's a shipping carton. CODE39 only if you have no choice. Don't improvise retail barcode numbers, don't skip the checkdigit, and print a test batch before you commit to 10,000 labels.