Types of barcodes at a glance
| Barcode | Family | What it holds | Typical use |
|---|---|---|---|
| EAN-13 | 1D | 13 digits | Retail products outside North America; books as ISBN |
| EAN-8 | 1D | 8 digits | Small packs with little room for a label |
| UPC-A | 1D | 12 digits | Retail products in the US and Canada |
| UPC-E | 1D | UPC-A compressed to 6 digits (plus number system and check digit) | Small items such as cans and confectionery |
| Code 128 | 1D | Letters, digits and symbols, compact | Shipping, logistics, internal labels |
| GS1-128 | 1D | Code 128 carrying GS1 data fields | Shipping labels, pallets, cases |
| Code 39 | 1D | Upper-case letters, digits, a few symbols | Industry, asset tags, ID badges |
| Code 93 | 1D | Same characters as Code 39 in less space | Industry and logistics |
| ITF / ITF-14 | 1D | Digits only, in pairs | Outer cartons and corrugated boxes |
| Codabar | 1D | Digits and a few symbols | Library books, courier waybills, blood bags |
| QR Code | 2D | Text, web addresses, contact cards, Wi-Fi details | Marketing, payments, menus, tickets |
| Data Matrix | 2D | Text and numbers in a very small square | Parts marking, electronics |
| GS1 DataMatrix | 2D | Product number, batch, expiry, serial | Medicines and medical devices |
| PDF417 | 2D (stacked) | Long records in a rectangle | Driving licences, ID cards, boarding passes |
| Aztec | 2D | Text, readable on screens | Rail and air tickets |
Havelt QR reads every type in the table above, from EAN-13 and ITF-14 to PDF417 and Aztec, and splits GS1-128 and GS1 DataMatrix into labelled fields. Get it on Google Play
1D vs 2D barcodes
A linear barcode is read across its width, so it holds only a short string: a product number or a tracking reference. The number usually points to a record in a database, which is where the price or the parcel details live.
A 2D barcode spreads data over both directions of a grid. That is why a QR code can hold a whole web address or a contact card, and a GS1 DataMatrix on a medicine pack can carry the product number, batch, expiry date and serial number together. DENSO WAVE, which developed the QR Code, lists the capacity of each QR variant: a full-size QR Code (Model 2) holds up to 7,089 digits, while a Micro QR holds up to 35.
2D codes also survive some damage. They carry error correction, so a code with a scratch or a small logo over part of it can still read.
| 1D barcodes | 2D barcodes | |
|---|---|---|
| Data | A short number or code | Up to thousands of characters |
| Shape | Wide strip of bars | Square or rectangle |
| Reader | Laser scanners or cameras | Cameras and imaging scanners |
| Damage | A torn bar can stop it reading | Error correction rebuilds missing parts |
| Examples | EAN-13, UPC-A, Code 128, ITF-14 | QR Code, Data Matrix, PDF417, Aztec |
Types of barcodes on products
Shop products use the GS1 retail family: EAN-13 and EAN-8 in Europe and much of the world, UPC-A and UPC-E in the US and Canada. The digits are the product's GTIN (Global Trade Item Number), assigned through a GS1 member organisation. GS1 maintains the standard.
Books: ISBN barcodes
A book's barcode is an EAN-13 whose number is the ISBN-13, starting with 978 or 979. A smaller add-on block next to it can carry the price in some markets.
The check digit
The last digit of an EAN or UPC is a check digit worked out from the others, so a misread is caught at the till. For EAN-13, multiply the first 12 digits alternately by 1 and 3, add them up, and take the amount needed to reach the next multiple of 10.
| Step | Example: 501234567890? |
|---|---|
| Digits × weights (1, 3, 1, 3 ...) | 5, 0, 1, 6, 3, 12, 5, 18, 7, 24, 9, 0 |
| Sum | 90 |
| Next multiple of 10 | 90 |
| Check digit | 90 − 90 = 0, so the full number is 5012345678900 |
GS1 has an official check digit calculator if you want to test a number.
Barcodes in shipping and warehouses
Cartons and pallets use different codes from the shelf-edge product:
- ITF-14 encodes a 14-digit GTIN for a case of products. It prints well on corrugated cardboard, which is why you see it with a thick frame (the bearer bar) on outer boxes.
- GS1-128 is Code 128 with GS1 Application Identifiers: short numbers in brackets that say what each part of the barcode means, such as (00) for a pallet's shipping code or (17) for an expiry date. Our guide to GS1 Application Identifiers lists the common ones.
- Plain Code 128 is used for carrier tracking numbers and internal labels where no GS1 structure is needed.
Barcodes in industry, healthcare and travel
- Code 39 is an older linear code that needs no check digit and is easy to print, which keeps it in use for asset tags, ID badges and parts labels.
- Data Matrix fits a lot of data into a few millimetres and can be etched or dot-peened onto metal, so manufacturers use it for marking parts.
- GS1 DataMatrix is Data Matrix carrying GS1 fields. Medicine packs in many countries carry one with the product number, batch, expiry date and a serial number for each pack.
- PDF417 is a stacked code that holds long records, which is why it appears on driving licences, ID cards and boarding passes.
- Aztec has a bullseye in the centre and reads well from phone screens, so rail and air operators use it on mobile tickets.
- Codabar is an older numeric code still found on library books, courier waybills and blood bags.
Which barcode type should you use?
| You need to | Use |
|---|---|
| Sell a product through shops | EAN-13 or UPC-A with a GTIN from GS1 |
| Label your own stock or equipment | Code 128 or Code 39 |
| Mark outer cartons for a retailer | ITF-14 or GS1-128, as the retailer specifies |
| Share a link, contact or Wi-Fi details | QR Code |
| Mark very small parts | Data Matrix |
For anything that will pass through a retailer or distributor, check their supplier requirements first. They usually specify the barcode type, the size and where on the pack it goes.
Read any of these barcodes with one scanner
Havelt QR shows which format it found, sorts scans into categories and lets you filter your history by format, so a stocktake or a pile of parcels stays easy to look back through.
Get it on Google PlayiPhone version coming soon
More guides
- How to Make a Wi-Fi QR Code Guests Can Scan to JoinMake a Wi-Fi QR code from your network name, password and security type. What the code contains, how to print it, guest networks, and why it stops working.
- How to Scan a QR Code From an Image or ScreenshotScan a QR code that is already on your phone, from a screenshot or a photo in your gallery. Android steps, fixes for codes that will not read, and safety checks.
- vCard QR Code: Put Your Contact Details on a Business CardHow a vCard QR code works, which fields to include, how to make one for a business card, size and printing tips, and vCard vs MeCard vs a link to a profile page.
- GS1 Application Identifiers: List of Common AIs and How to Read ThemWhat GS1 Application Identifiers are, a list of the common AIs (00, 01, 10, 17, 21 and more), how to read a GS1-128 label, date formats and the FNC1 separator.
Published by Zoranta, the developer of Havelt QR.