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:
- Finder patterns — the three large concentric squares in three of the corners. They let a camera spot a code in a cluttered scene, and because the fourth corner has none, they show which way up it is.
- Alignment patterns — smaller concentric squares, present from the second size upwards, that correct for a code photographed at an angle or on a curve.
- Timing patterns — alternating modules running between the finders, fixing the spacing of the grid.
- Format information — reserved areas recording the error correction level.
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:
- L (Low) — roughly 7% of the encoded data can be restored.
- M (Medium) — roughly 15%.
- Q (Quartile) — roughly 25%.
- H (High) — roughly 30%.
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
- Too small for the amount of data — long content at a small print size is the classic combination.
- No quiet zone, or a busy background crowding the edges.
- Weak contrast — codes are meant to be dark modules on a light background, and some readers refuse an inverted one.
- Distortion — a curved bottle, a creased flyer, glare on laminate, ink spreading on absorbent paper.
- Distance — a print rule of thumb is that a code reads from about ten times its own width.
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.