CIRCULATEQR

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

By the CirculateQR team · Updated · 6 min read

Short answer

Error correction lets a QR code be read even when part of it is damaged, dirty or covered. The QR standard has four levels: L restores about 7% of the code’s data, M about 15%, Q about 25% and H about 30%. Higher levels add redundant data, so the same content needs more, smaller modules. Use M for most printed codes, Q or H where codes get scuffed or sit outdoors, and H when a logo covers part of the code.

On this page
  1. What does QR code error correction actually do?
  2. Why does a higher level make the code denser?
  3. Which error correction level should you use?
  4. How big can a logo on a QR code be?
  5. What can error correction not fix?
  6. How does error correction apply to artistic and AI QR codes?
  7. Frequently asked questions

Key facts

  • Levels and approximate recovery capacity: L 7%, M 15%, Q 25%, H 30% of codewords (ISO/IEC 18004).
  • The level is stored in the code’s format information, so phones detect it automatically; nobody needs to choose it when scanning.
  • Higher levels make denser codes: a 31-character URL is 25 × 25 modules at L but 33 × 33 at H.
  • Error correction uses Reed–Solomon codes. It protects the data area, not the three large finder squares, which must stay intact.
  • Logos work because of error correction. A centered logo a quarter of the code’s width covers about 6% of its area.
  • Maximum capacity falls as the level rises: version 40 holds 2,953 bytes at L but 1,273 at H.

What does QR code error correction actually do?

A QR code stores your content as a sequence of 8-bit codewords. Alongside those data codewords, the generator adds error correction codewords calculated with Reed–Solomon coding, the same family of codes used on CDs and in deep-space communication. When a scanner reads the code, it uses that extra data to detect and rebuild codewords that came out wrong because of a scratch, a smudge, glare, a fold or a logo sitting on top.

The four levels set how much of the code is spent on that redundancy. The percentages describe how much of the data can be restored, measured in codewords, not in area:

Approximate share of codewords each error correction level can restore: L 7%, M 15%, Q 25%, H 30%L≈ 7%M≈ 15%Q≈ 25%H≈ 30%
Approximate recovery capacity per level, as given in ISO/IEC 18004. The exact figure varies slightly by version.

Because each codeword is made of 8 modules, a small mark that touches several codewords can use up more of the budget than its size suggests. Treat the percentages as an upper limit, not a target.

Why does a higher level make the code denser?

Redundancy takes space. For the same content, a higher level needs more codewords in total, so the generator moves up to a larger QR version with more modules. Here is the same 31-character link, encoded four times with the open-source encoder CirculateQR uses:

Level L · 25 × 25

Level M · 29 × 29

Level Q · 29 × 29

Level H · 33 × 33

The same link (https://example.com/spring-menu) at each level. More error correction means more modules across.

Printed at the same size, the level H version has smaller modules than the level L version, so it needs to be printed larger to scan from the same distance. That is the real cost of error correction. For the details on module size and distance, see the QR code size guide.

Maximum capacity of the largest QR code (version 40, 177 × 177 modules)
LevelNumeric digitsAlphanumericBytes (e.g. URLs)
L7,0894,2962,953
M5,5963,3912,331
Q3,9932,4201,663
H3,0571,8521,273

Those are theoretical maximums. A version 40 code is far too dense for a phone to read at any normal print size; real-world codes for phones are usually version 10 (57 × 57) or smaller.

Which error correction level should you use?

LevelGood forAvoid when
L (7%)Codes shown on screens, or holding a lot of data in a small space in clean conditionsPrint that will be handled, folded or exposed to weather
M (15%)Most printed marketing: flyers, menus, cards, posters indoorsA logo covers part of the code
Q (25%)Packaging, labels and signs that get scuffed, wet or dirtySpace is very tight and the content is long
H (30%)Codes with a logo or artwork, outdoor and industrial useThe code must be very small and holds a lot of data

A sensible default is M. Move up a level when the environment is rough or when you plan to cover part of the code. Move down only when you are short of space and the conditions are clean. If your content is long, consider a dynamic code first: a short link leaves plenty of room for a higher level without making the code dense.

How big can a logo on a QR code be?

A logo in the middle of a code hides modules, and error correction has to rebuild whatever they held. That is why logo codes should use level H. Some practical limits:

  • Mind the area, not the width. A logo a quarter of the code’s width covers about 6% of its area (0.25 × 0.25). A logo a third of the width covers about 11%.
  • Stay well inside the budget. Partly covered codewords count as damaged, so a logo uses more of the 30% budget than its area alone. Leave headroom for real-world wear, glare and printing errors.
  • Never cover the finder patterns, the three large squares in the corners. Reed–Solomon coding does not protect them, and scanners need them to locate the code.
  • Remove the modules under the logo and give it a clean background, rather than laying a semi-transparent image over the pattern, which confuses scanners.
  • Test every version with several phones before printing. A logo that works at 5 cm may fail at 2 cm.

What can error correction not fix?

Error correction repairs damaged data. It does not rescue a code that a camera cannot find or resolve:

  • Too small or too far away. If the modules blur together, every codeword is damaged.
  • Low contrast. Pale colors, gloss glare or a busy background affect the whole code at once.
  • A missing quiet zone. Without the blank margin the scanner may not find the code’s edges.
  • Damaged finder patterns. Lose one of the three corner squares and many scanners give up.
  • A wrong destination. A perfectly readable code pointing at a dead page is still a broken code. A dynamic code lets you fix the destination after printing.

How does error correction apply to artistic and AI QR codes?

Artistic codes bend the look of the modules, and error correction absorbs some of that. But a design that changes many modules at once can exhaust the budget quickly, and a higher level also means more, smaller modules for the art to work around. That is why a lower level with fewer, larger modules is sometimes easier to turn into a readable picture, as long as the result is checked with a real decoder.

In CirculateQR, plain and logo codes always use level H. For AI art, a density setting chooses the level: low (L), standard (M, the default) or high (H). Every AI image is then decoded automatically, and if the code cannot be read, the true pattern is redrawn into the artwork and checked again. The full process is in AI QR code art: how it works and how to make sure it scans, and the plans that include AI art are on the pricing page.

Frequently asked questions

Which QR code error correction level is best?

For most printed codes, M (about 15% recovery) is the best balance between robustness and density. Use Q or H for codes that will be scuffed, wet or outdoors, and H whenever a logo covers part of the code. Use L only when space is tight and conditions are clean, such as codes shown on a screen.

Does a higher error correction level make a QR code easier to scan?

It makes the code more tolerant of damage, but it also adds modules, which makes each module smaller at the same print size. If the code is small or scanned from a distance, a higher level can make it harder to read. Increase the print size when you increase the level.

Can I change the error correction level of a printed QR code?

No. The level is fixed when the code is generated and is part of the printed pattern. To change it you need a new code. If the code is dynamic, the new code can point to the same short link destination, so nothing else has to change.

What does the 30% in level H mean?

About 30% of the code’s codewords can be wrong or missing and the scanner can still rebuild the content. It refers to data codewords, not to visible area, and it does not cover the three finder squares in the corners, so a 30% logo is not safe.

Do I need to tell the phone which level a code uses?

No. The level is recorded in the code’s format information, which is printed twice in every code for safety. Phone cameras and scanner apps read it automatically.

Last updated . Written by the CirculateQR team. Spotted something wrong or out of date? Email support@circulateqr.com.

Add a logo without breaking the code

CirculateQR makes logo codes at level H and keeps the logo clear of the finder patterns. Test the result with your own phone before printing.