QR Code Error Correction Levels Explained
Understand QR code error correction levels, how L, M, Q and H differ, how redundancy affects QR code size and how to choose the right level.
QR code error correction allows a QR code to remain readable even when part of its data has been damaged, obscured or printed incorrectly. Instead of storing only the original information, a QR code also contains redundant information that a scanner can use to reconstruct missing or corrupted data.
QR codes provide four standard error correction levels: L, M, Q and H. Each level provides a different amount of redundancy. Level L provides the lowest amount of error correction, while level H provides the highest. Choosing the right level is a balance between durability and data density because stronger error correction requires additional codewords and can result in a denser QR code.
What Is QR Code Error Correction?
A QR code is designed to store data in a two-dimensional matrix of modules. During printing, display or scanning, some modules may become unreadable. Dirt, scratches, poor printing quality, glare, distortion or a logo placed over the code can prevent a scanner from correctly reading every module.
Error correction adds redundant information to the QR code so that a decoder can recover some missing or corrupted data. The QR standard uses Reed-Solomon error correction for this purpose. The scanner uses the redundant information to determine what the damaged portion most likely contained.
Original data
↓
Add error correction information
↓
Generate QR code
↓
Part of code becomes damaged
↓
Scanner reads available modules
↓
Error correction reconstructs missing data
↓
Original data recoveredThe Four QR Error Correction Levels
The QR Code specification defines four error correction levels. They are commonly represented by the letters L, M, Q and H. The levels determine how much redundant information is included in the QR code and therefore how much damage the code can potentially tolerate.
| Level | Approximate Recovery Capability | Typical Use |
|---|---|---|
| L | About 7% | Clean indoor environments and high-quality displays |
| M | About 15% | General-purpose applications |
| Q | About 25% | Printed materials or environments with greater exposure |
| H | About 30% | Harsh conditions or designs with limited intentional obstruction |
The percentages describe approximate error correction capability rather than a guarantee that exactly that percentage of the visible QR image can simply be covered. The actual behavior depends on how errors are distributed throughout the symbol and other characteristics of the QR code.
Level L: Low Error Correction
Level L provides the lowest standard error correction level and can recover approximately 7% of codewords. Because less redundant information is required, more of the QR code's available capacity can be used for the original payload.
Level L is appropriate when the QR code is displayed in a controlled environment and is unlikely to become damaged. For example, a QR code shown clearly on a digital interface or printed on high-quality material that is protected from physical wear may not need the additional redundancy provided by higher levels.
- Lowest redundancy among the four levels.
- Provides the greatest data capacity for a given QR version.
- Produces less redundancy than M, Q or H.
- Suitable for clean and controlled environments.
- Useful when keeping the QR matrix relatively simple is important.
Level M: Medium Error Correction
Level M provides approximately 15% error correction capability and is a common general-purpose choice. It offers more protection than Level L while avoiding some of the additional density associated with the strongest error correction levels.
For many ordinary applications, Level M provides a practical compromise between capacity and durability. It can be appropriate for websites, documentation, business materials and other QR codes that need reasonable resistance to scanning imperfections without requiring maximum redundancy.
Level Q: Quartile Error Correction
Level Q provides approximately 25% error correction capability. It adds substantially more redundancy than L and M, making it useful when a QR code may experience more physical degradation or when the design requires a greater tolerance for partial obstruction.
Level Q can be useful for printed advertisements, labels, packaging and other materials that may be exposed to handling or environmental conditions. It can also provide additional flexibility for carefully designed QR codes containing a small visual element.
Level H: High Error Correction
Level H provides approximately 30% error correction capability and is the strongest of the four standard QR error correction levels. It provides the greatest redundancy and therefore the highest theoretical tolerance for damaged data.
Level H can be useful when a QR code is likely to experience significant physical wear or when a design intentionally places a relatively small logo over part of the code. However, choosing H does not mean that any portion of the QR code can safely be covered. Structural patterns and the distribution of damaged modules still matter.
L vs M vs Q vs H
| Level | Redundancy | Approx. Recovery | Best For |
|---|---|---|---|
| L | Lowest | 7% | Clean and controlled environments |
| M | Moderate | 15% | General-purpose QR codes |
| Q | High | 25% | Printed or moderately demanding environments |
| H | Highest | 30% | Harsh conditions and limited visual obstruction |
The difference between the levels is not simply a quality setting. Increasing error correction changes how much of the QR code's capacity is available for the actual payload. A higher level therefore provides additional resilience at the cost of capacity and potentially greater matrix density.
How Error Correction Affects QR Code Capacity
A QR code has a finite number of available modules. Some modules are reserved for structural information, while the remaining capacity is used for encoded data and error correction information. Increasing the error correction level means that more capacity is allocated to redundancy.
As a result, the same payload may require a larger QR version at a higher error correction level. A code that fits into one version at Level L may require a larger version at Level H if the amount of data and other encoding conditions leave insufficient capacity.
| Change | Possible Effect |
|---|---|
| More error correction | More redundant information |
| More redundancy | Less capacity available for payload |
| Less payload capacity | Potentially larger QR version |
| Larger QR version | More modules in the matrix |
| More modules | Potentially denser visual pattern |
Does Higher Error Correction Make a QR Code Larger?
It can. The physical dimensions of a QR code depend on its version, and the required version depends partly on how much data must be stored and how much error correction is selected. A higher error correction level may require a larger version for the same payload.
However, error correction does not automatically mean that every QR image will become physically larger. If the selected QR version already has enough capacity, changing the error correction level may not change the version. The exact result depends on the payload, encoding mode and QR version.
Error Correction and QR Code Density
QR code density describes how much information is represented by the available matrix area. A short URL can produce a relatively simple QR code, while a long text payload can produce a dense matrix. Higher error correction adds additional redundant information and can increase the amount of data that must be represented.
A dense QR code is not necessarily bad, but dense codes generally require more precise printing and sufficient physical size. If a high-error-correction QR code becomes too small, the individual modules may be difficult for cameras to distinguish.
Why More Error Correction Is Not Always Better
It may seem logical to always select Level H because it provides the highest protection. In practice, unnecessarily high error correction can increase QR density and reduce available capacity. If the code is displayed in a clean environment and has no physical damage risk, additional redundancy may provide little practical benefit.
For example, a small QR code displayed on a clean website may work reliably with Level L or M. Selecting H for the same short URL may consume additional capacity without solving an actual problem. The result can be a more complex symbol that provides no meaningful advantage in the intended environment.
Choosing the Right Error Correction Level
The correct level depends on how and where the QR code will be used. Consider the physical environment, expected wear, printing quality, whether the code will be partially covered and how much data needs to be encoded.
| Situation | Suggested Starting Level |
|---|---|
| Clean digital display | L or M |
| General printed material | M |
| Outdoor printed material | Q |
| Labels exposed to handling | Q |
| Potentially damaged surfaces | Q or H |
| Small logo in the QR code | Often H, followed by thorough testing |
These recommendations are starting points rather than universal rules. The final choice should always be validated with the actual QR code, output size, printing method and scanning environment.
QR Codes for Digital Screens
QR codes displayed on digital screens are generally protected from physical damage, so extreme error correction may not be necessary. A clean, high-resolution code with sufficient contrast can often be scanned reliably with moderate error correction.
However, digital screens introduce their own challenges. Brightness, reflections, moiré patterns, scaling and camera focus can affect scanning. A QR code should be tested at the size and screen conditions where users will actually encounter it.
QR Codes for Printed Materials
Printed QR codes are exposed to more variables than digital codes. Printing can introduce small defects, while paper may become folded, scratched, dirty or faded. Outdoor materials can also be affected by moisture, sunlight and general wear.
For these situations, Level M or Q can provide a useful balance. Level H may be appropriate when substantial damage is expected, but the final physical size should be considered because higher redundancy can contribute to a denser code.
Error Correction and QR Code Logos
QR codes are frequently customized by placing a logo or icon near the center. Because this intentionally obscures part of the symbol, error correction becomes particularly important. Level H is commonly selected for this type of design because it provides the greatest standard redundancy.
Even with Level H, the logo should remain small enough that the scanner can recover the encoded information. The logo should also avoid the three primary finder patterns and other critical structural areas.
Error Correction Does Not Replace Good Design
Error correction is only one part of QR code reliability. A code with excellent error correction can still fail if it is too small, has poor contrast, lacks a quiet zone or contains severe geometric distortion.
- Maintain strong contrast.
- Preserve the quiet zone.
- Use adequate physical dimensions.
- Avoid covering finder patterns.
- Use a high-quality image for printing.
- Avoid unnecessary visual effects.
- Test the final QR code under realistic conditions.
Error Correction and the Quiet Zone
The quiet zone is the empty margin surrounding the QR code. It helps scanners distinguish the symbol from its surroundings. Error correction cannot compensate for a missing or heavily obstructed quiet zone because the quiet zone is part of the code's detection environment rather than redundant payload data.
Can Error Correction Fix a Blurry QR Code?
Only to a limited extent. Error correction can recover some missing or incorrectly read information, but it cannot compensate indefinitely for poor image quality. If modules become indistinguishable because the entire QR code is heavily blurred or printed at insufficient resolution, the scanner may not be able to identify the underlying structure correctly.
Increasing physical size and improving print quality is often more effective than simply increasing the error correction level. A clear QR code with moderate error correction is generally preferable to a tiny, heavily redundant code that is difficult for the camera to resolve.
Can Error Correction Fix a Damaged QR Code?
Yes, within limits. If a portion of a QR code is scratched, dirty or covered, the error correction system may allow the scanner to reconstruct the missing information. The exact result depends on the amount and distribution of damage.
Damage concentrated in critical structural patterns can be particularly problematic because these patterns help the scanner locate and interpret the QR code. Therefore, a percentage-based estimate should never be interpreted as permission to cover any arbitrary part of the symbol.
Common Mistakes When Selecting Error Correction
- Always choosing Level H without considering the environment.
- Assuming a 30% error correction level means 30% of the image can be covered.
- Using high error correction while making the QR code unnecessarily small.
- Adding a large logo without testing the final design.
- Ignoring the quiet zone because error correction is enabled.
- Using higher error correction instead of improving poor image quality.
- Failing to test a printed QR code after production.
Best Practices for QR Code Error Correction
- Use Level M as a practical general-purpose starting point.
- Consider Level Q for printed materials exposed to greater wear.
- Use Level H when additional redundancy is genuinely useful.
- Use Level L when the environment is clean and controlled and capacity matters.
- Keep the QR code large enough for the intended scanning distance.
- Preserve the quiet zone regardless of the selected level.
- Avoid covering important structural patterns.
- Test the final QR code with real devices.
- Test customized QR codes more extensively than standard codes.
- Prefer concise payloads when possible.
A Practical Decision Guide
If you are unsure which level to choose, start by evaluating the environment instead of automatically selecting the strongest setting. For a clean digital display, Level L or M may be sufficient. For ordinary printed material, M is a reasonable choice. If the code will experience more physical wear, Q provides additional protection. If a design requires substantial resistance to damage or includes a carefully controlled logo, H may be appropriate.
Clean digital display
↓
L or M
General printing
↓
M
Outdoor / physical wear
↓
Q
High damage risk / customized design
↓
H
Always test the final QR codeFrequently Asked Questions
What are the QR code error correction levels?
QR codes have four standard error correction levels: L, M, Q and H. They provide approximately 7%, 15%, 25% and 30% recovery capability respectively.
Which QR error correction level is best?
There is no universally best level. Level M is a practical general-purpose choice, Q can be useful for more demanding printed environments, and H is appropriate when additional redundancy is needed. L can be sufficient for clean, controlled environments.
Does Level H mean I can cover 30% of a QR code?
No. The approximately 30% figure refers to error correction capability for codewords, not a rule allowing 30% of the visible QR image to be covered. The location and distribution of damage matter.
Does higher error correction make QR codes larger?
It can. Higher error correction uses more capacity for redundant information, which may require a larger QR version for the same payload. The exact result depends on the data and encoding.
Should I always use Level H for a QR code with a logo?
Level H is commonly considered when a logo is used because it provides the most standard redundancy, but the logo must still be kept small and the final QR code must be tested. Error correction does not make arbitrary obstruction safe.
Can QR error correction repair a scratched code?
It can recover some damaged information when the amount and location of the damage remain within the code's correction capability. Severe or strategically located damage can still make the QR code unreadable.
What error correction level should I use for a printed QR code?
Level M is a good general starting point. Level Q can be preferable when the printed code will experience greater wear or environmental exposure. The final choice should be validated using the actual printed output.
Can error correction fix poor contrast?
Not reliably. Error correction helps recover missing or corrupted data after the scanner has successfully detected and interpreted the QR structure. Very poor contrast can prevent the scanner from reading the symbol in the first place.
Helpful QR Code Tools
A QR Code Generator can create QR codes with configurable content and error correction settings, a QR Wi-Fi Generator creates scannable wireless network information, a QR vCard Generator creates contact QR codes, a QR SMS Generator creates QR codes for predefined SMS messages, and a QR Event Generator creates codes containing event information.
Conclusion
QR code error correction is an important part of making QR codes resilient to real-world imperfections. The four standard levels—L, M, Q and H—provide increasing amounts of redundancy, with approximate recovery capabilities of 7%, 15%, 25% and 30% respectively.
The strongest level is not automatically the best choice. Higher error correction can reduce available data capacity and may result in a denser QR code. A practical QR design balances error correction with payload size, physical dimensions, print quality, contrast and the environment in which the code will be scanned.
For most general applications, Level M is a useful starting point. Level Q can provide additional protection for demanding printed environments, while Level H is useful when maximum standard redundancy is needed. Regardless of the selected level, preserving the quiet zone, maintaining strong contrast and testing the final QR code are essential for reliable scanning.