Barcode Types on Documents: The Complete Guide

2026/09/24
Barcode Types on Documents: The Complete Guide

Flip over a US driver’s license and you will find a dense, brick-like barcode filling the back. Look closely at a European ID card and a small square module pattern stares back at you. Open a utility bill, a bank statement or a boarding pass and a striped code sits quietly next to the numbers. Document barcodes are everywhere — and unlike the retail code on a cereal box, every family you meet on an official paper was chosen for a reason: data capacity, error correction, print quality, or the scanners that read it.

This guide walks through every barcode family you will realistically meet on identity documents, financial papers and mail — how each one works, what it encodes, where it lives on the document, and how to generate any of them in your browser for free. If you design, print or inspect documents, this is your field guide; by the end, the back of any card will tell you exactly what its pattern of bars and dots is saying. And just as the two dense lines at the bottom of a passport (the MRZ) carry the data page in machine-readable form, each barcode below is a document talking to machines.

Two Families: Linear (1D) vs Matrix (2D) Barcodes

Every barcode you will ever see on a document belongs to one of two families. Linear (1D) codes — the classic stripes — encode data in the widths and spaces of bars and are read by a laser sweep or a camera line. They are cheap to print, survive low-grade printers, and work with decades-old scanner hardware, but they hold little: typically a few dozen characters. That is why a membership card can carry a member number in Code 39, but a driver’s license full of personal data cannot.

Matrix (2D) codes encode data in the pattern of dark and light cells inside a rectangle or square. Their capacity jumps from a few dozen characters to hundreds or thousands, and almost all of them add Reed–Solomon error correction: a PDF417 or DataMatrix can lose part of its surface — smudged ink, a folded corner, a stamp over it — and still decode perfectly. That combination of capacity and resilience is exactly what an identity document needs, which is why every modern ID, permit and boarding pass carries a 2D code somewhere.

There is also a hybrid worth knowing: PDF417 is formally a stacked linear code — several short 1D rows stacked into a brick — which gives it 2D-like capacity while remaining printable at document quality.

PDF417: The Barcode on US Driver’s Licenses

That brick of tiny bars on the back of every US, Canadian and Mexican driver’s license is PDF417 — and it is not a decoration. Under the AAMVA DL/ID design standard, it encodes essentially everything printed on the front of the card: full name, address, date of birth, license number, class and endorsements, restrictions, issue and expiry dates, and audit data. A police officer, a bar bouncer or a bank clerk swipes the back of the card and gets a clean, keyboard-free read of the whole license.

Each PDF417 symbol is a stack of rows (3 to 90), each row holding its own start, stop and row indicators, split into variable-length “codeword” clusters. Up to 1,850 text characters fit in one symbol, and nine levels of Reed–Solomon error correction let a symbol survive damage that would kill a linear code. The same qualities made PDF417 the choice for the US Permanent Resident Card (“green card”) — the PDF417 on its back encodes the receipt, category and case numbers — and for the paper boarding pass: the IATA Bar Coded Boarding Pass standard put a PDF417 on boarding passes worldwide.

Fun detail: PDF417 stands for “Portable Data File”, 4 bars and spaces per codeword, 17 modules wide. It became an ISO standard (ISO/IEC 15438) in the 1990s after Symbol Technologies invented it in 1991.

DataMatrix: Passports, Visas and EU ID Cards

The small square filled with black-and-white cells on the back of many European national ID cards, residence permits and visa stickers is a DataMatrix. Where PDF417 is a brick, DataMatrix is a chessboard: a square or rectangular grid of modules framed by two solid borders (the “L” finder pattern) and alternating dotted borders that let a scanner find the grid at any rotation.

Its error correction — ECC 200, again Reed–Solomon — is so strong that codes are permanently laser-etched onto aerospace parts and still scan after years of wear. On documents that same resilience means the code survives being printed small (a few millimeters), stamped over, or partially folded. Depending on size, a DataMatrix carries from a few bytes up to about 2,335 characters.

Typical document payloads are compact: a document number, personal number, issue data, or a checksum linking the card to a national register. Scanners at borders, banks and post offices read the code and reconcile it with the printed fields — a mismatch is an instant red flag, the same cross-check logic that MRZ check digits apply on passports.

QR Codes: E-visas, Tickets and Payment Documents

Everyone can recognize a QR code — the square with three corner finder rings — because it conquered consumer life first: payments, menus, tickets, links. On official papers it plays the same role: it bridges a physical document to an online record. E-visas and electronic permits (many countries now issue them) print a QR that resolves to the visa record; event and transport e-tickets put the whole ticket or a lookup key inside; payment slips and invoices embed account or invoice data so a phone can scan-and-pay instead of typing.

Technically a QR code stores data in a grid up to 177×177 modules — up to 7,089 digits or 4,296 letters — with four Reed–Solomon error-correction levels (L/M/Q/H, recovering 7%, 15%, 25% or 30% damage). Denso Wave invented it in 1994 to track car parts, and its killer feature remains fast, reliable reading by an ordinary phone camera, at any angle, in poor light. That is precisely why any document whose main job is “let a human verify this with a phone” tends to choose QR.

If you need QR codes rather than the document symbologies above, use a dedicated QR code generator; for everything else on this page the barcode generator below covers you.

Aztec: Boarding Passes and Train Tickets

The bulls-eye square — concentric rings in the middle instead of QR’s corner rings — is an Aztec code. It was designed to be decoded with poor print quality and low-resolution scans, exactly the conditions of a thermal-printed ticket or a boarding pass shown on a cracked phone screen. IATA’s mobile boarding pass standard uses Aztec and QR, and many railway operators print Aztec on their tickets — Deutsche Bahn tickets are a familiar example in Europe.

Aztec needs no quiet zone around it (QR requires a white margin), packs up to 3,832 characters, and offers layered error correction with a clever trick: a small “bulls-eye only” message can be read even when the outer layers are damaged. On documents, Aztec usually carries the same class of data as QR — ticket identity, passenger name, seat, or a signature of the barcode content itself.

Code 39, Code 93 and Code 128: ID and Membership Cards

When a document only needs an ID number — not a full data page — the classic linear codes still win on simplicity and print tolerance.

Code 39 (born 1974) encodes 43 characters: uppercase letters, digits and a handful of symbols. Each character is built from nine elements — five bars and four spaces, three of which are wide (hence “3 of 9”). It is self-checking, tolerates mediocre printers, and appears on employee badges, membership cards, warehouse documents and older ID cards worldwide. An optional modulo-43 check character catches typing-style errors.

Code 93 is Code 39’s denser 1982 successor: same alphabet plus four control characters, more information per centimeter, and two mandatory check characters. You will find it on logistics labels and some postal documents.

Code 128 is the heavyweight of linear codes: every one of the 128 ASCII characters, high density, and a mandatory modulo-103 check character. Its GS1-128 variant is the global language of shipping labels and supply-chain documents, carrying tracking numbers, lot numbers and expiry dates. On identity-adjacent documents, Code 128 typically appears wherever a longer alphanumeric reference must fit into one printed line.

Codabar: Bank Deposit Slips

Older than all of the above and still quietly working, Codabar is the striped code printed on US bank deposit slips and money-order forms, on library cards, blood-bank forms and legacy air waybills. It encodes digits plus six control characters, and its signature quirk is that each data character is self-terminating: bars, spaces and two narrow strokes per character mean readers can decode it with simple hardware and no start/stop calibration.

Historically, Codabar was even hand-writable: clerks could draw a valid code with a ruler. If you are recreating an older bank form or a classic deposit slip, Codabar is almost certainly the symbology printed in its corner — and yes, the barcode generator makes valid Codabar with the standard start/stop letters.

EAN-13, EAN-8 and UPC: Invoices and Receipts

The barcode on nearly every product you have ever bought is an EAN-13 (international) or UPC-A (North American): exactly 12 or 13 digits, no letters, no variable length. EAN-8 is the compressed version for tiny packages. They encode one thing — the GS1 Global Trade Item Number — plus a modulo-10 check digit computed with alternating 3-1 weights.

Why do they matter on documents? Because invoices, receipts, till rolls and proof-of-purchase papers re-print those product codes so the receipt can be re-scanned for returns, warranty and accounting. A utility bill template or an invoice mockup with a realistic product section will therefore carry EAN-style codes, not Code 128 noise. The first 2–3 digits of an EAN identify the country of the GS1 member organization — a detail worth knowing when a document must look plausible for a given country.

Interleaved 2 of 5: Utility Bills and Logistics

Interleaved 2 of 5 (ITF) is the high-density, digits-only workhorse printed on utility bills, telephone bills, warehouse forms and shipping cartons. Its trick is interleaving: the bars encode the odd digits, the spaces between them encode the even digits, so every inch of printed stripe carries double the data of naive digit codes. An ITF symbol always encodes an even number of digits; odd payloads are zero-padded.

The big variant, ITF-14, carries the 14-digit GTIN of a shipping carton on brown corrugated cardboard — an environment where laser-quality printing is impossible and ITF’s fat, forgiving bars still scan. On utility bills in many countries, an ITF block encodes the customer/account or invoice number so payment terminals and bank scanners can pull it without OCR. If you are working on bill or statement designs, this family and the postal codes below are the ones to know — alongside the barcode-like numbering of the bank statement itself.

POSTNET, IMb and RM4SCC: Barcodes on Statements and Bills

The least famous but most-printed document barcodes are the postal codes — the short, height-fluctuating stripes you see printed on envelopes and on the edge of mailed bank statements and bills.

POSTNET was the classic USPS code: five, nine or eleven digits of ZIP encoded in the heights of tall and short bars. IMb (Intelligent Mail barcode) replaced it — a 31-digit code in both bar height and width, encoding the full routing, tracking and service information of a mail piece. RM4SCC is Royal Mail’s equivalent in the UK, four-state bars (four different heights) encoding the postcode and delivery point.

Why care? Two reasons. First, authenticity: a mailed utility bill or proof-of-address document from a US sender realistically carries an IMb on its envelope edge, and a UK one an RM4SCC row — details that separate plausible documents from obvious mockups. Second, function: those codes are how mail sorters route hundreds of millions of statements per day. Each family also has its own check-digit formula (USPS sum-mod-10, Royal Mail’s 6-weight scheme), which a proper generator computes for you.

Quick Reference: Which Document Uses Which Barcode

DocumentBarcodeTypical payload
US / Canadian / Mexican driver’s licensePDF417Full front-face license data (AAMVA)
US green card (Permanent Resident Card)PDF417Receipt, category and case numbers
Paper airline boarding passPDF417Name, flight, seat (IATA BCBP)
EU ID cards and residence permitsDataMatrixDocument number and register data
Mobile boarding pass / train ticketAztec (or QR)Ticket identity and signature
E-visas, e-tickets, payment slipsQR CodeLookup key or full record
Utility bills, phone billsITF / postal codesAccount and invoice numbers
Mailed statements and bills (US / UK)IMb / RM4SCC / POSTNETRouting, ZIP / postcode, tracking
Receipts and invoicesEAN-13 / EAN-8 / UPCProduct GTINs
Membership, library and older ID cardsCode 39 / CodabarMember IDs
Shipping labels and cartonsCode 128 (GS1-128) / ITF-14Tracking and SSCC numbers

Generate Every Document Barcode Online — Free

Reading barcodes is one half of the story; producing them is the other — and you no longer need desktop software for it. The free online barcode generator on this site renders every family covered in this guide in your browser: the linear group (Code 128, Code 39, Code 93, Codabar, EAN-13, EAN-8, UPC-A, UPC-E, ITF, ITF-14), the matrix group (PDF417, DataMatrix, Aztec) and the postal group (POSTNET, IMb, RM4SCC) — sixteen formats in total.

It behaves the way document work demands: check digits are computed or verified with the standard GS1, USPS and Royal Mail formulas, error-correction levels are adjustable where the symbology allows, colors, module sizes and quiet zones are configurable, and every symbol downloads as PNG or SVG — vector output that stays crisp when scaled onto a print layout. Everything runs locally in the browser; nothing you type is sent to a server. For QR symbols specifically, the companion QR code maker offers dedicated options.

Typical uses: filling a template’s barcode placeholder with a structurally valid symbol, testing how a scanner behaves with different error-correction levels, or learning to distinguish symbologies by eye. Paired with the MRZ tools and the bank statement guide, you can equip a complete document with every machine-readable element it plausibly carries.

Frequently Asked Questions

What barcode is on the back of a US driver’s license?

A PDF417 stacked barcode, standardized by AAMVA. It encodes the data printed on the front of the card — name, address, dates, license number, class, endorsements and restrictions — so a single swipe reads the whole license. Canadian and Mexican licenses follow the same standard.

Do passports have a barcode?

Not in the classic sense. Passports carry the two-line MRZ — the machine-readable zone of OCR-B characters — plus an NFC chip whose key is derived from the MRZ data. The square codes you may see on visas, residence permits and ID cards are DataMatrix or QR symbols, which is a different family from the MRZ.

Can a barcode prove a document is genuine?

No. A barcode only proves what it encodes — and anyone can generate a structurally valid one. What barcodes give verification systems is consistency to check: the decoded content must match the printed fields, the check digits, and the issuer’s records. A mismatch is an instant red flag; a match is necessary but never sufficient.

Which barcode type holds the most data?

QR Code tops the table with up to 7,089 digits (4,296 alphanumeric); PDF417 reaches about 1,850 characters, DataMatrix about 2,335, Aztec about 3,832. Linear codes stay in the dozens of characters — enough for numbers, not for data pages.

How do I generate a PDF417 or DataMatrix barcode for free?

Open the online barcode generator, pick the symbology, enter your payload, adjust size and error correction, and download the result as PNG or SVG. All sixteen document families from this guide are supported, check digits included, and nothing leaves your browser.

Conclusion: One Card, One Machine Story

Every barcode family on documents solves the same problem — a document that must speak to machines — with different trade-offs. Linear codes chose simplicity and print tolerance; PDF417 chose capacity in a brick; DataMatrix chose resilience in miniature; QR and Aztec chose the phone camera; postal codes chose the sorting floor. Once you can name the family on sight, the stripe on a deposit slip, the bulls-eye on a boarding pass and the brick on a driver’s license all become legible engineering — and with the free generator you can produce each of them correctly, check digits and all, in under a minute.

Comments 0

To leave a comment, Log in.

No comments yet.