Techâ—Źâ—Źâ—Źâ—Źâ—ŹDifficulty 3 of 5

How can a QR code still work when part of it is missing?

Scratch it, smudge it, stick a logo in the middle: up to 30% of a QR code can be ruined and your phone still reads it.

â–¶ Start the story

A QR code keeps working when part of it is missing because it stores extra, cleverly calculated data on purpose. Alongside your message, it carries error-correction bytes computed with a mathematical recipe called Reed–Solomon coding. When some squares are smudged, torn or covered, the reader uses those extra bytes to work out what the missing parts must have been.

How much damage it can take is a choice. QR codes come with four levels of protection: L can recover about 7% of the code, M about 15%, Q about 25% and H about 30%. There is a trade-off: the more protection you add, the less room is left for the message. Denso Wave, the company that created the code, suggests Q or H for dirty factory floors, L for clean places with lots of data, and notes that M is the most common choice.

How much of a QR code can be recovered

%

Bar chart: How much of a QR code can be recovered. (%)
Recoverable share
L7%
M15%
Q25%
H30%
The four error-correction levels. More protection means less room for the message.

This is also why so many QR codes have a logo stuck in the middle. The reader simply treats the logo as damage and repairs around it.

The code was invented in 1994 by Masahiro Hara at Denso Wave to label car parts. His square pattern was inspired by the black and white stones of the board game Go, and the three big squares in the corners use a black-white rhythm chosen because it is rare on printed paper, so a camera can find them instantly. The same Reed–Solomon maths had already been used by the Voyager space program and on music CDs.

Quiz me

0/3

  1. 1.Why can a QR code still be read when some of its squares are damaged?
  2. 2.What is the trade-off when you choose level H (about 30%) instead of level L (about 7%)?
  3. 3.Why are the three big corner squares designed with a 1:1:3:1:1 black-white pattern?

Recap

More error correction means more damage tolerated but less room for data: L 7%, M 15%, Q 25%, H 30%.

Surprising fact · The logo in the middle of many QR codes is read as damage, and the error correction simply repairs around it.

Sources (5)

No source, no claim. Every fact in this lesson (16 claims) cites at least one of these.

  1. [1]QR code · Wikipedia
  2. [2]Error correction feature · DENSO WAVE
  3. [3]Reed–Solomon error correction · Wikipedia
  4. [4]History of QR Code · DENSO WAVE
  5. [5]Code QR · Wikipédia
More lessons in 💻 Tech (3) See all tech lessons →

One more light on your map.

Get one lesson like this every day, about the things you love. Free, in two or five minutes.

Get the share card for this lesson ↗