A QR code can lose a third of its surface to damage and still scan perfectly. That resilience isn't luck — it's one of the most elegant error-correction schemes ever printed on paper, wrapped in a format any phone camera can read in milliseconds.

The anatomy of a QR code

The three big squares in the corners are finder patterns. They let the scanner detect the code at any angle, distance, or orientation — that's why a QR code reads even when photographed sideways. The smaller square near the fourth corner is the alignment pattern, which corrects for perspective distortion on curved or tilted surfaces.

The bigger question behind this post: How to Remain Valuable When Intelligence Becomes Cheap — which human, economic, and strategic advantages stay scarce when AI does the work. A 224-page practical book, $3.84. Read it on Gumroad →

Everything else is modules — the individual black and white cells. A Version 1 code is 21×21 modules; the largest standard version is 177×177. More modules mean more data, up to about 3KB of binary or 4,000 alphanumeric characters.

Error correction: the real magic

QR codes offer four error-correction levels — L (~7% recoverable), M (~15%), Q (~25%), and H (~30%) — powered by Reed–Solomon codes, the same math that protects CDs and deep-space transmissions. The encoder computes redundant symbols from the data and interleaves them across the grid, so a coffee stain destroys scattered fragments of many codewords rather than one contiguous chunk.

This is also why QR codes with logos in the middle work: the logo covers the center, and level-H error correction reconstructs the missing data. Push past ~30% coverage and the code dies — which is why oversized logos on codes are a gamble.

The quiet zone nobody respects

The standard requires a blank margin — the quiet zone — at least four modules wide around the code. Scanners use it to separate the code from its surroundings. Crowded designs that butt text or borders against the code are the most common reason real-world QR codes fail to scan, and the fix is always free whitespace.

Try it yourself

The QR code generator builds codes entirely in your browser — the encoded text or URL never leaves your device, which matters more than people think, since QR contents often include Wi-Fi passwords, tickets, and payment addresses. Generate one, cover a corner with your thumb, and watch the scanner recover it anyway.