Barcify
AAMVA · PDF417
Barcify AAMVA · PDF417
Secured access

Documentation

About Barcify

What the barcode encodes, how AAMVA structures it, and how to verify your output.

PDF417 on a license

North American driver’s licenses carry a PDF417 2D barcode on the back. Many US cards also print a small 1D Code 128 (sometimes Code 39) — typically the license number or ICN — which Barcify can generate alongside the PDF417.

PDF417 is only the container. Contents follow the AAMVA DL/ID Card Design Standard: every field is a three-letter element ID plus a value — DAQ (DL number), DCS (last name), DBB (date of birth), and so on.

Barcify builds that payload, then renders it with bwip-js.

Verifying the barcode
  • Scan with any PDF417-capable phone camera app
  • Hardware ID and point-of-sale scanners
  • CLI: zbarimg barcode.png or a zxing decoder
  • Review the raw AAMVA text in the Encoded payload panel

The repository includes test-roundtrip.js — encode then decode must match byte-for-byte.

Date & format rules
  • US: dates MMDDYYYY, country DCG=USA
  • Canada: dates CCYYMMDD, country DCG=CAN
  • US ZIP often zero-padded to eleven characters in the barcode
  • Height: US often 070 in; Canada often 178 cm
Command-line interface
node generate.js -o sample.png
node generate.js --country CAN -o ca.png
node generate.js --text "HELLO" -o hi.png
node generate.js --payload-only

Full options live in the project README on GitHub.

AAMVA element dictionary
IDElementNotes
DAQDL/ID numberState-specific pattern
DCS / DAC / DADLast / First / MiddleUPPERCASE, ≤40
DAE / DAFSuffix / PrefixJR, SR, II…
DBB / DBD / DBADOB / Issue / ExpiryUS MMDDYYYY · CA CCYYMMDD
DBCSex1=M 2=F 9=U
DAY / DAZEyes / HairANSI D-20 codes
DAU / DAWHeight / Weight“070 in” or “178 cm”
DAG…DAKAddressZIP often padded to 11
DCA / DCB / DCDClass / Restrictions / EndorsementsJurisdiction codes
DCF / DCKDD / ICNDD unique per issue; ICN ≤25 chars — often the 1D barcode (FL, NE)
DDA / DDB / DBHREAL ID / Revision / DonorModern cards
DCGCountryUSA or CAN
Educational / QA tool. Do not use Barcify to create fraudulent identification.
Open the generator