How QR Codes Work

A plain-language tour of what is actually inside a QR code and how a scanner turns those black-and-white squares back into text.

The anatomy of a QR code

A QR (Quick Response) code is a grid of black and white squares called modules. Different regions of the grid do different jobs, and understanding them explains why some codes scan effortlessly and others fail.

Finder patterns

The three large squares in the corners are finder patterns. They let a scanner locate the code and work out its orientation almost instantly, from nearly any angle. A fourth, smaller alignment pattern helps with distortion on bigger codes.

Timing patterns

The alternating line of modules running between the finder patterns is the timing pattern. It acts like a ruler, telling the scanner how many modules wide and tall the code is so it can map the grid precisely.

Data and error-correction modules

The remaining modules store your encoded content plus redundant error-correction data. That redundancy is what lets a code survive a smudge, a crease or a logo (see our error-correction guide).

The quiet zone

QR codes need an empty margin around them — the quiet zone — so scanners can tell where the code ends. Removing it is one of the most common reasons a code won't scan.

Static vs dynamic codes

A static code, like the ones QRBarcodeTools creates, stores its content directly. A dynamic code stores a short redirect URL that a server resolves, which allows editing and tracking but adds a dependency and a privacy trade-off. Static codes can't be changed once printed, but they never break because a server went away.

The scan, step by step

A scanner finds the finder patterns, reads the timing pattern to build the grid, samples each module as light or dark, applies error correction to fix any misreads, and finally decodes the bits back into text — all in a fraction of a second.

Advertisement

More guides