ZorantaGuides
Havelt QR

Havelt QR › Guides

Types of Barcodes: 1D and 2D Codes and What Each Is Used For

Barcodes come in two families. Linear (1D) barcodes store data in the widths of bars and spaces and are read along one line; EAN-13, UPC-A, Code 128, Code 39, ITF and Codabar are linear. 2D barcodes store data in a grid of squares or dots and hold much more; QR Code, Data Matrix, PDF417 and Aztec are 2D.

Which type you see depends on the job: shop products carry EAN or UPC, shipping cartons ITF-14 or GS1-128, medicines GS1 DataMatrix, tickets Aztec or PDF417. The tables below list each type, what it can hold and where it is used.

A product box and a book with stripe barcodes, a phone above them

Types of barcodes at a glance

BarcodeFamilyWhat it holdsTypical use
EAN-131D13 digitsRetail products outside North America; books as ISBN
EAN-81D8 digitsSmall packs with little room for a label
UPC-A1D12 digitsRetail products in the US and Canada
UPC-E1DUPC-A compressed to 6 digits (plus number system and check digit)Small items such as cans and confectionery
Code 1281DLetters, digits and symbols, compactShipping, logistics, internal labels
GS1-1281DCode 128 carrying GS1 data fieldsShipping labels, pallets, cases
Code 391DUpper-case letters, digits, a few symbolsIndustry, asset tags, ID badges
Code 931DSame characters as Code 39 in less spaceIndustry and logistics
ITF / ITF-141DDigits only, in pairsOuter cartons and corrugated boxes
Codabar1DDigits and a few symbolsLibrary books, courier waybills, blood bags
QR Code2DText, web addresses, contact cards, Wi-Fi detailsMarketing, payments, menus, tickets
Data Matrix2DText and numbers in a very small squareParts marking, electronics
GS1 DataMatrix2DProduct number, batch, expiry, serialMedicines and medical devices
PDF4172D (stacked)Long records in a rectangleDriving licences, ID cards, boarding passes
Aztec2DText, readable on screensRail and air tickets
Havelt QR

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 barcodes2D barcodes
DataA short number or codeUp to thousands of characters
ShapeWide strip of barsSquare or rectangle
ReaderLaser scanners or camerasCameras and imaging scanners
DamageA torn bar can stop it readingError correction rebuilds missing parts
ExamplesEAN-13, UPC-A, Code 128, ITF-14QR 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.

StepExample: 501234567890?
Digits × weights (1, 3, 1, 3 ...)5, 0, 1, 6, 3, 12, 5, 18, 7, 24, 9, 0
Sum90
Next multiple of 1090
Check digit90 − 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:

Barcodes in industry, healthcare and travel

Which barcode type should you use?

You need toUse
Sell a product through shopsEAN-13 or UPC-A with a GTIN from GS1
Label your own stock or equipmentCode 128 or Code 39
Mark outer cartons for a retailerITF-14 or GS1-128, as the retailer specifies
Share a link, contact or Wi-Fi detailsQR Code
Mark very small partsData 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.

Havelt QR

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 Play

iPhone version coming soon

More guides

All guides

Sources

Published by Zoranta, the developer of Havelt QR.