Skip the research. Find your use case below.
Linear barcodes store data in a single row of vertical bars and spaces. They have been the standard for retail and logistics since the 1970s. If you are working with physical products, shipping, or inventory, one of these formats is probably what you need.
The universal workhorse
If you are not sure which barcode to use, start here. Code 128 handles any combination of letters, numbers, and symbols with no fixed length. It produces compact, high-density barcodes that work with virtually every scanner on the market.
When to use it
You need a barcode for internal operations - inventory labels, asset tags, work orders, shipping labels, or anything that does not require a standardized retail product number.
Data
Letters, numbers, symbols
Length
Variable (no limit)
Check
Automatic (Mod 103)
The retail standard in North America
Walk into any store in the United States or Canada and pick up a product. The barcode on it is almost certainly UPC-A. This 12-digit format has been the backbone of retail since 1974 when the first UPC was scanned on a pack of Wrigley's chewing gum in Ohio.
When to use it
You are selling a physical product through retail stores in the US or Canada. Retailers require UPC-A barcodes for point-of-sale scanning. You will need a GS1 company prefix to get a unique number.
Data
Numbers only
Length
Exactly 12 digits
Check
Built-in (last digit)
The global version of UPC
EAN-13 is the international equivalent of UPC-A. It uses 13 digits instead of 12, with the extra digit representing the country of origin. Every UPC-A barcode is technically an EAN-13 with a leading zero. If you are selling products outside North America, this is your format.
When to use it
You are selling products in Europe, Asia, South America, Africa, or Australia. International retailers and marketplaces require EAN-13. Like UPC-A, you need a GS1 prefix.
Data
Numbers only
Length
Exactly 13 digits
Check
Built-in (last digit)
For products too small for a full barcode
Some products are physically too small to fit a standard EAN-13 or UPC-A barcode. Lip balm tubes, candy bars, small cosmetics - when the packaging is tiny, EAN-8 gives you a scannable barcode in half the space. It uses 8 digits and produces a noticeably shorter barcode.
When to use it
Your product packaging is too small for a full-size barcode. EAN-8 numbers are assigned directly by your local GS1 office (you cannot derive them from your company prefix).
Data
Numbers only
Length
Exactly 8 digits
Check
Built-in (last digit)
The government and military standard
Code 39 is one of the oldest barcode formats still in wide use. It is the required format for the US Department of Defense (MIL-STD-1189) and is used across government agencies, military logistics, and automotive manufacturing. Its main advantage: it is self-checking, meaning it does not require a check digit.
When to use it
You work with government contracts, military supply chains, or the automotive industry. Code 39 is also common in libraries and older inventory systems.
Data
Letters (A-Z), numbers, some symbols
Length
Variable
Check
Optional (self-checking)
Built for shipping cartons
ITF-14 is specifically designed for marking outer shipping cartons and cases, not individual products. The "ITF" stands for Interleaved Two of Five - it encodes digits in pairs, which makes it efficient but limits it to numbers only. The thick bars print well on corrugated cardboard, which is why logistics companies prefer it.
When to use it
You are labeling shipping cases, pallets, or outer cartons that contain multiple products inside. The ITF-14 identifies the case, while the products inside have their own UPC-A or EAN-13 barcodes.
Data
Numbers only
Length
Exactly 14 digits
Check
Built-in (last digit)
Two-dimensional barcodes store data in a grid instead of a single line. They hold far more information and can be scanned by smartphone cameras. QR codes are the most well-known, but Data Matrix and PDF417 serve critical roles in healthcare, manufacturing, and government.
Tiny items, massive data
Data Matrix is a 2D barcode that can be printed as small as 2mm x 2mm while remaining scannable. The electronics industry uses it to mark individual components like resistors and chips. Healthcare uses it on surgical instruments, medication vials, and lab samples. It is also the format required by the US FDA for unique device identification (UDI) on medical devices.
When to use it
You need to mark very small items, or you work in an industry that requires Data Matrix specifically (electronics manufacturing, medical devices, pharmaceutical serialization).
Data
Any (text, numbers, binary)
Capacity
Up to 2,335 characters
Error correction
Reed-Solomon error correction
The identity document format
PDF417 is a stacked barcode that stores data across multiple rows. It can hold up to 1,850 characters - enough for a paragraph of text or a set of biometric data. Look at the back of your driver's license: that is a PDF417 barcode. Airlines use it on boarding passes. Government agencies use it on official documents.
When to use it
You need to encode large amounts of data in a scannable format, typically for identity documents, tickets, or passes. PDF417 has built-in error correction, so it scans even when partially damaged.
Data
Any (text, numbers, binary)
Capacity
Up to 1,850 characters
Error correction
Reed-Solomon error correction
Looking for QR codes?
Create QR codes for URLs, WiFi, contact cards, email, and SMS with our free QR code generator.
All barcode formats at a glance. Compare data capacity, use cases, and requirements.
| Format | Type | Data | Length | Best for |
|---|---|---|---|---|
| Code 128 | 1D | Letters, numbers, symbols | Variable (no limit) | Warehousing, Logistics |
| UPC-A | 1D | Numbers only | Exactly 12 digits | Retail (US/Canada), Grocery |
| EAN-13 | 1D | Numbers only | Exactly 13 digits | International Retail, Export |
| EAN-8 | 1D | Numbers only | Exactly 8 digits | Cosmetics, Confectionery |
| Code 39 | 1D | Letters (A-Z), numbers, some symbols | Variable | Government, Military (DoD) |
| ITF-14 | 1D | Numbers only | Exactly 14 digits | Shipping, Distribution |
| Data Matrix | 2D | Any (text, numbers, binary) | Up to 2,335 characters | Electronics, Medical Devices |
| PDF417 | 2D | Any (text, numbers, binary) | Up to 1,850 characters | Government IDs, Airlines |
Common questions about barcode types and formats.
Pick your format, enter your data, download as PNG or SVG. Free, instant, no account needed.