Business

Barcode formats compared: Code 128 vs EAN-13 vs UPC

ToolOrbit Team 2 min readUpdated
Barcode formats compared: Code 128 vs EAN-13 vs UPC

A barcode is just a font for machines: parallel bars that encode a number or text the way letters encode sound. The “which one should I use?” answer is short (Code 128 for general use, EAN-13 for retail products), but the distinctions behind it decide whether your labels scan the first time — so this guide walks the formats that actually appear on products and cartons.

The formats that matter

  • Code 128 — the workhorse. Encodes any text and digits, high density, used for shipping labels, inventory and logistics.
  • EAN-13 — the global retail product code: 13 digits (12 you supply plus a computed check digit).
  • UPC-A — the North American retail standard, 12 digits with a check digit. EAN-13 and UPC-A scanners interoperate.
  • Code 39 — an older, simple alphabet format still required by some legacy systems and US government labels.
  • ITF-14 — a dense box-level code used on outer cartons of products sold at retail.

The check digit question

EAN-13 and UPC-A codes are 12 or 13 digits, but you rarely type all of them: the final digit is a check digit computed from the others, and a scanner uses it to reject a misread or mistyped code before it ever reaches the till. A good barcode generator validates and computes that digit for you, and refuses to print codes where the check digit cannot be correct — which catches typos that would otherwise produce hundreds of bad labels.

Rendering at print quality

  • Keep a quiet zone: empty space around the code, roughly ten times the narrow module width per side.
  • Print at a module width a laser or thermal printer can hold — too thin bleeds into a solid bar.
  • Test scan one proof label before printing a full roll; scanners fail differently than eyes.

A barcode rendered into a blurry label is worse than no barcode, because a register cannot sell the product at all. Most barcode tools sell vector-quality output; ours produces a high-resolution made-for-print PNG from your code.

Retail numbers come from GS1

Anyone can generate a barcode image, but retail EAN-13 and UPC-A numbers need to be globally unique or stores will refuse them (or, worse, a cashier’s scanner will ring up someone else’s product). Retail numbers are assigned by GS1 to companies; internal inventory, shipping and school-lab use can use any numbers you like. So generate freely for internal use, and buy the proper prefix before you strike a deal with a retailer.

When a product needs to link to a webpage or encode more than fifty characters, switch from a linear barcode to a QR code — the format stores far more data and survives scanning from a phone.

Tools mentioned

More reading

View all guides
How QR Codes Work: Error Correction, Size and Scanning Tips
Business

How QR Codes Work: Error Correction, Size and Scanning Tips

What a QR code can hold, how error correction trades size for reliability, and how to print codes that scan first time.

2 min readUpdated
What Makes a Password Strong? Length, Randomness and Entropy
Business

What Makes a Password Strong? Length, Randomness and Entropy

Password strength comes from length and randomness, measured in bits of entropy. How the numbers work, and the habits that keep accounts safe.

2 min readUpdated
How to Calculate Your Break-Even Point (Formula + Example)
Business

How to Calculate Your Break-Even Point (Formula + Example)

The break-even formula, the difference between fixed and variable costs, a worked example, and how to use the number to plan.

2 min readUpdated
How to Calculate Markup and Set a Selling Price
Business

How to Calculate Markup and Set a Selling Price

How markup turns a cost into a selling price, why markup is not margin, and a worked example.

2 min readUpdated
How to Calculate ROI and Annualized ROI
Business

How to Calculate ROI and Annualized ROI

The ROI formula, why annualized ROI is the fair way to compare investments, a worked example, and how ROI differs from payback.

2 min readUpdated
How to create a reusable digital signature image
Business

How to create a reusable digital signature image

The difference between a signature image, an electronic signature and a legally binding one — and how to draw a clean PNG you can reuse.

2 min readUpdated
How to run a fair name draw in your classroom or giveaway
Business

How to run a fair name draw in your classroom or giveaway

Why humans are bad at picking winners, what true randomness looks like, and how to run no-repeat draws for classes, raffles and standups.

3 min readUpdated
What belongs on a freelance invoice (and what never does)
Business

What belongs on a freelance invoice (and what never does)

The mandatory fields, the tax handling, the numbering scheme, and the pieces of the invoice puzzle that only slow payment down.

2 min readUpdated