QR Code Error Correction: Choosing L, M, Q, or H
EENTERTAINMENT
EntertainmentPublished: 7 min read

QR Code Error Correction: Choosing L, M, Q, or H

QR Code was developed in 1994 by the team now known as DENSO WAVE and is standardized in ISO/IEC 18004. Its four error-correction levels—L, M, Q, and H—trade data capacity for recovery capability. Increasing the level reduces the capacity of a fixed version; if the data no longer fits, a version with more modules is needed.

This guide uses DENSO WAVE’s public documentation and the standard’s context to explain the trade-off. A stronger level is not a guarantee that any damaged or decorated code will scan.

Japanese original published: 2026-04-20

What the four levels mean

Scroll horizontally if the table does not fit.

LevelApproximate codeword recoveryPossible starting point
L — Low7%Clean display conditions where capacity matters
M — Medium15%General printed material or business cards
Q — Quartile25%Conditions where dirt or wear is expected
H — High30%Prioritizing recovery capability over capacity

These approximate percentages refer to codewords, which are data units. They are not percentages of image area that may safely be covered or destroyed. Damage distribution, function patterns, printing, and the reader all affect the result. Treat the use cases as starting points for testing, not prescriptions for every label or screen.

Reed–Solomon correction works on blocks

Ordinary QR Codes use Reed–Solomon coding over GF(256). A codeword has eight bits. Data codewords are supplemented with correction codewords; the QR encoding procedure uses the remainder from polynomial division. Describing it only as “append values sampled from a polynomial” misses that implementation detail.

For a block with k data codewords and n total codewords, let r = n − k. With e errors of unknown location and s erasures whose locations are known, the correction bound is:

2e + s ≤ r
Errors only: at most floor(r / 2)

This is a block-level condition, not an image-area calculation. Block structures depend on version and correction level. If damage prevents the reader from detecting the function patterns, data correction alone may not recover a readable symbol.

Version, encoding mode, and capacity must be considered together

The main data modes are numeric, alphanumeric, byte, and Kanji. Control modes such as ECI are a separate consideration. Version 1 of an ordinary QR Code has 21 × 21 modules. For one data mode and no additional ECI overhead, its capacities are:

Scroll horizontally if the table does not fit.

ModeUnit or repertoireLMQH
NumericDigits 0–941342717
Alphanumeric0–9, A–Z, space, $ % * + - . / :25201610
ByteBytes, not character count1714117
KanjiCharacters in specified Shift_JIS ranges10874

Lowercase letters are not part of alphanumeric mode. The URL https://example.com/a contains 21 ASCII characters, or 21 bytes. Encoded in byte mode, it exceeds version 1’s L capacity of 17 bytes. A larger version is required. Ordinary QR versions range from 1, at 21 × 21 modules, to 40, at 177 × 177.

The byte row is particularly easy to misread. Non-ASCII UTF-8 characters can take several bytes, and an ECI designator also consumes capacity. Verify the target decoder’s encoding and ECI support. Do not uppercase a URL path just to fit alphanumeric mode: doing so may change the destination.

Raising the correction level does not always increase the version. A short payload can still fit. If the version grows while the physical printed area stays fixed, the individual modules become smaller, creating another readability trade-off.

A logo is intentional damage, not a reserved safe area

Some QR Codes remain readable with an overlaid logo, but an error-correction percentage does not define a safe logo area. The result depends on payload, version, the modules covered, and scanning conditions.

  • Avoid covering finder, timing, alignment, format, or other function patterns.
  • Keep any logo small and do not treat a higher correction level as a scanning guarantee.
  • Test the final print or display size, colors, and margin on multiple intended readers at realistic distances, angles, and lighting.
  • Where scanning is important, provide an undecorated code or another usable way to reach the content.

Testing a large image on a development screen is not equivalent to testing the final label or poster.

Choosing a practical starting level

L may be useful for clean, undecorated displays or when payload capacity matters. M is a common starting point for general printed material. Q and H are worth considering where dirt, wear, friction, or outdoor exposure are expected.

For a warehouse label, long-lived sign, curved package, or other difficult medium, the level is only one part of the design. More correction data cannot compensate for modules that are too small, a badly distorted surface, or an unreadable locator pattern. Choose a level together with payload length, version, physical dimensions, and testing conditions.

These examples are not approval for a particular industrial or regulated use. The final symbol must work with its actual media and readers.

Other factors that affect scanning

  • Quiet zone: leave at least four modules of clear light margin on every side of an ordinary QR Code.
  • Contrast: use a dark foreground and light background, and test colored designs.
  • Module dimensions: make every cell resolvable in the intended print or display conditions.
  • Reflections and focus: check glossy materials, glare, and the camera’s ability to focus.
  • Distance and angle: test the real viewing distance, tilt, and devices.

Error correction does not replace any of these checks. Compare the final delivered symbol, including the quiet zone, rather than just the generated matrix.

Key points

  • L, M, Q, and H provide different data-capacity and correction trade-offs.
  • The approximate 7%, 15%, 25%, and 30% figures concern codeword recovery, not safe damage area.
  • Check capacity for the chosen version and encoding mode, including byte length and ECI overhead.
  • A logo can cover important patterns; there is no universal safe area derived from the level.
  • Preserve the quiet zone, contrast, and module size, and test the final medium.

References and sources

Editorial note

This article was prepared with AI assistance and reviewed by an editor before publication. It may still contain factual errors, interpretation mistakes, or outdated information. Check the cited primary sources or official documentation before making an important decision.

Related articles