;colony/science  / Computers, Visually  / How does a QR code store information?
Computers, Visually

How does a QR code store information?

A QR code is a tiny map of black-and-white squares. Three corner markers tell the camera where it is, and built-in spare copies let it survive a scribble — up to about a third destroyed and it still reads.

Plate 164 — Squares, finders, redundancy modules · finder patterns · Reed–Solomon
Scribble out part of the code and watch it still decode.
Predict firstHow much of the code do you think you can erase before the scanner can no longer read it?
finder squares (corners) · timing line (the dotted row + column)DATA + REDUNDANCYdata modulefinder / timingerasedERROR CORRECTION~30% limit✓ STILL READABLEscanners rebuild the missing squares from spare copies baked into the pattern
PLATE 164 · SQUARES, FINDERS & REDUNDANCY
Damage 0% of data erased
Scratch out modules and watch the scanner fight back — until you cross ~30%.
Modules erased
0%
Recovery headroom
30pts
Verdict
readable
A QR code is a tiny map. The three big squares in the corners are finders: they tell the camera where the code is and which way up it sits. The dotted line between them is a ruler for counting rows. All the little squares in the middle are the actual message, written in black-and-white as 1s and 0s. The clever bit: the code stores spare copies of itself, so even if you scribble over a chunk, the scanner can rebuild what's missing — up to about a third gone before it gives up.
Try with the plate
  • Damage the code as much as you can while it stays readable
  • Push past the limit and watch it become unrecoverable

A QR code stores information as a grid of black-and-white squares, each a binary bit. Three corner finder patterns let a camera locate and orient it, while Reed–Solomon error correction weaves in spare copies of the data, so the code can lose up to about 30 per cent of itself and still be read.

The short answer

A QR code looks like random black-and-white speckle, but it is actually a neat little map. Each tiny square is a single bit of information: black means one, white means zero, and strung together those bits spell out a web address or a message. The three big square targets in the corners are called finder patterns — they shout to the camera, here I am, and this is which way up I sit, so the scanner can line the code up even if you hold your phone at an angle. The dotted line running between the corners is a ruler that helps the camera count the rows and columns. The really clever part is hidden: the code stores spare copies of its own information, woven through the pattern. So if you scribble over part of it, scratch it, or a coffee stain covers a chunk, the scanner can rebuild the missing bits from the spares. You can wreck nearly a third of a QR code and it will still work. Drag the damage slider and watch it fight back until it finally gives up.

The common mix-up

Most people think a QR code stores its information like a picture, so any damage scrambles it. In fact it stores spare copies through error correction, so it can lose nearly a third of itself and still be read perfectly.

What's actually happening

In 1994 an engineer named Masahiro Hara, working for a Toyota subsidiary called Denso Wave, had a problem on the factory floor. Ordinary barcodes held very little and had to be scanned in one direction; tracking car parts needed something denser and quicker. The story goes that the grid layout came to him partly from watching the black-and-white stones on a game of Go. The result was the QR code, Quick Response code, a two-dimensional pattern that could hold hundreds of times more than a barcode and be read from any angle in a fraction of a second.

To pull that off, the code has to solve two problems at once: where is it, and what does it say. The where is handled by those three unmistakable square targets in the corners, the finder patterns. A scanner sweeps the image looking for their distinctive ratio of black and white, and the moment it finds three of them it knows it has a QR code, knows its size, and knows its orientation — which is why you can scan one upside down or skewed and it still works. Fine dotted lines called timing patterns run between the finders like a ruler, pinning down exactly where each row and column of modules sits. Only then does the scanner read the what: the field of small squares in the middle, each a one or a zero, decoded back into text or a link.

The most ingenious trick is the one you cannot see. Real QR codes live in the wild — printed on crumpled receipts, stuck to lamp posts, smudged, torn, partly hidden. So they are built with redundancy using a method called Reed–Solomon error correction, the same family of maths that protected data on CDs and on spacecraft transmissions. The code carries extra parity information alongside the real message, enough that the decoder can reconstruct missing or corrupted modules. At the strongest setting roughly 30 per cent of the code is given over to this safety net, which is why a QR code can lose almost a third of itself and still be read flawlessly — and it is exactly why companies can punch a logo into the middle of a QR code without breaking it. Drag the damage up in the simulator and you will watch the error correction quietly repair the gaps, right up to the cliff edge where too much is gone and it finally fails.

Remember this

A QR code is a grid of bits with corner markers to orient it and built-in spare copies, so error correction lets it survive losing up to about a third.

Try it at home Test a real code's resilience
  1. 1Find a printed QR code you are happy to mark — a leaflet or a free sample is ideal.
  2. 2Cover one corner finder square with your thumb and try to scan it; it usually fails, because the scanner can no longer locate the code.
  3. 3Now uncover the corners but scribble over a small patch of the middle instead, then scan again — it still reads, because the error correction rebuilds the damaged data modules.

Common questions

What are the three big squares in the corners for?

They are finder patterns. A scanner hunts for their distinctive black-and-white ratio to locate the code, work out its size, and figure out its orientation, so you can scan it from any angle.

How can a QR code work when it is damaged?

QR codes use Reed–Solomon error correction, storing extra parity information alongside the real data. The decoder uses it to rebuild missing or corrupted modules, surviving up to roughly 30 per cent damage at the highest correction level.

Why can companies put a logo in the middle?

Because the error correction holds spare copies of the data. The logo simply covers some modules that the scanner reconstructs from the redundancy, so the code still decodes.

Built & checked by Nilesh Singh · how this is made · last updated June 2026