QR Code Error Correction Levels: L, M, Q and H Explained

What QR error correction levels L, M, Q and H actually protect, how they change a code's size and capacity, and which one to pick for print, screens and logos.

Every QR code generator has an error correction setting, usually a dropdown with four letters and no explanation. It controls how much of the code can be scratched, smudged or covered before it stops scanning, and it is paid for in size: more protection means a denser code for the same content. Picking the right level is the difference between a code that scans from across a room and one that needs the phone pressed against it.

Try the levels on your own content below. The tool shows the code's version, which is its grid size, so you can watch it grow as you raise the level. It runs in your browser, so nothing you encode is uploaded.

QR Code GeneratorGenerate a QR code for a URL, text or Wi-Fi network and download it as PNG or SVG. Everything happens in your browser, so nothing is uploaded and the code never expires.

The four levels

LevelCan recover roughlyTypical use
L (Low)7%Codes on screens, or very long content where size matters most
M (Medium)15%The default; most printed codes
Q (Quartile)25%Codes that get handled, folded or worn: packaging, labels, outdoor signs
H (High)30%Codes with a logo over the middle, or harsh environments

The percentages are the share of the code's data that can be wrong or missing and still be reconstructed. The code itself does not get any tougher. Instead it stores extra redundancy (Reed-Solomon error correction, the same family of codes used on CDs and in deep-space links), and the scanner uses that redundancy to rebuild whatever it could not read.

What the redundancy costs

A QR code comes in 40 fixed sizes, called versions. Version 1 is 21 by 21 modules (the small squares), and each version adds 4 modules per side, up to 177 by 177 for version 40. A generator picks the smallest version whose capacity, after the error correction is reserved, fits your content.

So raising the level does not make the same grid stronger. It makes the generator move up to a bigger grid. Here is the same 50-character URL, https://example.com/menu?table=12&utm_source=print, at each level:

LevelVersionGrid
L329 × 29
M433 × 33
Q537 × 37
H641 × 41

When the code is printed at a fixed size, a bigger grid means smaller modules. With the required 4-module quiet zone on each side, a 3 cm code at level L has modules about 0.8 mm across, while the same code at level H has modules about 0.6 mm across. Smaller modules need a sharper print, a steadier hand and a closer phone. Error correction is protection bought with scanning distance.

Capacity at the extremes shows the same trade-off:

LevelVersion 1 (21 × 21)Version 40 (177 × 177)
L17 bytes2,953 bytes
M14 bytes2,331 bytes
Q11 bytes1,663 bytes
H7 bytes1,273 bytes

Those are byte-mode limits, which apply to URLs and most text. Level H holds less than half of what level L holds in the same grid.

What error correction does not protect

The redundancy covers the data area. Some parts of the code are structural, and a scanner that cannot read them never gets as far as decoding:

  • The three finder patterns, the large squares in the corners, are how the scanner finds the code and its orientation. Cover one and the code usually fails at any level.
  • The quiet zone, the blank margin around the code, is how the scanner separates the code from its surroundings. The specification asks for 4 modules. Trimming it to fit a layout is the most common reason a printed code fails, and no error correction level compensates for it.
  • Contrast. Error correction repairs a code where some modules were misread. It cannot repair one where most of them are ambiguous because of a low-contrast color scheme, a busy background or glare on a glossy surface.

Which level to choose

  • On a screen (a slide, a login page, a checkout display), use L or M. Screens do not get scratched, and the larger modules make the code easier to scan from a distance or at an angle.
  • For most print, such as flyers, business cards and table cards, use M. It handles ordinary smudges and slight blur, and it is the default for good reason.
  • For codes that get handled or live outdoors, such as product labels, stickers on equipment and shipping boxes, use Q.
  • With a logo in the middle, use H, and treat the logo as damage that has already used part of the 30%.
  • For a code that is already at a high version, lower the level before anything else. At version 10 and above, a drop from H to M can save several versions and make the code noticeably easier to scan.

Shrinking the content beats lowering the level

Error correction is one of two things that set a code's size. The other is how much you encode, and that is usually the easier one to change.

  • Remove tracking parameters you do not need. utm_source=print&utm_medium=flyer&utm_campaign=autumn-2026 adds 58 characters, which takes https://example.com/menu from version 2 to version 5 at level M.
  • Use a short path that redirects. https://example.com/m that redirects to the full menu URL gives a small code at level H, and you can change the destination later without reprinting.
  • Do not percent-encode what does not need it. A URL that has been encoded twice (%2520 instead of %20) is longer and may also be broken. Check it before encoding.
URL Encoder & DecoderPercent-encode text for use in a URL, or decode it back. Choose whether you are encoding one query value or an entire URL, because the two need different escaping.

A short URL at level Q or H usually scans better than a long URL at level L, because it gets both the redundancy and the larger modules.

Quick reference

SituationLevel
Shown on a screenL or M
Ordinary printM
Handled, outdoors, on packagingQ
Logo over the middleH
Long content and a high versionLower the level, then shorten the content
Fails to scan at any levelCheck the quiet zone, contrast and print size first

Try the tools