‹ All guides

How QR Codes Work: Modules, Versions and Error Correction

Updated: 2 September 2026

A QR code looks like random noise, but every part of the square has a job. Knowing what the pieces do explains most of what puzzles people about them: why the pattern gets denser as you add text, and why the code on your poster refuses to scan.

Modules, and the patterns that make a code readable

The light and dark squares are called modules. A scanner does not read the picture; it works out the grid those modules sit on and reads them as bits. Some are structure rather than content:

Everything left over carries your data and its error correction.

Versions: why more text means a denser code

QR codes come in 40 defined sizes, called versions. Version 1 is 21×21 modules, and each step up adds four modules to a side, so version 40 is 177×177. A generator picks the smallest version your content fits into.

That is why a long link makes a busier code. The square stays the same size on your poster but is divided into many more, much smaller modules — and small modules need a closer, steadier, better-focused camera. Shortening the text is the most useful thing you can do for scannability; characters that need percent-encoding in a URL cost several each, as the URL Encoder/Decoder will show you.

Error correction: L, M, Q and H

QR codes use Reed–Solomon error correction, the mathematics that lets a scratched disc still play. Redundant information is woven through the code so a reader can rebuild what a damaged area should have said. Four levels are defined, with these standard recovery figures:

Recovery data takes space, so a higher level pushes the same content into a larger version: smaller modules at any fixed print size. That is the trade — damage tolerance against module size. L suits a screen, M most printing, Q or H a code that will be handled, printed small or partly covered. A logo in the middle works because the error correction absorbs it as damage, and fails once it covers more than the level allows.

The quiet zone

A QR code is not only the pattern. The specification requires a clear margin of background, at least four modules wide, on all four sides. Without that quiet zone a scanner struggles to tell where the grid ends, and codes butted up against a border, text or a photograph fail for this reason alone.

Why codes fail to scan

Static and dynamic codes

A static code contains the destination itself. Nothing sits in between, so it works for as long as whatever it points to does — but it cannot be edited, and a new destination means a new code.

A dynamic code encodes a short link to a redirect service, that forwards each scan to whatever destination is currently set. That buys an editable target and scan counts, but the code now depends on a third party: if the account lapses or the service closes, every printed copy stops working at once. Worth weighing before a code goes onto packaging that outlives a subscription.

The QR Code Generator here makes static codes in your browser, with a choice of the L, M and Q levels. Your text is never uploaded and there is no redirect or tracking, so nothing about the code can expire. Whichever tool you use, scan the finished proof with two or three phones before committing to a print run.