Cruxia / Journal

Technology

How QR codes work

QR codes were designed in 1994 for a Japanese car-parts maker. They now carry UPI payments, restaurant menus and boarding passes, and they still scan when part of the pattern is torn, stained or covered by a logo.

Cruxia Journal24 November 20265 min read

A QR code stores data as a grid of dark and light squares that a camera reads horizontally and vertically at once. Denso Wave developed it in Japan in 1994 to track automotive parts. Error-correction data is built into the pattern, so at the highest setting a code still scans with about 30% of it damaged or covered.

Where they came from

By the early 1990s Japanese car factories were running short of label space. A standard barcode holds about 20 characters, so one part could need several. In 1992 Masahiro Hara, who worked on barcode scanners at Denso, was asked for something faster to read.

He worked on it with one colleague for about a year and a half. The code they released in 1994 held around 7,000 digits and could encode kanji. QR stands for Quick Response.

Denso Wave registered “QR Code” as a trademark but chose not to enforce its patent, so anyone can make and read the codes without a licence.

The parts of a code

The three large squares in the corners are finder patterns. They tell a scanner where the code is and which way up it is, which is why a code can be scanned at an angle. Larger codes add a smaller alignment square that helps the scanner correct for curves and tilt.

Two lines of alternating dots, the timing patterns, give the scanner the size of each cell. The rest of the grid holds data and error-correction codewords, with each small square, or module, standing for a 1 or a 0.

Surviving damage

QR codes use Reed–Solomon error correction, the same family of techniques used on CDs. The generator adds redundant data that lets a reader rebuild missing parts, at one of four levels.

LevelCan recover aboutTypical use
L7%Codes on screens, maximum data
M15%General use
Q25%Printed codes that get handled
H30%Factory labels, codes with a logo in the middle

Codes with a logo in the centre depend on this. The logo hides part of the data, and level H error correction fills it back in.

How much they hold

There are 40 sizes, called versions. Version 1 is a grid of 21 by 21 squares; version 40 is 177 by 177 and holds about 7,000 digits, or a few thousand letters. The more a code stores, the denser and slower to scan it gets, which is why most hold only a short web address.

Printing one that works

Short links make for larger squares and faster scans. Leave a clear margin around the code, and keep it dark on a light background, since inverted and low-contrast codes fail on some phones. Print a test copy at the real size and scan it from a normal distance with a few different phones.

Then open the link on a phone yourself. A code that leads to a slow page, or one built for desktop screens, loses people after they've already done the hard part.

Sources: Denso Wave, QR Code development story and error-correction documentation; ISO/IEC 18004. Checked 24 November 2026.

The Cruxia Journal is written by the team at Cruxia, a small studio that designs and builds websites. See our work.