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
| Feature | PDF417 | QR Code |
|---|---|---|
| Year introduced | 1991 | 1994 |
| Shape | Rectangular (wide, short) | Square |
| Type | Stacked linear (rows of bar patterns) | Matrix (grid of modules) |
| Max data (numeric) | 2,710 characters | 7,089 characters |
| Max data (alphanumeric) | 1,850 characters | 4,296 characters |
| Max data (binary) | 1,108 bytes | 2,953 bytes |
| Error correction | 0-64 data codewords (9 levels) | 7-30% (4 levels) |
| Phone camera scanning | Requires app or Google Lens | Built-in on all modern phones |
| Omnidirectional scanning | No (must be roughly horizontal) | Yes (any rotation) |
| ISO standard | ISO 15438 | ISO/IEC 18004 |
| Primary use | Government IDs, transport, logistics | Consumer 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 Type | PDF417 | QR Code |
|---|---|---|
| Numeric | 2,710 | 7,089 |
| Alphanumeric | 1,850 | 4,296 |
| Binary | 1,108 bytes | 2,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 Feature | QR Code | PDF417 |
|---|---|---|
| iPhone Camera app | Scans automatically (iOS 11+) | No recognition |
| Android Camera app | Scans automatically (most phones) | No recognition |
| Google Lens | Yes | Yes |
| Web scanner (barcodescanner.online) | Yes | Yes |
| Dedicated scanner apps | Yes | Yes |
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:
| Level | Error Correction Codewords | Recovery Capability |
|---|---|---|
| 0 | 2 | Minimal |
| 1 | 4 | Low |
| 2 | 8 | Low-moderate |
| 3 | 16 | Moderate |
| 4 | 32 | Good |
| 5 | 64 | Strong |
| 6 | 128 | Very strong |
| 7 | 256 | Excellent |
| 8 | 512 | Maximum |
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:
| Level | Recovery | Typical Use |
|---|---|---|
| L | 7% | Maximum data capacity |
| M | 15% | Default for most uses |
| Q | 25% | Moderate damage expected |
| H | 30% | 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
- Restaurant menus
- WiFi sharing
- Marketing and promotions
- Product information and reviews
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
- GS1 QR codes — product identification and digital links
- Part of the GS1 Sunrise 2027 initiative
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
| Format | Approximate 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:
- Finder patterns provide instant detection and orientation
- Matrix decoding is computationally straightforward
- Camera autofocus targets the finder patterns efficiently
PDF417 requires more processing because:
- The scanner must identify individual rows and their sequence
- Row identification depends on detecting start/stop patterns per row
- 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:
- PDF417 Generator — enter text, download as SVG or PNG
- QR Code Generator — enter any text or URL
For more on format selection and output options, see our free barcode generator guide.
Related Guides
- PDF417 Complete Guide — full technical reference for PDF417
- QR Code Complete Guide — full QR code technical reference
- QR Code vs Data Matrix — comparing the two matrix-format 2D barcodes
- 1D vs 2D Barcodes — comparing linear and matrix barcode types
- Barcode vs QR Code — traditional barcodes vs QR codes
- Choosing the Right Barcode Type — decision guide across all formats