PDF417 vs Data Matrix vs QR: Picking a 2D Symbology
A practical three-way comparison of PDF417, Data Matrix and QR, covering capacity, scan hardware, use cases, and how to choose.
PDF417, Data Matrix and QR Code are the three 2D codes you will meet in practice, and they solve different problems. Pick the wrong one and the label does not scan, does not fit, or does not satisfy the regulation you are trying to meet. Here is how I would decide.
We already wrote a head-to-head on QR vs Data Matrix. This piece adds PDF417, the one people forget exists until they look at a driver licence or a boarding pass.
The one-second summary
| Use case | Pick |
|---|---|
| Driver license, state ID, boarding pass | PDF417 (the spec requires it) |
| Small industrial part marking (DPM) | Data Matrix |
| Pharma unit serialization (DSCSA, EU FMD) | Data Matrix (GS1 DataMatrix) |
| FDA UDI on medical devices | Data Matrix is the common choice, and linear carriers are allowed |
| Menu, poster, payment, Wi-Fi, consumer | QR Code |
| Laser-only scanner fleet, 1 KB+ payload | PDF417 |
| Label carrying 2+ KB of data | QR Code (the only one that fits) |
Capacity
These are the maximum payloads per spec, at the largest version and the lowest practical error correction.
| Symbology | Max numeric | Max alphanumeric | Max binary bytes |
|---|---|---|---|
| PDF417 | 2,710 | 1,850 | 1,108 |
| Data Matrix (ECC200) | 3,116 | 2,335 | 1,556 |
| QR Code (V40, ECC-L) | 7,089 | 4,296 | 2,953 |
QR has the highest ceiling. Data Matrix packs the most data per square millimetre at small sizes. PDF417's advantage is in what can read it, which is the next section.
PDF417 reads on a laser scanner
PDF417 is a stacked linear code. It is built from rows of tall narrow bars with row indicators at the sides. A 1D laser scanner sweeps across it, reads each row, and reassembles the payload. Data Matrix and QR both need a 2D imager, meaning a camera.
That is why PDF417 ended up on driver licences, boarding passes and shipping labels decades ago. The laser scanner fleet already in place could read it with no new hardware. Most scanners sold today have a camera, so what keeps PDF417 in use is its installed base and the regulations written around it.
Where each one is used
PDF417 is the AAMVA driver licence and state ID standard (Annex D, required). It is the IATA Resolution 792 boarding pass (BCBP). FedEx shipping labels use it, and it was one of the formats for USPS postage indicia.
Data Matrix is used for direct part marking on machined metal (MIL-STD-130 on military parts) and for FDA Unique Device Identification on medical devices. Pharma unit serialisation under DSCSA in the US and FMD in the EU uses it too, specifically GS1 DataMatrix. So do USPS postage indicia and small electronics.
QR Code is used for consumer marketing, mobile payments (Alipay, WeChat, UPI), menus, ticketing, Wi-Fi provisioning, vCard sharing and GS1 Digital Link. If a phone camera is the scanner, use QR.
Error correction
- QR has four levels you choose from, L (7%), M (15%), Q (25%) and H (30%). Tune it per use case, and use H under a logo overlay.
- Data Matrix (ECC200) is fixed at roughly 30-33% with no user setting, which is why it survives dot-peen marking and scuffed metal.
- PDF417 has nine levels (0-8), each doubling the correction data. AIM recommends level 2 as a minimum, and higher levels use up capacity fast.
Size at the same payload
Encode 100 ASCII characters and print all three at the same module size.
- Data Matrix is the smallest, a 36x36 symbol, under 10 mm square at 10 mil.
- QR needs about the same module count (37x37 at level L), but its 4-module quiet zone against Data Matrix's 1 makes the printed area roughly 40% larger.
- PDF417 is noticeably wider, because each row has to stay tall enough for a laser sweep to hit it cleanly.
If space is the constraint, Data Matrix wins. If the reader is a member of the public with a phone, QR wins. If the scanner fleet is laser, PDF417 wins.
How to pick
- Is a standard or regulator telling you what to use? AAMVA means PDF417. FDA UDI accepts GS1, HIBCC or ICCBBA carriers, linear or Data Matrix. DSCSA means GS1 DataMatrix. EMVCo merchant-presented payments mean QR. The choice is made for you.
- What reads it? If the only reader is a smartphone camera, use QR. An industrial imager reads Data Matrix or QR. A laser fleet reads PDF417 and nothing else.
- How much data, how small? Under 50 characters on a small part, use Data Matrix. 500 or more characters on a document, use PDF417 or QR. 2 KB or more, use QR, the only one that fits.
- Who is holding it? A consumer with a phone gets QR. A warehouse worker with a ring scanner gets whatever the standard says.
Generate them with the PDF417, Data Matrix and QR Code generators, or in bulk with PDF417 batch, Data Matrix batch and QR batch. If the QR code is going on anything printed small, read our QR code size guide before you spec the artwork.