IdScanner/Guides/Licence barcodes
What is actually in a driver's licence barcode?
The black rectangle on the back of every US and Canadian licence is a PDF417 barcode holding a structured copy of the card's own data. Knowing what is in it — and what is not — explains most of what an ID scanner can and cannot do.
PDF417, and the standard behind it
PDF417 is a two-dimensional barcode format. It is not specific to identity documents; what makes a licence barcode a licence barcode is the standard that defines the data inside it — the AAMVA DL/ID Card Design Standard, published by the American Association of Motor Vehicle Administrators.
AAMVA is a North American standard. It covers US states and territories and Canadian provinces. It does not cover Europe, Asia, Latin America or anywhere else — a point with practical consequences at the end of this page.
The data elements
Inside the barcode, data is stored as three-letter element codes followed by a value. These are the ones a door actually cares about:
| Code | Meaning |
|---|---|
| DCS | Family name (surname) |
| DAC | First name |
| DAD | Middle name |
| DBB | Date of birth |
| DBA | Expiry date |
| DBD | Issue date |
| DAQ | Licence or ID number |
| DAJ | Jurisdiction — the state or province code |
| DCG | Country (USA or CAN) |
| DAK | Postal code |
| DBC | Sex |
There is more — height, eye colour, address, endorsements, restrictions — but the list above is what an age check runs on.
The date-format trap
This is the detail that breaks naive scanner implementations, and it is worth knowing about even if you never write one.
Dates in an AAMVA barcode are eight digits, but the order depends on the country and the spec version:
- US, version 2 and later: MMDDCCYY — month first.
- Canada, and version 1 anywhere: CCYYMMDD — year first.
So 01021990 is 2 January 1990 on a Canadian card read one way, and an invalid date read the other. A scanner that assumes one format silently produces wrong ages for every card from the other group — and it will look like it is working, because most of the dates it produces are plausible.
Why this matters at a door: a wrong-by-a-format age is not a visible failure. Nothing errors, nothing flashes red — the card simply gets an age that is wrong, sometimes by decades, sometimes by a few days in exactly the range that matters.
What the barcode does not contain
- No photograph. The image on the front is not encoded in the barcode. This is why matching the face to the photo stays a human job.
- No cryptographic signature. The AAMVA barcode is not digitally signed in a way a door app can verify. It is a data copy, not a certificate — which is precisely why "does the barcode agree with the printed front" is the useful question rather than "is the barcode authentic".
- No live link to the issuing authority. Nothing in the card contacts a DMV. A scanner reads the card and nothing else.
Passports and ID cards: the MRZ instead
Documents outside North America have no AAMVA barcode. What they have is the machine-readable zone — the two or three lines of chevron-padded monospaced text at the bottom of a passport's photo page, defined by ICAO 9303.
The MRZ carries the same essentials — name, document number, nationality, date of birth, sex, expiry — in fixed character positions. It adds something AAMVA does not have: check digits, small arithmetic checksums over the document number, the birth date and the expiry date. A failed check digit means the line was altered or misread, and it can be detected on the spot.
Two formats matter in practice: TD3, two lines of 44 characters, used by passports; and TD1, three lines of 30 characters, used by ID cards.
What this means for European documents
The practical upshot, and the most common support question we get:
- European passports: yes. Every passport carries an ICAO 9303 MRZ.
- European national ID cards: yes. EU Regulation 2019/1157 has required an MRZ on new national ID cards since August 2021.
- European driving licences: no. The EU licence directive standardised the card's appearance but never mandated a machine-readable barcode. Some countries add one; there is no common standard to read.
So at a European door, the passport or the national ID card is the document that scans. The driving licence generally is not.
How IdScanner reads both
IdScanner parses AAMVA PDF417 and ICAO 9303 MRZ into the same result, handles the date-format difference by country and spec version, and surfaces MRZ check-digit failures as integrity flags on the verdict screen. Parsing happens entirely on the phone — no document data is uploaded anywhere.