Barcode types explained
There are dozens of barcode types, or symbologies, and you will realistically use four of them. This page covers what each one encodes, how long it can be, whether it needs a check digit, and the job it is actually meant for.
The two families
Every barcode is either linear or 2D, and the split matters more than any individual symbology.
Linear codes, sometimes called 1D, store data in the varying width of vertical bars. A laser scanner reads them by sweeping a line across. They are compact, cheap to print, and read reliably at speed, which is why retail checkout still runs on them. The tradeoff is capacity: a UPC-A holds twelve digits and nothing else.
2D codes store data in a grid of modules read in both directions, so they need an imager rather than a laser. They hold far more, survive damage through built-in error correction, and can be read at any rotation. Data Matrix, PDF417, Aztec and QR are all 2D codes.
Linear symbologies
Code 128
The workhorse, and the one with its own Code 128 generator here. Encodes the full ASCII set, which means letters, digits and punctuation, at a high density. Variable length. Its check character is modulo 103, calculated by the encoder and never typed by you. If you are labelling your own stock and nobody outside your business needs to read it, this is almost always the right answer.
Code 39
Older and less dense than Code 128, and available in the Code 39 generator. Encodes digits, capital letters A to Z, and a small set of symbols: hyphen, period, dollar, slash, plus, percent, and space. Its check character is modulo 43 and optional. It survives because a lot of legacy scanners and government systems still expect it. Note that some scanners refuse Code 39 values shorter than four characters by default.
Code 93
A denser rework of Code 39 with the same practical character set. Less common, but useful when Code 39 is required and space is tight.
UPC-A and UPC-E
Retail checkout in the United States and Canada, made with the UPC-A generator. UPC-A is exactly twelve digits with a required modulo 10 check digit. UPC-E compresses that to eight digits for packages too small for the full symbol. Numeric only, no letters.
EAN-13 and EAN-8
The same system used internationally. EAN-13 is thirteen digits, EAN-8 is eight, both with a required modulo 10 check digit. UPC-A is effectively an EAN-13 with a leading zero, which is why modern scanners read both.
ITF-14
Shipping cartons and cases, with a dedicated ITF-14 generator that applies the fixed height for you. Exactly fourteen digits, always an even count, because Interleaved 2 of 5 encodes digits in pairs. Required modulo 10 check digit. Usually printed with a thick surrounding bearer bar, which protects the symbol on corrugated cardboard.
GS1-128
Code 128 with structure, and available in bulk through the batch generator when a whole run is needed. Application Identifiers mark up what each part of the data means, so one symbol can carry a GTIN, a batch number, an expiry date and a serial number, each labelled. Capped at 48 data characters and 165.10mm of physical length including quiet zones. This is what logistics labels use.
Codabar
Old, low density, still found in libraries and blood banks. Starts and stops with a letter A to D, with digits and a few symbols between.
ISBN
Not a separate symbology. An ISBN barcode is an EAN-13 whose number begins with the 978 or 979 publishing prefix, often printed with a five-digit price add-on beside it.
2D symbologies
Data Matrix
A dense square or rectangle, made here with the Data Matrix generator, readable when small and when partly damaged, thanks to Reed-Solomon error correction. Standard in electronics, aerospace and healthcare, where the part is too small for a linear code. GS1 DataMatrix is the same symbol carrying GS1 Application Identifier data.
PDF417
A stacked code that holds a lot of text, which is why it appears on driving licences, boarding passes and shipping documents. Wider than it is tall, with selectable error correction levels.
Aztec
Recognisable by the bullseye at its centre. Needs no blank margin around it, which makes it useful on tickets and passes where space is tight.
QR Code
The most widely scanned 2D code, because every phone camera reads one without an app. The QR code generator makes static ones that cannot expire. Because a QR code hides its destination until it is scanned, it is also the symbology most worth understanding the tampering risks around. Holds URLs, text, Wi-Fi credentials and contact data.
Choosing one
Work backwards from who has to read it.
Which symbology do you need?
Two questions, based on the rule below: work backwards from who has to read it.
Who scans this code?
- A retailer or marketplace scans it. UPC-A in North America, EAN-13 elsewhere, and the number must be registered with GS1.
- Only your own systems scan it. Code 128. Accepts letters, compact, no registration.
- It goes on a shipping carton. ITF-14 for the carton identifier, GS1-128 if you also need batch or expiry on the label.
- The part is tiny. Data Matrix.
- A phone camera scans it. QR.
One term worth clearing up: there is no such thing as a 3D barcode in the GS1 standards. People searching for one usually mean a 2D code, or a code physically embossed into a part, which is a marking method rather than a symbology.
Sizing and printing
The symbology decides what the code can hold. The printing decides whether it scans. Three figures matter, and they come from the GS1 General Specifications.
| Symbology | X-dimension, min / rec / max (mm) | Height, min / rec / max (mm) | Quiet zone |
|---|---|---|---|
| EAN-8 | 0.264 / 0.330 / 0.660 | 14.58 / 18.23 / 36.46 | 7X both sides |
| EAN-13, consumer item | 0.264 / 0.330 / 0.660 | 18.28 / 22.85 / 45.70 | 11X left, 7X right |
| EAN-13, outer packaging | 0.495 / 0.660 / 0.660 | 34.28 / 45.70 / 45.70 | 11X left, 7X right |
| UPC-A | 0.264 / 0.330 / 0.660 | 18.28 / 22.85 / 45.70 | 9X both sides |
| ITF-14 | 0.495 / 0.495 / 1.016 | 31.75 fixed | 10X both sides |
| GS1-128 | 0.495 / 0.495 / 1.016 | 31.75 / 31.75 / 33.75 | 10X both sides |
When a printed code refuses to scan, the causes are almost always physical rather than in the barcode file. Export vector where you can. An SVG stays sharp at any size, while a PNG scaled up on a label template goes soft at exactly the edges a scanner needs to read. And test scan a printed sample before a production run, because a code that renders correctly can still fail on a low-contrast printer or a curved surface.
Sources
Every specification figure on this page traces to one of the following. Nothing is stated here that could not be checked against them.
- GS1 General Specifications size limits, as published by GS1
- ISO/IEC 15417, Code 128
- ISO/IEC 16388, Code 39
- ISO/IEC 16022, Data Matrix
- GS1 General Specifications, GS1-128 data and physical length limits
Last reviewed 6 September 2026
This reference is written and maintained by Cedrick Reese at Ready Utilities. Character sets, lengths and check digit schemes are taken from the ISO/IEC symbology specifications that define each barcode type, and the size table reproduces the limits published in the GS1 General Specifications. Both are rechecked against the current published versions whenever this page is revised, since GS1 updates its general specification annually. Where a figure could not be verified against a primary source it is not listed here at all.
Common questions
What is the difference between a barcode and a QR code?
A traditional barcode is linear, meaning it stores data in the width of vertical bars and is read across one dimension. A QR code is a matrix, storing data in two dimensions, which lets it hold far more and be read at any rotation. QR codes are one kind of 2D barcode alongside Data Matrix, PDF417 and Aztec.
Which barcode type holds letters as well as numbers?
Code 128 encodes the full ASCII set and is the usual choice. Code 39 and Code 93 handle digits and capital letters with a few symbols. UPC, EAN and ITF-14 are numeric only.
Do I need a different barcode for retail than for internal stock?
Yes. Retail checkout expects UPC-A or EAN-13 carrying a GS1-registered number. Internal stock, bin locations and asset tags have no registration requirement, so Code 128 is normally the better fit because it is compact and accepts letters.
Is there a 3D barcode?
No. There is no 3D barcode in the GS1 standards. People searching for one usually mean a 2D code such as Data Matrix or QR, or occasionally a code physically embossed or etched into a part, which is a marking method rather than a separate symbology.