Barcode Types Explained
The main barcode types are UPC-A (12 digits, North American retail), EAN-13 (13 digits, global retail), Code 128 (letters and numbers, logistics), and QR codes (2D, thousands of characters). Generate any of them with our free barcode generator; the full comparison is below.
UPC-A and EAN-13: the retail standards
UPC-A is the 12-digit barcode on virtually every product sold in the United States and Canada. On June 26, 1974, a 10-pack of Wrigley's chewing gum became the first item ever scanned at a checkout, and the format has barely changed since. Its 12 digits encode a system digit (usually 0), a 5-digit manufacturer code, a 5-digit product code, and a check digit computed by a modulo-10 algorithm. EAN-13, introduced in 1977, is the global equivalent: 13 digits, with the first 2–3 digits identifying the country of registration (400–440 for Germany, 690–695 for China, 00–13 for the US/Canada as a UPC-compatible prefix). Any UPC-A can be represented as an EAN-13 by adding a leading zero, which is why modern scanners read both. The compact siblings handle small packaging: EAN-8 (8 digits) for tiny items like cosmetics, and UPC-E (8 digits, compressed from UPC-A by stripping zeros) for small US products. Critical fact for sellers: you cannot invent retail barcodes — UPC/EAN numbers must be licensed from GS1, the global standards body, or your product will collide with someone else's number at checkout. A generator can create the image from your digits, but the digits themselves must be legitimately yours for retail use.
Code 128 and Code 39: the workhorses of logistics
Where retail codes are fixed-length and numeric-only, Code 128 is the flexible generalist: it encodes the full ASCII set (128 characters) — uppercase, lowercase, digits, and symbols — at high density, with three character subsets (A, B, C) the encoder switches between for compactness. Subset C pairs digits, so a 20-digit serial number encodes in just 10 symbol characters plus overhead. That density is why Code 128 dominates shipping labels, warehouse bins, asset tags, and serial numbers — anywhere the data is alphanumeric and space matters. It includes a mandatory modulo-103 check digit, and virtually every scanner made since the 1990s reads it. Code 39 is the older, simpler cousin: 43 characters (A–Z, 0–9, and a handful of symbols), wider bars, lower density — but readable by the oldest scanners still in service, which is why it persists in military, automotive, and healthcare labeling where equipment turnover is slow. New projects should default to Code 128 unless a trading partner mandates Code 39; the density advantage is roughly 30% on numeric data and larger on mixed data. Both are 'free' symbologies in the sense that no license is needed — unlike retail codes, you can generate Code 128 labels for internal use with our barcode generator and stick them on anything today.
QR codes and 2D symbologies: when bars become squares
Traditional barcodes are 1D — data encoded in one dimension of varying bar widths. QR codes are 2D: data encoded across both axes of a square matrix, which multiplies capacity enormously. A QR code holds up to 4,296 alphanumeric characters or about 3KB of binary data — versus 12 digits for UPC-A. That capacity is why QR codes carry URLs, Wi-Fi credentials, contact cards, payment addresses, and tickets: use cases where the barcode itself must contain the payload, not just a database key. QR also reads omnidirectionally (any angle, unlike 1D codes that need a horizontal sweep) and includes Reed-Solomon error correction — up to 30% of the symbol can be damaged or obscured and it still scans, which is why QR codes survive crumpled receipts and cracked phone screens. The tradeoff: QR needs a camera-based imager, while 1D codes work with cheap laser scanners — a warehouse with laser guns on every forklift sticks with Code 128. Other 2D formats fill niches: Data Matrix (tiny etched marks on electronics and surgical tools), PDF417 (driver's licenses, boarding passes), Aztec (transit tickets). Rule of thumb: if a person with a phone is the scanner, use QR; if an industrial scanner is, use 1D. Our QR code with logo guide covers the branded variant.
How to choose: a decision table
Pick by answering two questions: who scans it, and what data must it carry? Selling a physical product in stores → UPC-A (North America) or EAN-13 (everywhere else), with GS1-licensed numbers — no exceptions, since retailers' systems expect these formats. Small product, tiny label → EAN-8 or UPC-E. Internal tracking with letters and numbers (serial numbers, bin locations, asset tags) → Code 128, the default for logistics. Legacy industrial partner → Code 39, only if they require it. Data the barcode itself must contain (URL, text, credentials) → QR code. High-density numeric strings → Code 128 subset C. Marking tiny parts permanently → Data Matrix. Two common mistakes: using a QR code for retail checkout (POS systems expect UPC/EAN and most cannot process QR at speed) and using UPC-A for internal serial numbers (fixed 12-digit numeric format, plus you would burn licensed numbers on internal labels). When in doubt, Code 128 is the safe general-purpose pick — free to use, readable everywhere, and flexible enough for almost any internal job. Generate test symbols for any of these formats with our free barcode generator, and for the QR side specifically, see how to make a Wi-Fi QR code for a practical 2D walkthrough. Two utilities help beyond generation: the unix timestamp converter decodes the epoch times many warehouse systems embed in serial numbers, and the word counter keeps human-readable label copy within space limits. Generate test symbols for every candidate format, print one sheet, scan each with the production device, and only then commit to the full run — the five-minute test that prevents five thousand bad labels.