Skip to content
Minute Campus.

Everyday computer scienceLesson 031 min

How does a QR code still work when part of it is damaged?

A QR code holds your data plus extra squares worked out from it. Like three numbers and their total, smudge one and you can recover it from the rest. QR codes use a much stronger version, Reed-Solomon error correction, which can rebuild scratched or missing patches. The maker picks one of four protection levels, from about seven to thirty per cent. More protection means more squares.

Remember

A QR code survives damage because it carries extra squares built for repair.

Transcript

The lesson, word for word.

Read it at your own pace, or search the page for a term.

You can cover up to about thirty percent of a QR code, and it can still scan. That is by design. A QR code does not only hold your link. It also holds extra squares, worked out from the data with some clever maths. Here is the idea in small. Write down three numbers, and then a fourth: their total. Smudge any one of the four, and you can work out what it was from the other three. A QR code uses a much stronger version of this, called Reed-Solomon error correction. It can rebuild whole patches that are scratched, dirty or missing. Whoever makes the code chooses how much protection to add. There are four levels, from about seven percent up to about thirty. More protection means more squares. It is how a logo can sit in the middle of a QR code. The scanner treats the logo as damage, and repairs it.

Questions? Comment on the lesson on YouTube

New lessons every day.

Follow Minute Campus where you already scroll.