Barcodes (UPC, EAN & Code 128): The Complete Guide

A barcode is a machine-readable identifier: a row of bars and spaces whose widths encode a short number or text that a scanner can read in a fraction of a second. The barcodes on retail products are EAN and UPC codes: EAN-13 is used worldwide, and UPC-A is the 12-digit version used in the US and Canada. This guide explains what the digits of a UPC or EAN code mean, when Code 128, ITF-14 or another format fits better, what a check digit catches, where real product numbers come from, and how to size and print a barcode that scans the first time.

🕒 Updated November 11, 2026 📘 ~10 min read 🆓 Free forever 🛠️ Make a barcode free
Rahib Ali
Written & maintained by Rahib Ali
AI Engineer | Senior Full-Stack Developer | Python · PHP/Laravel · LLMs · AI Agents · 12+ years experience · Updated November 11, 2026

The check-digit example, the UPC-A/EAN-13 and UPC-E equivalences, and the error-detection claims in this guide were verified in code — including generating barcodes with Frost Rank's own Barcode Generator and decoding them with two independent scanner libraries (ZXing and zbar) — not taken on trust.

Available for SaaS & AI automation projects → Hire me · Portfolio · Services