People often say a QR code still reads with 30% missing, but in practice the same missing area can succeed or fail depending on where it is and how it is spread. The reason lies in how the data is laid out and how error correction is computed per block. This article draws the line between damage that is recoverable and damage that is not.
Only the data region can be recovered
QR code error correction protects only the data codewords and the error correction codewords. The function patterns are not covered: the corner finder patterns, the timing patterns and the alignment patterns cannot be reconstructed by computation. Worse, if they are destroyed the reader never locates the symbol, so recovery never even starts.
In other words, "level H survives 30% loss" is a statement about the data region, not about the total area of the symbol. What each function pattern does, and what its damage looks like, is covered in What the Corner Squares of a QR Code Do.
Correction works on codewords, not on bits
This is the single most important fact when reasoning about recoverability. A QR code handles data in codewords of 8 modules (8 bits), and Reed-Solomon correction operates per codeword.
Several consequences follow:
- Whether one bit or all eight bits of a codeword are damaged, the correction budget consumed is the same: one codeword.
- Conversely, for the same total damaged area, scattered damage is worse, because thin damage spread over many codewords still counts as one codeword each.
- Eight pen-tip specks can consume more correction capacity than a single large blot of the same total area.
The order in which data is laid out
Codewords are placed starting at the bottom-right corner, moving upward in two-module-wide columns; on reaching the top the placement shifts two columns to the left and moves downward, and so on in a boustrophedon zigzag. Modules occupied by function patterns are skipped, and column 6, which holds the vertical timing pattern, is skipped entirely.
Demo: the path codewords follow
A version 2 QR code is generated in your browser, with the placement path of the data and error correction codewords drawn as a red line. The grey and navy modules are reserved areas such as function patterns, which the path routes around. The orange and blue bands mark each codeword of 8 modules.
As the diagram shows, codewords that are adjacent in sequence are also adjacent physically. That is the straightforward arrangement, but on its own it is a weakness: a single concentrated blot would destroy a run of consecutive codewords.
Block splitting and interleaving
Block splitting and interleaving close that gap. From larger versions onward, the data codewords are divided into several blocks, and error correction codewords are computed independently for each block. When the codewords are placed in the symbol, one is taken from each block in turn and they are laid down alternately. That is interleaving.
The effect is that physically adjacent codewords belong to different blocks. Even a large blot over one part of the symbol spreads its damage thinly across several blocks, so each block is more likely to stay within its correction capacity. The design exists precisely to avoid concentrating damage in one block until that block becomes unrecoverable.
| Version / level | Blocks | Data codewords | Error correction codewords |
|---|---|---|---|
| 1 / L | 1 | 19 | 7 |
| 1 / M | 1 | 16 | 10 |
| 1 / H | 1 | 9 | 17 |
| 5 / Q | 4 | 62 | 72 |
| 10 / M | 5 | 216 | 130 |
| 10 / H | 8 | 122 | 224 |
| 40 / L | 25 | 2,956 | 750 |
| 40 / H | 81 | 1,276 | 2,430 |
Version 1 has a single block at every error correction level. Small QR codes are fragile against damage concentrated in one spot precisely because there are no other blocks to spread it into. At the other extreme, version 40 at level H is divided into 81 blocks.
Recoverability by where the damage is
| Type of damage | Chance of recovery | Why |
|---|---|---|
| One corner finder pattern destroyed | Close to hopeless | Function patterns are not covered; detection itself fails |
| No quiet zone, code touching the background | Low (though adding margin in an image editor sometimes works) | The ratio test breaks and the code is not detected |
| One concentrated blot over the data region | High | Interleaving spreads it across several blocks |
| Fine speckling all over the code | Lower than the area suggests | Counting is per codeword, so little area consumes many codewords |
| A large area missing from the bottom right toward the centre | Moderate | It is data region, but a large loss can exceed each block's capacity |
| Inverted or washed-out colours | High | No information is actually lost; binarization or inversion restores it |
When attempting recovery from a real image, the fastest route is to first separate information that is genuinely lost from information that was merely captured badly. Bleeding, blur and low contrast are capture problems, and image processing has a good chance of undoing them. Only physical tearing or over-painting is a job for error correction.
Free Tool Try recovery with QR Code Photo Restore Enhance, binarize and deblur a photographed QR code, retrying automatically until it decodes. Free Tool Measure the limit with the QR Error Correction Tester Hide parts of a QR code and see for yourself how far each error correction level keeps decoding.Summary
- Error correction covers the data region only; function patterns (corners, timing, alignment) are excluded.
- The unit of correction is one codeword of 8 modules, so one damaged bit costs the same as eight.
- For the same damaged area, finely scattered damage therefore tends to be worse than a single blot.
- Codewords are placed in a zigzag from the bottom right, and larger versions split them into interleaved blocks.
- Thanks to interleaving, one concentrated area of loss is spread across blocks and is easier to survive.
- Damage whose position is known (erasure) can be corrected at twice the rate of damage whose position is unknown.
Frequently Asked Questions
How much of a QR code's area can be missing and still be recovered?
Area alone does not decide it. Error correction protects only the data region; function patterns such as the corner finder patterns are excluded. Reed-Solomon also corrects in units of one codeword of 8 modules, so for the same area, finely scattered damage consumes more codewords and is worse.
Why is a QR code resistant to one concentrated blot?
Because the data codewords are divided into several blocks and are laid down one from each block in turn, which is called interleaving. Physically adjacent codewords therefore belong to different blocks, so the damage from a concentrated blot is spread across several blocks.
How many codewords can one block correct?
When the positions of the errors are unknown, up to about half of that block's error correction codewords. When the damaged positions are known, which is called erasure, up to as many codewords as there are error correction codewords. In the smallest versions a few are reserved to guard against misdecoding, so the real figure is slightly below half.
What can be done if a corner finder pattern is missing?
Error correction cannot recover it. Function patterns are outside the scope of correction, and without them a reader cannot detect the symbol at all. Unless the corners can be redrawn in an image editor, obtaining the original QR code again is the reliable option.