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. This guide covers how that encoding works, which of the common formats — UPC, EAN-13, Code 128, ITF-14 and more — fits retail, inventory or shipping, what a check digit actually catches, where real product numbers come from, and how to size and print a barcode that scans the first time.

🕒 Updated September 26, 2026 📘 ~10 min read 🆓 Free forever ⭐ Rate this guide
Rahib Ali
Written & maintained by Rahib Ali
Senior PHP/Laravel Developer & Technical SEO Specialist, 12+ years experience · Updated September 26, 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.