2D barcode

A 2D barcode is read in two directions at once, so it holds far more than the striped kind.

In more detail

An ordinary striped code is read across, and only across. The height of the bars carries nothing: it is there so that a scanner passed at an angle still crosses them all. Such a code holds eight to thirteen digits, or a short line of characters where the code allows it — a reference, and nothing else.

A 2D code uses the height as well. It is a grid, and every square of the grid carries something. That is a change of scale rather than a small gain: a few hundred to a few thousand characters instead of a dozen. A whole address, a payment, a delivery line.

What it does on a real document

On an invoice, a QR code at the foot of the page holds the account to pay, the exact amount and the reference. The person paying points a telephone at it, and their banking application fills in the transfer.

The engine draws the code on the page like any other shape, in solid black rectangles. It stays sharp at any size, which a photograph of a code would not, and it comes out the same on paper as on screen.

Where it comes from, and why

Striped codes reached shops in the 1970s and did what was asked of them for years. What they could not do was carry the information itself: they carry a number, and the information sits in a database somewhere else. Industry wanted it on the object.

Several answers appeared over the twenty years that followed, each shaped by the job it was made for: DataMatrix, a tiny square for small parts; PDF417, a wide flat one for identity documents; Aztec, made to be read off a lit screen. Each is a standard in its own right, and none of them replaced the others.

See it on a finished document

QR codes Data Matrix codes

Back to the whole glossary