How a black-and-white square holds more information than you can see
Share
You spill coffee on a printed QR code. A third of it is gone. You hold up your phone anyway — and it scans perfectly. That shouldn't work. So why does it?
Every piece of digital information — a photo, a password, a boarding pass — has to survive the real world: scratched disks, flaky Wi-Fi, wet paper. The field of data and storage is largely about one problem: how do you keep information intact when the world is constantly trying to corrupt it? Different mechanisms solve different parts of that problem. This lesson is about one of the most elegant: error-correcting codes, and the reason a QR code can lose 30% of itself and still tell your phone exactly where to go.
A QR code isn't just a picture of data. It's data plus a deliberate, calculated amount of redundancy. When engineers designed the QR standard in 1994, they built in something called Reed-Solomon error correction — a mathematical technique that encodes the same information multiple times, spread across different parts of the square, in a way that lets a reader reconstruct the whole from any sufficient fragment.
Think of it this way: if you had to send someone a 10-digit phone number by shouting across a noisy street, you might say it twice, or spell it out phonetically, or give them the area code three times. Reed-Solomon does the algebraic equivalent of all of that, automatically, invisibly, inside every QR code you've ever scanned.
Make your call
A QR code at 'Level H' error correction can survive 30% of its surface being destroyed. What do you think that costs?
A
Nothing — the code stays the same size
B
The code gets bigger to fit the extra redundant data
C
The code stores less actual information to make room
QR codes come in four error-correction levels: L, M, Q, and H. Level L can recover from about 7% damage. Level H can recover from 30%. The catch — and here's the tradeoff that shows up everywhere in data storage — is that higher resilience means a bigger, denser square. Level H QR codes have more black-and-white modules crammed into the same grid, because they're carrying more redundant information alongside the original data.
So when you see a QR code with a company logo printed right over the center of it, that's not reckless design. The code was generated at Level H specifically to absorb that logo as if it were damage. The logo covers maybe 20% of the surface. The error correction handles it without breaking a sweat.
Key Insight
Reed-Solomon error correction isn't just in QR codes. It's in CDs, DVDs, deep-space transmissions from NASA probes, and the barcodes on every package shipped by every logistics company on earth. When Voyager 1 sends data from 24 billion kilometers away — with a signal so weak it arrives at 160 bits per second — Reed-Solomon is what makes that signal readable despite the noise. The same math that saves your coffee-stained receipt is keeping contact with the edge of the solar system.
The deeper principle here is that information and redundancy are always in tension. A perfectly compressed file has zero redundancy — every bit carries unique information, and a single corrupted bit can ruin the whole thing. A maximally error-corrected file is the opposite: so much of it is redundant that you could destroy half and still reconstruct the original. Real systems live somewhere in the middle, tuned to the noise level of the environment they're operating in.
Your QR code doesn't know it's going to get a coffee stain. It just carries enough redundancy that when it does, the math already has it covered.
Related threads
Technology
·
Every File Has a Secret Fingerprint
·
any file, one fingerprint…
Every File Has a Secret Fingerprint
Technology
·
How a Two-Hour Movie Fits on Your Phone
·
how a movie fits in your pocket (compression
How a Two-Hour Movie Fits on Your Phone
Technology
·
The Database That Never Forgets a Power Cut
·
the database that survives a power cut…
The Database That Never Forgets a Power Cut
Sources
Images from Wikimedia Commons. Attribution required by license.
QR code damaged
Generated by Grok Imagine (xAI), prompt: Generate a single 16:9 horizontal image for an educational lesson.
Lesson title: "Why a Damaged QR Code Still Works" · How a black-and-white square holds more information than you can see
Domain: tech…
Still readable QR Code, with error correction level "Q" (25%), damaged in 15 bytes of a total 70 split into two blocks. The damage is within the allowed limit of 9 bytes per block of 35. The content is http://en.m.wikipedia.org
QR code for mobile English Wikipedia.svg: brdall.
Original uploader was Brdall at en.wikipedia.
Later version(s) were uploaded by Sertion, Johndrinkwater, Ke4roh at en.wikipedia.
derivative work: Bobmath (talk) · CC0