Last updated: May 2026 · 10 min read
Barcode Types Explained: Which Format Should You Use?
There are dozens of barcode formats in use around the world, each designed for a specific purpose. Choosing the wrong one can mean your codes won't scan at point-of-sale, won't be accepted by your shipping carrier, or simply won't fit on your packaging. This guide explains every major barcode type in plain language.
1D vs 2D Barcodes: An Overview
Barcodes come in two fundamental dimensions:
One-dimensional (1D) barcodes encode data as a series of vertical lines of varying widths and spacings. They can only be read by scanning horizontally across the bars. They store a limited amount of data — typically a numeric or alphanumeric product or tracking code — and rely on a database lookup to retrieve the full record behind that code.
Two-dimensional (2D) barcodes encode data both horizontally and vertically as a grid of squares or dots. They store significantly more data independently (a QR code can contain an entire web address or contact card), and can be read from any angle. QR codes are the most widely known 2D format.
Most of this guide focuses on 1D barcodes, since these are what retailers, manufacturers, and logistics companies use for product identification. QR codes are covered at the end.
Code 128
Code 128 is the most widely used general-purpose 1D barcode in the world. It encodes the full 128-character ASCII set — uppercase and lowercase letters, numbers, and special characters — at very high density. This means Code 128 barcodes can be printed smaller than most other formats while still scanning reliably.
Code 128 comes in three sub-types (Code Sets A, B, and C) that optimise for different character sets. Code Set C is particularly efficient for numeric-only data, encoding pairs of digits in a single symbol. Most barcode generators select the right sub-type automatically.
GS1-128 (formerly EAN-128) is an application of Code 128 that uses a standardised prefix called an Application Identifier (AI) to encode structured logistics data — things like batch numbers, expiry dates, and weight — on a single label. GS1-128 is the standard for supply chain labels used by major retailers like Walmart and Target.
Use Code 128 when: you need a general-purpose barcode for internal tracking, shipping labels, asset management, or any application where you're not required to use a specific retail standard.
EAN-13
EAN-13 (European Article Number, 13 digits) is the global standard barcode for retail products sold outside North America. You'll find it on virtually every product sold in supermarkets, pharmacies, and shops across Europe, Asia, Australia, and the rest of the world.
The 13 digits are structured as follows: the first 2–3 digits are a GS1 country prefix (this identifies the country where the company is registered, not where the product is made); the next digits are the company's GS1 prefix; followed by the product reference number; and finally a single check digit calculated from the preceding numbers.
To sell products in retail stores, you must obtain a legitimate GS1 Company Prefix from GS1 — the organisation that administers the standard. You cannot simply invent EAN-13 numbers; retailers' systems will reject unregistered codes. GS1 membership has an annual fee based on your company size.
Use EAN-13 when: you're selling physical products in international retail, or when required by a specific retailer or marketplace.
UPC-A
UPC-A (Universal Product Code, Type A) is the standard retail barcode for products sold in the United States and Canada. It's functionally very similar to EAN-13 — in fact, a UPC-A code is simply an EAN-13 with a leading zero prepended, which is why all modern EAN-13 scanners can also read UPC-A codes.
Like EAN-13, UPC-A numbers must be registered through GS1. The 12 digits consist of a number system digit (the leading digit), a 5-digit manufacturer code, a 5-digit product code, and a check digit.
If you're selling in both North America and internationally, you can use EAN-13 (which includes the leading zero to make it a 13-digit code), and it will scan correctly at both US and international point-of-sale systems.
Use UPC-A when: you're selling products in North American retail, particularly if a US or Canadian retailer specifically requires it.
EAN-8
EAN-8 is a compact version of EAN-13 designed for products where space is too limited to print a full 13-digit barcode. It uses only 8 digits and prints significantly narrower, making it suitable for small items like lipstick tubes, small confectionery, medicine blister packs, and other compact packaging.
EAN-8 numbers are assigned by GS1 and cannot be self-issued. They must be applied for specifically because the shorter format offers fewer combinations, so GS1 controls allocation carefully to avoid collisions.
Use EAN-8 when: your product is small and a full EAN-13 barcode physically won't fit on the packaging, and you're selling in international retail.
UPC-E
UPC-E is the compact version of UPC-A for the North American market — the equivalent of EAN-8 but for US/Canadian retail. It uses a "zero suppression" technique to compress a standard 12-digit UPC-A number into just 8 characters, making the physical barcode narrower.
Not every UPC-A number can be compressed into UPC-E — the algorithm only works for codes where zeros appear in specific positions. This is handled automatically by barcode generators: you enter your UPC-A number and the generator will tell you if a UPC-E equivalent exists.
Use UPC-E when: you're selling small items in North American retail where the full UPC-A won't fit on the packaging.
Code 39
Code 39 is one of the oldest barcode formats, developed in 1974. It encodes 43 characters: uppercase letters A–Z, digits 0–9, and a handful of special characters (space, -, ., $, /, +, %). Each character is represented by five bars and four spaces, always in a pattern of exactly three wide elements — which is where the "39" name originally came from (three of nine elements are wide).
Code 39 is self-checking, meaning each character contains an inherent redundancy that makes misreads rare without needing an additional check digit. It was the first alphanumeric barcode and became widely adopted in industries that existed before more modern alternatives were developed.
It's still required in several legacy environments: the United States Department of Defense mandates Code 39 on military equipment and supplies. The automotive industry uses it for parts tracking. Many healthcare systems still use it for patient and asset labels. Outside these specific legacy contexts, Code 128 is almost always a better choice — it stores the same data at higher density.
Use Code 39 when: you're working in automotive, defence, or healthcare sectors with existing infrastructure built around this format, or when a trading partner specifically requires it.
ITF-14
ITF-14 (Interleaved 2-of-5, 14 digits) is the GS1 standard barcode for outer shipping cartons and corrugated cardboard packaging. It encodes a 14-digit Global Trade Item Number (GTIN-14), which is a variant of the standard retail GTIN with a leading packaging indicator digit.
The Interleaved 2-of-5 symbology encodes pairs of digits by interleaving two sets of five bars — even digits in the bars, odd digits in the spaces between them. This makes it highly compact and tolerant of the lower print quality typical of corrugated cardboard surfaces.
ITF-14 always has a visible rectangular border (called a bearer bar) printed around it. This border ensures the scanner reads the barcode correctly and prevents the scanner from misreading the edges of the code as part of the data.
Use ITF-14 when: you're labelling outer cartons, cases, or pallets for retail distribution — particularly when shipping to large retailers who use GS1 standards throughout their supply chain.
MSI Plessey
MSI (Modified Plessey) is a numeric-only barcode format derived from the older Plessey code. It's a relatively simple format — each digit is represented by a fixed pattern of four bars — and it supports configurable check digit schemes (Mod 10, Mod 11, or double Mod 10).
MSI is not a global standard and is rarely specified by trading partners or retailers. Its primary use today is in internal retail inventory management — labelling shelf locations, storage bins, and warehouse rack positions. Some older pharmacy and retail systems use it for shelf labels where only numeric location codes are needed.
Use MSI when: you're creating internal shelf or bin labels for inventory management and your existing system is built around this format.
QR Code
QR codes are two-dimensional matrix codes that store data in a square grid of black and white modules. Unlike 1D barcodes, QR codes encode information both horizontally and vertically, allowing them to store far more data and be scanned from any angle with a standard smartphone camera.
QR codes are not part of the GS1 retail standard system — they don't replace UPC or EAN codes at point-of-sale — but they serve an entirely different purpose: enabling consumers to interact with physical objects and surfaces using their phones.
For a full explanation of QR codes, how they work, and all their uses, see our dedicated guide: What Is a QR Code?
Quick Comparison Table
| Format |
Data |
Length |
Primary Use |
| Code 128 | All ASCII | Variable | Shipping, inventory, internal tracking |
| EAN-13 | Numeric | 13 digits | International retail products |
| UPC-A | Numeric | 12 digits | North American retail products |
| EAN-8 | Numeric | 8 digits | Small international retail items |
| UPC-E | Numeric | 8 digits | Small North American retail items |
| Code 39 | Alphanumeric | Variable | Automotive, defence, healthcare |
| ITF-14 | Numeric | 14 digits | Outer cartons, pallet shipping |
| MSI | Numeric | Variable | Shelf labels, inventory bins |
| QR Code | Any (URL, text…) | Up to 7,089 chars | Consumer scanning, marketing, payments |
How to Choose the Right Barcode
The most important question: Does your use case require a specific standard set by a retailer, regulatory body, or trading partner? If yes, that requirement decides the format for you — check with whoever you're supplying to before generating any codes.
Selling products in retail stores?
You need a GS1-registered barcode. Use EAN-13 for international markets, UPC-A for North American markets only. If your product is very small and the standard barcode won't fit, use EAN-8 or UPC-E respectively — but you'll need to apply for these specifically through GS1.
Shipping and logistics?
Use Code 128 (or GS1-128 if your supply chain partners require it) for individual shipment labels. Use ITF-14 for outer cartons and cases going to retail distribution centres.
Internal warehouse or asset tracking?
Use Code 128 — it's the most versatile and high-density 1D format, reads reliably on all scanners, and doesn't require any registration. For simple numeric-only labels, Code 128 is still a fine choice, though MSI also works if your system uses it.
Healthcare or defence?
These sectors often have mandated formats. US military suppliers typically need Code 39. Healthcare may require Code 128 or GS1-128 — check the specific requirement of the institution or system you're supplying.
Consumer-facing / marketing?
Use a QR code. It's the only format that consumers can scan with their phone cameras without any additional hardware. QR codes are ideal for linking physical objects to digital content.
Also read: What Is a QR Code? · How to Use QR Codes for Business