The 1D vs 2D split
One-dimensional (linear) barcodes encode data along a single axis, as alternating bars and spaces. They are simple, cheap to print, and can be read by laser scanners — but they carry very little data, typically under 50 characters.
Two-dimensional barcodes pack data into a grid of modules, which dramatically increases capacity and adds built-in error correction. They require a camera-based scanner, which is now universal. Almost every ticket issued today is 2D.
QR Code
The default for mobile tickets, marketing, and general events. Invented by Denso Wave in 1994 and standardised as ISO/IEC 18004.
- Capacity: up to ~4,200 alphanumeric characters at the largest size and lowest error correction.
- Error correction: four levels (L, M, Q, H) that can recover from 7%, 15%, 25% and 30% damage respectively.
- Strengths: universally scannable, readable at any rotation, robust to damage.
- Weaknesses: large surface area for the same data compared to Data Matrix; can be mistaken for advertising QR codes.
PDF417
A stacked linear format, meaning it is composed of multiple linear rows stacked vertically. Defined in ISO/IEC 15438. You see it most often on airline boarding passes, where it carries the IATA Bar-Coded Boarding Pass (BCBP) payload.
- Capacity: up to ~1,800 characters.
- Error correction: nine levels, configurable by row.
- Strengths: elongated shape fits naturally on a boarding-pass strip; legacy scanner support in airports is excellent.
- Weaknesses: larger than square 2D formats for the same payload; orientation-sensitive.
Aztec
A matrix format with a square bullseye finder in the centre. Standardised as ISO/IEC 24778. Heavily used by rail and transit operators, and by some airlines on phone-displayed boarding passes.
- Capacity: up to ~3,000 characters.
- Error correction: configurable from 5% to 95% of codeword capacity.
- Strengths: no quiet zone required (the finder pattern is unambiguous), so it works in cramped layouts like transit passes.
- Weaknesses: less broadly supported than QR in consumer apps.
Data Matrix
A compact matrix format standardised as ISO/IEC 16022. Rare on consumer tickets, but common on small-format labels, postal items, and industrial tickets where print area is scarce.
- Capacity: up to ~2,300 characters.
- Error correction: fixed Reed–Solomon, very resilient.
- Strengths: densest of the common 2D formats — a payload that needs a 20 mm QR can fit in a 12 mm Data Matrix.
- Weaknesses: not every phone camera app recognises it without a dedicated scanner.
Code 128
The workhorse 1D format, standardised as ISO/IEC 15417. Still used on paper ticket stock, wristbands, and parking stubs — anywhere that a numeric or short alphanumeric ID is enough.
- Capacity: typically under 48 characters in practice.
- Error correction: none intrinsically; relies on scanner retries.
- Strengths: scannable by every laser and imager ever built, easy to print at small sizes.
- Weaknesses: trivially damaged, no capacity for signed payloads, narrow range of content.
How to pick one, if you are issuing
- If you need broad compatibility and your buyers will use a mix of wallet apps, screenshots and printed PDFs — use QR.
- If you are bound by airline interoperability rules — use PDF417 with the IATA BCBP payload.
- If you are printing on a narrow transit ticket — use Aztec.
- If you are printing on an industrial label where space is the hardest constraint — use Data Matrix.
- If all you need to store is a short ID and print is cheap — Code 128 is still defensible.