ID Analyzer
← Volver al blog
Document OCRIdentity Verification

Reading PDF417 Barcodes on North American Driver Licenses

ID Analyzer TeamJul 1, 20265 min de lectura
Reading PDF417 Barcodes on North American Driver Licenses

If you build identity verification in North America, you will eventually meet the PDF417 barcode. It is the dense, rectangular block printed on the back of nearly every US and Canadian driver license, and it holds a structured copy of the cardholder data. Reading it correctly is one of the highest-signal, lowest-friction steps you can add to a KYC flow.

This post explains what PDF417 is, what data it contains, why it matters for verification, and the common pitfalls when parsing it.

What is PDF417?

PDF417 is a two-dimensional stacked barcode format. The name comes from its structure: each pattern is made of 4 bars and spaces spanning 17 units. Unlike a QR code, it is wider than it is tall and encodes data in stacked rows.

North American driver licenses use PDF417 to store a machine-readable copy of the visible cardholder information. The format follows the AAMVA (American Association of Motor Vehicle Administrators) DL/ID Card Design Standard, which defines a consistent data layout across issuing jurisdictions.

Because the data is standardized, once you decode the barcode you get clean, parseable fields instead of guessing at OCR output from a printed card.

What data does the barcode contain?

The AAMVA standard defines a set of data elements identified by three-letter codes. Common fields include:

  • DAC / DCS — first and last name
  • DBB — date of birth
  • DBA — expiration date
  • DBD — issue date
  • DAG / DAI / DAJ / DAK — street, city, state, postal code
  • DAQ — license/ID number
  • DCG — country
  • DDE / DDF / DDG — truncation indicators for name fields

The barcode is prefixed with a compliance header identifying the AAMVA version and the issuing jurisdiction. Different versions of the standard have added, renamed, or reorganized fields over time, which is a frequent source of parsing surprises.

Note

The PDF417 barcode is a copy of the printed data, not an independent source of truth. Treat it as one signal to cross-check against the visual document and other checks, not as proof the card is genuine.

Why read the barcode at all?

The front of a driver license is designed for humans. The barcode is designed for machines. There are three practical reasons to read it.

Higher accuracy than front-side OCR alone

OCR on the printed side has to deal with fonts, holograms, wear, glare, and background artwork. The barcode decodes to structured text, so name, date of birth, and document number come back cleanly. This reduces false rejections caused by misread characters.

Cross-checking for tampering

A useful fraud signal is comparing the barcode data against the OCR text on the front. On a legitimate license, the two should match. When someone alters the printed side but leaves the barcode untouched — or reprints a front over a real card — the mismatch is a strong red flag. This is a core part of document authentication, alongside checks for security features and anti-forgery patterns.

Faster, more reliable data capture

For onboarding, the barcode lets you auto-fill fields with confidence. Fewer manual corrections means fewer drop-offs.

Common parsing pitfalls

Decoding the barcode image is only half the job. Turning the raw string into usable fields is where teams get tripped up.

Version drift

AAMVA has published multiple versions of the standard. Field presence and formatting vary between them. Hardcoding to one version will break when you encounter cards issued under another. Always read the version from the header and parse accordingly.

Date formats

Date encoding differs. Some jurisdictions use MMDDCCYY, others use CCYYMMDD. Assuming a single format produces silently wrong dates of birth — a serious problem for age checks.

Truncated names

Long names may be truncated to fit fixed field lengths. The truncation indicator fields tell you whether a value was cut. If you ignore them, a name mismatch against the front OCR may be a formatting artifact rather than fraud.

Encoding and separators

The raw data uses record separators and line feeds as delimiters. Stripping or misinterpreting these characters corrupts field boundaries. Non-ASCII characters in names add further edge cases.

Damaged or low-quality captures

A cropped, blurry, or glare-covered barcode may fail to decode entirely. Guide users to capture the full back of the card in good lighting, and fall back gracefully when a scan fails.

Fitting it into a verification flow

A robust North American ID check usually combines several steps rather than relying on the barcode alone:

  1. Capture the front and back of the license.
  2. OCR the front to read printed fields.
  3. Decode the PDF417 on the back and parse per AAMVA version.
  4. Cross-check barcode data against front OCR to catch tampering.
  5. Authenticate the document for security features and forgery signals.
  6. Match a selfie to the license portrait with a liveness check to confirm the holder is present and real.

ID Analyzer handles the barcode decoding and AAMVA parsing for you, alongside OCR, document authentication, and biometric face match — across 3,000+ document formats and 190+ countries, on an ISO 27001 certified platform. You get parsed, normalized fields plus the cross-check and fraud signals in a single response, so you do not have to maintain version-specific parsers yourself.

Key takeaways

The PDF417 barcode is a clean, standardized data source hiding on the back of almost every North American driver license. Reading it improves data accuracy, speeds up onboarding, and — most importantly — gives you a cross-check that catches tampered documents. Just remember it is a copy of the front, not proof of authenticity, and account for version drift, date formats, and truncation when you parse it.

Empieza a verificar

¿Listo para verificar tu primer documento de identidad?

Créditos de prueba gratis al registrarte — no se requiere tarjeta.

  • Sin Tarjeta de Crédito

  • Créditos de Prueba Gratis al Registrarte