PDF417 vs QR Code: Which 2D Barcode Format Do You Need?

Compare PDF417 and QR codes in data capacity, scanning, size, and use cases. Learn when to use each 2D barcode format for IDs, tickets, logistics, and more.

PDF417 and QR codes are both 2D barcodes — they encode data in two dimensions rather than the single horizontal line of traditional barcodes. But they look nothing alike and they serve different purposes. PDF417 is the wide, rectangular barcode on the back of your driver's license. QR code is the square pattern on a restaurant menu. They encode similar data types but are built for entirely different scanning environments.

Quick Comparison

FeaturePDF417QR Code
Year introduced19911994
ShapeRectangular (wide, short)Square
TypeStacked linear (rows of bar patterns)Matrix (grid of modules)
Max data (numeric)2,710 characters7,089 characters
Max data (alphanumeric)1,850 characters4,296 characters
Max data (binary)1,108 bytes2,953 bytes
Error correction0-64 data codewords (9 levels)7-30% (4 levels)
Phone camera scanningRequires app or Google LensBuilt-in on all modern phones
Omnidirectional scanningNo (must be roughly horizontal)Yes (any rotation)
ISO standardISO 15438ISO/IEC 18004
Primary useGovernment IDs, transport, logisticsConsumer scanning, marketing, payments

Structure: Stacked vs. Matrix

The fundamental architectural difference explains most of the practical differences between these formats.

PDF417: Stacked Rows of Linear Barcodes

PDF417 stacks multiple rows of bar-and-space patterns vertically. Each row is essentially a miniature linear barcode. The name "PDF417" describes its structure: Portable Data File with 4 bars and spaces in 17 modules per codeword.

The rectangular shape means:

  • Scans in one direction — the scanner reads rows from top to bottom, then decodes horizontally within each row
  • Works with linear scanners — PDF417 can be read by 1D linear scanners (swiping across the barcode), not just 2D imagers
  • Aspect ratio is flexible — you can make PDF417 barcodes wider and shorter, or narrower and taller, depending on available space

QR Code: Square Grid of Modules

QR code arranges data in a 2D grid of square modules (black and white squares). Three large finder patterns in the corners provide instant orientation.

The square shape means:

  • Scans from any angle — the finder patterns let scanners detect and orient the code regardless of rotation
  • Requires a 2D imager — linear scanners cannot read QR codes
  • Fixed aspect ratio — always square

Data Capacity

QR code holds more total data, but both formats hold more than enough for their typical use cases:

Data TypePDF417QR Code
Numeric2,7107,089
Alphanumeric1,8504,296
Binary1,108 bytes2,953 bytes

When Capacity Matters

Driver's licenses typically encode 300-600 characters of structured data (name, address, dates, license class, restrictions, endorsements). Both formats handle this easily.

Boarding passes encode flight information in about 100-200 characters. Both formats handle this easily.

URLs for marketing are typically 50-150 characters. Both formats handle this easily.

In practice, capacity is almost never the deciding factor. You'd need to encode a short novel before hitting either format's limits.

Macro PDF417: Linked Symbols

PDF417 supports "macro" mode — spreading data across multiple linked PDF417 symbols that a scanner reassembles into one dataset. This theoretically allows unlimited data by chaining symbols. QR code has a similar feature (structured append, linking up to 16 symbols) but it's rarely used.

Phone Scanning: QR Code's Decisive Advantage

This is the most important practical difference:

Phone FeatureQR CodePDF417
iPhone Camera appScans automatically (iOS 11+)No recognition
Android Camera appScans automatically (most phones)No recognition
Google LensYesYes
Web scanner (barcodescanner.online)YesYes
Dedicated scanner appsYesYes

When a consumer needs to scan a barcode with their phone, QR code works instantly. PDF417 requires an extra step — opening a scanner app or Google Lens. This friction makes PDF417 unsuitable for consumer-facing applications where quick scanning is expected.

For institutional use — law enforcement scanning a driver's license, TSA scanning a boarding pass, a warehouse scanner reading a shipping document — dedicated scanning equipment reads both formats equally well.

Error Correction

PDF417's Approach

PDF417 offers 9 error correction levels (0 through 8). Each level adds error correction codewords:

LevelError Correction CodewordsRecovery Capability
02Minimal
14Low
28Low-moderate
316Moderate
432Good
564Strong
6128Very strong
7256Excellent
8512Maximum

Higher levels increase barcode size but allow recovery from more severe damage. Level 5 is recommended for most applications.

QR Code's Approach

QR code offers 4 error correction levels:

LevelRecoveryTypical Use
L7%Maximum data capacity
M15%Default for most uses
Q25%Moderate damage expected
H30%Harsh environments, logo overlays

Both approaches use Reed-Solomon error correction. PDF417's finer granularity (9 levels vs. 4) gives you more control, but QR code's simpler 4-level system covers the practical range adequately.

Use Cases: Where Each Format Dominates

PDF417 Domain

Government Identification

  • US and Canadian driver's licenses (AAMVA standard)
  • US military ID cards
  • Some national ID cards

The AAMVA (American Association of Motor Vehicle Administrators) standardized PDF417 for driver's licenses across all US states and Canadian provinces. The barcode on the back of your license encodes your name, address, date of birth, license number, restrictions, and more in a structured format that law enforcement and age-verification systems scan.

Transportation

  • IATA boarding passes (Bar Coded Boarding Pass standard)
  • Many paper boarding passes use PDF417 (mobile boarding passes have shifted to QR or Aztec)

Shipping and Logistics

  • US Postal Service (used alongside other barcodes on shipping labels)
  • Some carrier-specific applications

QR Code Domain

Consumer Interaction

Payments

  • WeChat Pay, Alipay (dominant in China)
  • PayPay (Japan)
  • UPI QR (India)
  • Many banking and fintech apps

Authentication

  • Two-factor authentication (TOTP setup)
  • Login confirmation
  • Ticket validation

Retail and Supply Chain

Where Either Could Work

  • Event tickets: QR codes have largely won this space due to phone scanning
  • Document linking: QR codes are more practical for linking to URLs
  • Shipping documents: PDF417 is used on some; QR codes are appearing on others
  • Inventory labels: Code 128 or Data Matrix are more common choices for inventory

Physical Size and Shape

PDF417's rectangular shape is sometimes an advantage, sometimes a limitation:

Advantage: On card-format documents (driver's licenses, ID cards, boarding passes), a wide, short barcode fits better than a square one. The back of a driver's license has limited vertical space — PDF417's wide rectangle fits the available area more efficiently than a QR code square.

Limitation: On product packaging, posters, and labels, the square QR code integrates more naturally into most layouts. A PDF417's wide rectangle needs more horizontal space.

Size Comparison for 200 Characters of Data

FormatApproximate Dimensions
PDF417 (standard aspect ratio)~50mm × 15mm
QR Code (Level M error correction)~30mm × 30mm

PDF417 is wider but shorter. QR code uses roughly the same total area but in a square footprint.

Scanning Speed and Reliability

QR code scans faster from a phone camera because:

  1. Finder patterns provide instant detection and orientation
  2. Matrix decoding is computationally straightforward
  3. Camera autofocus targets the finder patterns efficiently

PDF417 requires more processing because:

  1. The scanner must identify individual rows and their sequence
  2. Row identification depends on detecting start/stop patterns per row
  3. Physical misalignment (tilting the card) can cause row-reading errors

In practice, both formats decode in well under a second with modern hardware. The speed difference is noticeable on older phones or in poor lighting conditions, where QR code's design gives it a clear advantage.

Future Outlook

QR codes are expanding their role in retail through the GS1 Sunrise 2027 initiative, which enables QR codes on product packaging carrying GS1 Digital Link URLs. This blurs the line between consumer scanning and supply chain identification.

PDF417 remains entrenched in government ID because switching requires coordinating across thousands of agencies, law enforcement systems, and verification devices. The AAMVA standard isn't changing anytime soon.

For new applications without a mandated standard, QR code is the default choice due to universal phone compatibility.

Generating Barcodes

Create barcodes in either format with our free generators:

For more on format selection and output options, see our free barcode generator guide.

9 min read

Frequently Asked Questions

What's the main difference between PDF417 and QR code?
PDF417 is a stacked linear barcode — rectangular, reads in one direction, and holds up to 2,710 characters. QR code is a matrix barcode — square, reads in two dimensions, and holds up to 4,296 characters. PDF417 excels at structured data on documents (IDs, licenses). QR code excels at consumer scanning and quick data access.
Can phones scan PDF417 barcodes?
Yes, but not with the built-in camera app on most phones. iPhones and Androids scan QR codes automatically with the camera, but PDF417 requires a dedicated scanner app, Google Lens, or a web-based scanner like barcodescanner.online. This is why QR codes dominate in consumer-facing applications.
Why do driver's licenses use PDF417 instead of QR codes?
PDF417 was standardized for US and Canadian driver's licenses (AAMVA standard) before QR codes gained widespread adoption. PDF417's rectangular shape fits well on card-format IDs, and it encodes the structured data fields (name, address, license class, restrictions) that government systems require. Switching to QR would require updating millions of scanners across law enforcement and retail.
Which holds more data, PDF417 or QR code?
QR code holds more overall data — up to 7,089 numeric characters versus PDF417's 2,710. However, PDF417 can be extended across multiple linked symbols (macro PDF417) for even larger datasets. For typical use cases (under 500 characters), both formats handle the data comfortably.
Can I use PDF417 for marketing like QR codes?
Technically yes, but practically no. PDF417's rectangular shape is less recognizable, it doesn't scan with phone cameras natively, and consumers don't know what it is. For any consumer-facing scanning (URLs, promotions, payments, WiFi), QR code is the only practical choice.