Types of barcodes explained: 1D vs 2D and which standard to use for inventory
Types of barcodes explained: EAN, UPC, Code 128, Code 39, ITF-14, QR Code, Data Matrix, PDF417 and Aztec, and which standard to pick for inventory labels.
Published
There are many types of barcodes, but only about a dozen matter for day-to-day inventory work. They fall into two families: 1D barcodes, the familiar rows of vertical bars, and 2D codes such as QR Code and Data Matrix. For labels your own team scans, a QR code or Code 128 is almost always the right choice. Retail codes like EAN and UPC are for products sold through shops, not for your shelves.
This guide is a reference to the common barcode standards: what each one holds, where you see it, its strengths and limits, and when to use it.
1D vs 2D barcodes: the one difference that matters
A 1D barcode stores data in one direction only, in the widths of bars and spaces. A 2D code stores data across both width and height, in a grid of small squares or dots.
That single difference drives almost everything else:
- Capacity. A 1D barcode usually holds a short number or code, often a key that points to a record in a database. A 2D code can hold much more, including a full web address or a block of text.
- Size. To hold more, a 1D barcode gets longer. A 2D code stays compact and square.
- Damage. Most 2D codes include error correction, so they still scan with a scratch, a fold or a smudge. 1D barcodes usually carry only a check digit or check character, which catches misreads but cannot rebuild lost data.
- Readers. A classic laser scanner reads 1D barcodes by sweeping a line across them, and cannot read QR Code or Data Matrix. Camera-based scanners, phones and tablets read both.
Neither family is better in general. 1D barcodes are cheap to print, read on any scanner, and remain the standard at checkouts. 2D codes win when labels are small, data is longer, or the scanner is a phone.
Who sets barcode standards: GS1 in brief
Most product barcodes you see in shops follow standards maintained by GS1, a global, not-for-profit standards body with member organisations in many countries. GS1 defines numbering systems such as the GTIN (Global Trade Item Number) and issues company prefixes, so that no two companies anywhere give a product the same number.
The bar pattern itself is public; what makes a retail barcode valid is the issued number. Code 128, Code 39 and QR Code have no issuing authority: you decide what goes in them.
Retail 1D barcodes: EAN and UPC
EAN and UPC are the barcodes on consumer products. They hold digits only, have a fixed length, and end in a check digit that the scanner uses to catch misreads.
- EAN-13 holds 13 digits and is the most widely used product barcode around the world. The numbers are issued through the GS1 organisation in each country.
- EAN-8 is a shorter 8-digit version for packages too small for EAN-13, like a lip balm or a pack of batteries.
- UPC-A holds 12 digits and is the traditional product barcode in the United States and Canada. A UPC-A number is equivalent to an EAN-13 with a leading zero, so modern checkouts read both.
- UPC-E squeezes certain UPC-A numbers into a shorter symbol by dropping zeros, for small packs.
Strengths: every retail scanner reads them, and the number already identifies the product. Limits: digits only, fixed lengths, and the numbers must be registered. Do not invent EAN or UPC numbers for internal labels; a made-up number can clash with a real product.
General-purpose 1D barcodes: Code 128, Code 39, Code 93
These barcodes hold whatever code you choose, so they suit internal labels, shipping and industry.
- Code 128 can encode the full basic keyboard character set: letters in both cases, digits and punctuation. It is compact and has a check character. A GS1 variant, GS1-128, is used on shipping and pallet labels to carry structured data such as batch numbers and dates. For a 1D internal label, Code 128 is usually the best choice.
- Code 39 holds uppercase letters, digits and a few symbols. It is simple and very tolerant of print quality, which is why it lasted in manufacturing, ID badges and older systems. The price is size: the same code prints much wider than Code 128.
- Code 93 uses the same character set as Code 39 but prints more compactly and adds two check characters.
Barcodes for cartons: ITF and ITF-14
ITF (Interleaved 2 of 5) encodes digits only, in pairs, so it always holds an even number of digits. Its bars are wide and forgiving, which makes it easy to print directly on rough surfaces such as corrugated cardboard.
ITF-14 is the GS1 use of ITF for shipping cartons. It carries a 14-digit number (GTIN-14) that identifies a case of products rather than a single unit, and is usually printed with a thick frame, the bearer bar, that protects the edges from misreads.
2D codes: QR Code, Data Matrix, PDF417 and Aztec
2D codes hold more data in less space and survive damage better. They need a camera-based reader, which every phone already is.
- QR Code is the square code with three large squares in the corners. It was developed in Japan in the 1990s to track car parts and is now everywhere. It holds numbers, text and web addresses, reads quickly from almost any angle, and offers four levels of error correction. For internal inventory labels scanned with phones, it is the easiest choice.
- Data Matrix is a square or rectangular grid with a solid L-shaped border on two sides. It stays readable at very small sizes, which is why it is marked, printed or even laser-etched onto electronic components, tools, medical devices and medicine packs. GS1 DataMatrix is the standard version in healthcare.
- PDF417 looks like a stack of short 1D barcodes. It holds a lot of data and is common on ID cards, driving licences, boarding passes and shipping documents.
- Aztec has a bullseye at its centre and needs little empty margin around it. It works well on phone screens and is widely used for transport and event tickets.
Barcode types compared
| Type | Family | What it holds | Where you usually see it | Good for internal labels? |
|---|---|---|---|---|
| EAN-13 | 1D | 13 digits, registered | Consumer products worldwide | No, retail only |
| EAN-8 | 1D | 8 digits, registered | Very small packages | No, retail only |
| UPC-A / UPC-E | 1D | 12 digits (UPC-E shortened), registered | Products in the US and Canada | No, retail only |
| Code 128 | 1D | Letters, digits, symbols | Shipping, logistics, asset tags | Yes, the best 1D option |
| Code 39 | 1D | Uppercase letters, digits, a few symbols | Manufacturing, ID badges, older systems | Yes, if an existing system needs it |
| Code 93 | 1D | Same as Code 39, more compact | Industrial uses | Rarely needed |
| ITF / ITF-14 | 1D | Digits only, even length | Corrugated shipping cartons | No, for cartons |
| QR Code | 2D | Numbers, text, web addresses | Everywhere, from menus to labels | Yes, the easiest with phones |
| Data Matrix | 2D | Numbers, text, very small | Parts, electronics, medicine | Yes, for tiny items |
| PDF417 | 2D (stacked) | Large amounts of data | ID cards, boarding passes, documents | Rarely |
| Aztec | 2D | Text, compact | Tickets on phone screens | Rarely |
Other standards exist, such as Codabar and GS1 DataBar. Check that your scanner or app reads a format before relying on it.
Which barcode should you use for inventory?
Choose by how you scan and where the label goes.
- You scan with phones or tablets: use QR Code. It prints small, scans from any angle and can open the item’s record directly.
- You already own laser scanners: use Code 128. It reads on any 1D scanner, and the code can be printed as readable text underneath.
- Labels must be tiny: use Data Matrix, for small tools, parts and components.
- An existing system expects a format: keep it. Consistency beats switching standards halfway through.
- Products already carry EAN or UPC: use those barcodes as they are, and label shelves or bins instead of covering them.
If one person looks after a few items, a handwritten label and a list may be enough. Barcodes earn their place once several people share the stock or counts keep drifting.
Where Tana fits
Tana is a shared inventory app for teams. It works with the labels you print and the barcodes already on your stock.
- QR labels. Print sheets of QR labels for items and storages (shelves, boxes, rooms, vehicles) from the web app. Scanning a label opens that item or storage so you can record stock with − and +, or set an exact count during a stocktake.
- Existing barcodes. Attach a manufacturer’s barcode to an item, and scanning the product opens it. You can also search by barcode.
- Formats in the iPhone and iPad app: QR Code, EAN-13, EAN-8, UPC-E, Code 128, Code 39, Code 93, Data Matrix, Aztec, ITF, ITF-14 and PDF417.
- Formats in the web app (your browser’s camera): QR Code, EAN-13, EAN-8, UPC-A, UPC-E, Code 128 and Code 39.
- Shared, live numbers. Everyone sees the same counts, with low-stock alerts and a history of who changed what.
Tana does not issue retail barcodes; those still come from your GS1 organisation. There is a free plan with no card required.
Frequently asked questions
What is the difference between a QR code and a barcode?
A QR code is a type of barcode. “Barcode” usually means a 1D code of vertical bars holding a short code; a QR code is a 2D barcode that holds more data, including web addresses, and still scans when partly damaged.
What is the most common type of barcode?
For products in shops, EAN-13 and UPC-A are the most common. For shipping and internal use, Code 128 and QR Code are the ones you meet most.
Is Code 128 or Code 39 better for inventory?
Code 128 in most cases: it holds more characters and prints narrower. Choose Code 39 only when an existing system requires it.
Can a phone read every type of barcode?
A phone camera can read both 1D and 2D codes, but each app supports its own list of formats. Check that yours reads the types on your stock before you rely on it.