FOUNDATIONS

How QR Codes Actually Work, Explained Without the Jargon

You scan them without thinking. Underneath is a genuinely clever bit of design that lets a scuffed, half-covered square still get you to the right place. Here is what is really going on, in plain English.

QR Lnkz Editorial6 min read
KEY TAKEAWAYS
  • Three fixed corner squares (finder patterns) let a scanner instantly read a code’s position, size and orientation.
  • A quiet border around a code is essential; crowding it is the most common reason a code will not scan.
  • Error correction stores data redundantly, so a code can lose up to 30% and still scan at the highest level.
  • Most codes hold only a short link, which keeps them sparse, printable small and quick to scan.

A QR code looks like random noise. It is not. Every part of that little square has a job, and once you know what each piece does, it stops being mysterious and starts looking like what it is: a small, robust filing system for data that a camera can read in a fraction of a second.

What are the three squares in the corners of a QR code?

Look at any QR code and you will see three larger squares in three of its corners. These are the finder patterns, and they are the first thing a scanner looks for. Because there are three of them in a fixed arrangement, your phone can work out instantly where the code is, how big it is and which way up it is, even if you hold the camera at an angle or upside down.

That is why you never have to line a QR code up carefully the way you would feed a barcode past a supermarket scanner. The three corners tell the camera everything it needs to orient itself. Smaller alignment squares dotted through larger codes do the same job at finer detail, keeping the grid straight even when the code is printed on something curved, like a bottle or a coffee cup.

There is also a quiet border of empty space that must surround the code, often called the quiet zone. It is not decoration. Without that margin, the scanner cannot tell where the code ends and the busy world around it begins. It is the single most common reason a code that looks fine refuses to scan: someone has crowded artwork right up against its edge.

Why does a damaged QR code still work?

Here is the part that surprises people. You can scribble on a QR code, tear a corner, let it gather a coffee ring, and it often still scans. That is not luck. It is built in, using a technique called error correction that deliberately stores the data more than once, in a spread-out way, so missing pieces can be reconstructed from what survives.

Error correction in action: a code can lose a chunk to a stain or a scratch and still be read, because the data is stored redundantly across the grid.

When a code is created, it is set to one of four correction levels. At the lowest level a code can recover from a small amount of damage; at the highest, it can be read even when close to a third of it is missing or obscured. That top level is exactly why you can drop a company logo into the middle of a QR code and still scan it: the logo is, in effect, controlled damage the code was built to absorb.

30%
How much of a QR code can be damaged or covered while it still scans, at the highest error-correction level.[1]

The trade-off is space. The more redundancy you ask for, the less room is left for actual data, so a heavily protected code holds less or needs to be physically larger. It is a dial, not a free lunch: robustness on one side, capacity on the other.

How much data can a QR code hold?

QR codes come in a range of sizes, from a compact grid of 21 by 21 squares up to a dense 177 by 177. The bigger the grid, the more it can carry. At the largest size a single code can store thousands of characters of text.

4,296
The maximum number of letters and numbers a single QR code can hold at its largest size.[2]

In practice, almost nobody fills a code with thousands of characters, and there is a good reason. The more you cram in, the finer and more fragile the pattern becomes, and the harder it is for a phone to read at a glance or from a distance. Which leads to the most useful idea in the whole design.

Most QR codes you meet do not contain a menu, a form or a video. They contain a short web address, and nothing else. Everything you actually see after scanning lives on a web page; the code just carries the door number. Keeping the encoded data down to a short link is what makes a code sparse, printable small and quick to scan.

It also unlocks something a static code cannot do. If the code holds a short link that passes through a redirect you control, then the printed square never has to change, but where it sends people can. Reprint nothing, and the same code on the same poster can point somewhere new tomorrow. The camera reads the same pattern; the destination behind it is yours to move.

A short link plus a redirect you control is what separates a fixed, print-once code from one whose destination you can change at any time.

Frequently asked questions

What are the three squares in the corners of a QR code?

They are the finder patterns, the first thing a scanner looks for. Because there are three in a fixed arrangement, your phone instantly works out where the code is, how big it is and which way up it is.

Why do QR codes still work when damaged?

They use error correction, which deliberately stores the data more than once in a spread-out way, so missing pieces can be reconstructed from what survives. At the highest of the four correction levels, a code can be read even when close to a third of it is missing or obscured.

How much data can a QR code hold?

Grids range from 21 by 21 squares up to 177 by 177, and the bigger the grid the more it carries. At its largest size a single code can store 4,296 letters and numbers.

Why will my QR code not scan even though it looks fine?

Most often the quiet zone has been crowded; the scanner needs an empty margin to tell where the code ends and the world begins. Leave a clear border roughly the width of four of the code’s own squares.

SOURCES

  1. Denso Wave, Error correction feature
  2. Denso Wave, About QR Code: version and maximum data capacity
  3. Wikipedia, QR code (structure and encoding)
KEEP READING

One code you can re-point any time

Free while in beta, with no card required. Design a branded QR code, route each scan by day or time, and never reprint.

Get started free
All articlesExplore ideas