What Is QR Code Error Correction?
The error correction level of a QR code refers to its ability to still be scanned and recognized correctly even when part of the code is obscured, dirty, or damaged. The higher the error correction level, the larger the range the QR code can "self-repair" — but at the cost of reduced data storage capacity.
How Error Correction Works
A QR code's error correction capability comes from a technology called Reed–Solomon Error Correction.
The principle is:
-
During encoding, in addition to the actual data, extra "redundant information" is added;
-
When scanning detects that some data modules are missing or incorrect, this redundant information can be used to reconstruct the original data;
-
The more redundant information there is, the stronger the QR code's resistance to damage — but the less space is available for actual content.
For example: 123 is encoded as 123123 — as long as part of the QR code image is scanned, the full content can still be read.
Error correction is essentially a trade-off between storage capacity and error correction capability.
Error Correction Levels
The international standard (ISO/IEC 18004) defines four selectable levels:
| Recoverable Ratio | Notes | ||
|---|---|---|---|
| Level | L | 7% | Minimum redundancy, maximum capacity, lowest damage resistance |
| Recoverable Ratio | Notes | ||
|---|---|---|---|
| Level | M | 15% | Balanced option, suitable for most non-obstructed use cases |
| Recoverable Ratio | Notes | ||
|---|---|---|---|
| Level | Q | 25% | More redundancy, stronger damage resistance |
| Recoverable Ratio | Notes | ||
|---|---|---|---|
| Level | H | 30% | Maximum redundancy, strongest damage resistance; commonly used for codes with logos or in complex environments |
CaoLiao's Default Error Correction Rules
Without a Logo
CaoLiao's QR code generator prioritizes keeping the QR code version as small as possible (i.e., keeping the pattern as compact as possible), and automatically selects the error correction level using the following logic:
-
If Q (25%) can be used without increasing the version → Q (25%) is selected
-
If Q (25%) would cause the code version to increase → drops to M (15%) to keep the QR code smaller
-
When content grows further and even M (15%) requires a version increase → reverts to Q (25%), since the version must increase anyway, giving priority to higher error correction
With a Logo
If a logo is embedded in the QR code, CaoLiao defaults to the highest error correction level, H (30%).
The reason:
-
The logo is typically positioned in the center of the QR code, covering some of the key information modules
-
Using the highest error correction level maximizes the ability to compensate for data lost due to the obstruction — improving the QR code's readability and scan success rate
Practical Recommendations
-
Without a logo: the generator automatically switches between 15% and 25%, balancing a compact pattern with scan reliability.
-
With a logo: defaults directly to 30% to ensure readability.
-
Complex environments (printing, outdoors, high-wear surfaces): a higher error correction level (25% or 30%) is recommended.
-
Simple environments (screen display, very long content): a lower error correction level (15%) can be used to reduce the QR code size.