Complete Guide to Barcode Types & When to Use Each
Barcodes are everywhere — on every product you buy, every package you ship, every library book you borrow. But not all barcodes are created equal. This guide covers the six most common barcode formats, when to use each, and how to generate them for free.
- Learn about Code 128, EAN-13, UPC-A, Code 39, ITF-14, and QR Code formats.
- Covers 1. what are barcodes and why do they matter?.
- Covers 2. code 128 — the versatile standard.
- Covers 3. ean-13 — international retail.
- Covers 4. upc-a — us & canadian retail.
1. What Are Barcodes and Why Do They Matter?
A barcode is a machine-readable representation of data. The pattern of bars, spaces, or squares encodes information — usually a number or short string — that scanners can read in milliseconds. Barcodes eliminated manual data entry errors in retail, shipping, healthcare, and manufacturing.
There are two families: 1D barcodes (parallel lines of varying width) and 2D barcodes (grids of squares like QR codes). 1D barcodes are simpler and cheaper to print but store less data. 2D barcodes store more data and can be read from any angle.
2. Code 128 — The Versatile Standard
Code 128 is the most widely used 1D barcode format. It encodes the full ASCII character set (letters, numbers, punctuation) in a compact format. You will find it on shipping labels, inventory tags, and healthcare wristbands.
-webkit-backdrop-filter alongside backdrop-filter for Safari support. Without the prefix, the effect is invisible to roughly 25% of mobile users.Code 128 is popular because it is dense — it encodes more characters per inch than most other 1D formats. It also includes a built-in checksum for error detection. GS1-128 (formerly UCC/EAN-128) is a standardized version used in supply chain management.
3. EAN-13 — International Retail
EAN-13 (European Article Number) is the global standard for retail products. Every product with a barcode at a grocery store, bookstore, or pharmacy uses EAN-13. It encodes exactly 13 digits: a country code, company prefix, product number, and check digit.
backdrop-filter inside a position: fixed element can cause severe scroll performance issues. Test thoroughly on real iOS devices.To use EAN-13 on real products, you need a GS1 company prefix — a paid registration that ensures your barcodes are globally unique. The check digit is calculated automatically using a weighted sum algorithm.
4. UPC-A — US & Canadian Retail
UPC-A is essentially the North American version of EAN-13, encoding 12 digits. It is technically a subset of EAN-13 (a UPC-A barcode is an EAN-13 with a leading zero). If you sell products in the US or Canada, UPC-A is what point-of-sale systems expect.
5. Code 39 — Military & Industrial
Code 39 is the oldest alphanumeric barcode, supporting uppercase letters, digits, and a handful of special characters. It is self-checking (no checksum required) and widely used in US Department of Defense applications (LOGMARS), automotive (AIAG), and healthcare.
Code 39 barcodes are wider than Code 128 for the same data, so they need more label space. But their simplicity and self-checking property make them reliable in harsh environments.
6. ITF-14 — Shipping Cartons
ITF-14 (Interleaved 2 of 5) is designed specifically for outer packaging — the cardboard cartons that contain retail-ready products. It encodes 14 digits and is printed with thick bars that tolerate the rough surfaces of corrugated cardboard.
7. QR Codes — The 2D Powerhouse
QR (Quick Response) codes are 2D barcodes that store up to 4,296 alphanumeric characters in a grid of black and white squares. They support URLs, contact cards, Wi-Fi credentials, text, and more. Error correction allows the code to be read even when partially damaged.
QR codes have four error correction levels: L (7%), M (15%), Q (25%), and H (30%). Higher correction means the code can tolerate more damage but requires a larger grid. For most uses, M (Medium) provides the best balance.
8. How to Choose the Right Format
- Retail products (worldwide): EAN-13
- Retail products (US/Canada): UPC-A
- Shipping labels & inventory: Code 128
- Military & automotive: Code 39
- Outer cartons & packaging: ITF-14
- URLs, contacts, any text: QR Code
9. Barcode Printing Best Practices
- Use high contrast: Dark bars on a white background. Avoid red bars — laser scanners often can't read them.
- Maintain quiet zones: Leave blank space around the barcode — at least 10x the narrowest bar width on each side.
- Test before mass printing: Always scan a test print with a real barcode reader before running a full production batch.
- Use SVG for print: Vector formats scale without quality loss. Use PNG only for screen display.