PDF417 vs Data Matrix vs QR: Picking a 2D Symbology

A practical three-way comparison of the 2D codes that matter - capacity, scan hardware, use cases, and how to actually choose.

Three 2D codes dominate the real world: PDF417, Data Matrix, and QR Code. They solve different problems. Pick the wrong one and your label doesn't scan, doesn't fit, or doesn't comply with whatever regulation you're actually trying to satisfy. Here's how I'd decide.

We already wrote a head-to-head on QR vs Data Matrix; this piece adds PDF417 to the conversation, which is the one people forget exists until they hit a driver license or a boarding pass.

The one-second summary

Use casePick
Driver license, state ID, boarding passPDF417 (the spec requires it)
Small industrial part marking (DPM)Data Matrix
Pharma unit serialization, FDA UDIData Matrix (GS1 DataMatrix)
Menu, poster, payment, Wi-Fi, consumerQR Code
Laser-only scanner fleet, 1 KB+ payloadPDF417
Label carrying 2+ KB of dataQR Code (only one that actually fits)

Capacity

Maximum payload per spec, biggest version, lowest practical ECC:

SymbologyMax numericMax alphanumericMax binary bytes
PDF4172,7101,8501,108
Data Matrix (ECC200)3,1162,3351,555
QR Code (V40, ECC-L)7,0894,2962,953

QR wins the ceiling. Data Matrix wins per-square-millimeter at small sizes. PDF417 wins nothing on capacity - its advantage is elsewhere.

PDF417 is different and that's the whole point

PDF417 isn't really a 2D matrix - it's a stacked linear code. Rows of tall narrow bars, row indicators on the sides. A 1D laser scanner can sweep across it, read each row, and reassemble the payload. Neither Data Matrix nor QR can do that; both require a 2D imager (a camera).

That's why PDF417 ended up on driver licenses, boarding passes, and shipping labels decades ago: the existing laser scanner fleet could read it without new hardware. In 2026, basically everything has a camera now, which is why you rarely see new PDF417 deployments - but the installed base is massive and regulated, so it's not going anywhere.

Where each one really lives

PDF417: AAMVA driver license and state ID standard (Annex D - required, not optional). IATA Resolution 792 boarding passes (BCBP). FedEx, USPS, and shipping labels. VIN plates in some jurisdictions.

Data Matrix: Direct part marking on machined metal (MIL-STD-130 on military parts). FDA Unique Device Identification on medical devices. Pharma unit serialization under DSCSA (US) and FMD (EU) - specifically GS1 DataMatrix. USPS postage indicia. Small electronics.

QR Code: Consumer marketing, mobile payments (Alipay, WeChat, UPI), menus, ticketing, Wi-Fi provisioning, vCard sharing, GS1 Digital Link. If a phone camera is the scanner, use QR.

Error correction, briefly

  • QR: four user-selectable levels - L (7%), M (15%), Q (25%), H (30%). Tune per use case. Logo overlays need H.
  • Data Matrix (ECC200): fixed ~30-33%. No user knob. This is why it survives dot-peen and scuffed metal.
  • PDF417: nine levels (0-8), each doubling ECC. Level 2 for short payloads, level 5 for hundreds of codewords. Higher levels eat capacity fast.

Size at the same payload

Encode 100 ASCII characters and print all three at the same module size:

  • Data Matrix is smallest - roughly 22x22 or 24x24 cells, often under 10 mm square at 10 mil.
  • QR is ~25-35% larger than Data Matrix for the same payload because finder patterns and quiet zones eat area.
  • PDF417 is noticeably wider because rows must stay tall enough for a laser sweep to hit each one cleanly.

If real estate is the constraint, Data Matrix wins. If user-friendliness is the constraint, QR wins. If the scanner fleet is laser, PDF417 wins.

How to actually pick

  1. Is there a standard or regulator telling you what to use? AAMVA = PDF417. FDA UDI = Data Matrix. DSCSA = GS1 DataMatrix. EMVCo merchant-presented payments = QR. Stop choosing.
  2. What reads it? Smartphone camera only = QR. Industrial imager = Data Matrix or QR. Laser fleet = PDF417 (it's the only option).
  3. How much data, how small? <50 chars on a small part = Data Matrix. 500+ chars on a document = PDF417 or QR. 2 KB+ = QR (only one that fits).
  4. Who's holding it? Consumer with a phone = QR. Warehouse worker with a ring scanner = whatever the standard says.

Generate them here: PDF417, Data Matrix, QR Code. Batch versions: PDF417 batch, Data Matrix batch, QR batch. And if you're putting a QR code on anything printed small, read our QR code size guide before you spec the artwork.