InformationWhy a Damaged QR Code Can Still ScanThe extra pattern that lets missing data return
Infographic

Why a Damaged QR Code Can Still Scan

The extra pattern that lets missing data return

After this edition, you can… Separate finder and layout patterns from message data Explain how Reed - Solomon redundancy reconstructs damaged codewords Describe the tradeoff between correction level, capacity, and symbol size

AI-assisted edition · Educational review score 96%

Prefer a continuous page?Read the text edition and sources
8 minute educational book

Why a Damaged QR Code Can Still Scan

The extra pattern that lets missing data return

Created by Bob · AI-assisted and reviewed before publication

What you will learn

  • Separate finder and layout patterns from message data
  • Explain how Reed - Solomon redundancy reconstructs damaged codewords
  • Describe the tradeoff between correction level, capacity, and symbol size
Page 1 of 5

A Stain Removes Information

A QR Code is a grid of light and dark modules; the small squares that make up the symbol. A camera doesn't see abstract data first; it sees an image affected by angle, blur, glare, dirt, and missing patches. The three large finder patterns near the corners help a reader locate the symbol and determine its orientation.

Other fixed patterns and format information help establish the grid and explain how it should be interpreted. These structures aren't backup copies of the message. They are landmarks. If a stain covers actual data modules, some encoded information is gone from the image. Successful recovery requires something extra to have been stored before the damage occurred.

A dark stain erases a cluster of modules, turning some encoded symbols into missing or incorrect information.
A dark stain erases a cluster of modules, turning some encoded symbols into missing or incorrect information.
Page 2 of 5

The Grid Holds Organized Codewords

The message is converted into bits and packed into codewords, units of eight bits for QR error-correction purposes. The chosen character mode, message length, QR version, and correction level all influence how much room is required. Standard QR versions range from a 21-by-21-module grid to much larger symbols, adding modules as capacity grows.

Data and correction codewords are placed through the available grid according to defined rules instead of written as a tiny picture of the original text. That organization lets different compliant readers make the same interpretation. It also sets up the central bargain: modules used for recovery information can't simultaneously carry more of the original message.

Finder patterns, timing patterns, format information, data codewords, and error-correction codewords occupy distinct jobs in one QR grid.
Finder patterns, timing patterns, format information, data codewords, and error-correction codewords occupy distinct jobs in one QR grid.
Page 3 of 5

Redundancy Makes Reconstruction Possible

Before the modules are drawn, the encoder calculates additional Reed - Solomon codewords from the data. These are structured mathematical redundancy, not simple duplicates. When some read codewords are wrong or missing, the relationships among the surviving data and correction codewords can identify and reconstruct a limited number of errors.

Reed - Solomon coding works at the codeword level and is well suited to burst damage, where neighboring parts of a symbol are obscured together. The decoder isn't guessing what a URL probably said. It's solving for values that satisfy the encoded relationships. Recovery is possible because the clean symbol deliberately contained more information than the message alone required.

Interleaved data and Reed-Solomon recovery codewords allow a scanner to reconstruct a limited number of damaged symbols.
Interleaved data and Reed-Solomon recovery codewords allow a scanner to reconstruct a limited number of damaged symbols.
Page 4 of 5

More Recovery Means Less Payload

QR Codes offer four standard correction levels. Level L can restore roughly 7 percent of total codewords, M about 15 percent, Q about 25 percent, and H about 30 percent under appropriate conditions. A higher level adds more correction information. For the same message, that may require a larger version with more modules; for a fixed symbol size, it leaves less room for payload.

The percentages aren't a promise that any equal fraction of the printed square may be cut away. Damage to crucial locating information, widespread blur, poor contrast, or too many affected codewords can still prevent a scan. Correction capacity describes codewords, while real damage interacts with the layout and the camera image.

Four error-correction levels trade increasing damage tolerance for decreasing payload capacity within a similarly sized symbol.
Four error-correction levels trade increasing damage tolerance for decreasing payload capacity within a similarly sized symbol.
Page 5 of 5

Scanning Is a Chain of Tests

A reader first finds the corner patterns, estimates orientation and scale, and maps camera pixels onto the module grid. It uses structural and format information to learn the version and correction setting, unmasks the data region, extracts codewords, and finally applies error correction before decoding the message. A clear quiet zone around the symbol helps the reader separate the code from surrounding graphics.

Each stage can fail before Reed - Solomon recovery even begins. This explains why an artistically altered code might scan on one phone and fail on another despite a high correction level. Error correction is powerful, but it lives inside a larger visual and mathematical system whose landmarks, contrast, spacing, and payload all have jobs.

Scanning proceeds through locating the square, correcting perspective, sampling modules, unmasking bits, correcting errors, and decoding payload.
Scanning proceeds through locating the square, correcting perspective, sampling modules, unmasking bits, correcting errors, and decoding payload.

Key takeaways

  • Corner patterns help locate and orient the symbol; they don't duplicate the payload
  • Recovery works because correction codewords encode mathematical relationships
  • A percentage of recoverable codewords isn't the same as a guaranteed removable area

Check your understanding

What do the three large corner patterns primarily do?
They help the reader locate the QR Code and determine its orientation.
Why can missing codewords sometimes be reconstructed?
Reed - Solomon correction codewords preserve mathematical relationships with the original data.
What is the cost of choosing a higher correction level?
More modules carry correction information, reducing payload capacity or requiring a larger symbol.

Sources

These references were used to check the important factual claims in this edition.

  1. DENSO WAVE — What Is a QR Code?
  2. DENSO WAVE — Error Correction Feature
  3. DENSO WAVE — Versions and Capacity
  4. DENSO WAVE — Determining the Code Area