Skip to main content
EZQR
Best Practices··Updated Aug 2026

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

TL;DR

QR codes use Reed-Solomon error correction. Level L restores 7% of data bytes, M restores 15%, Q restores 25%, H restores 30%. Use M for almost everything. Only go to Q or H when the code will be dirtied, weathered, curved, or covered by a logo, because higher levels make the code physically denser and a denser code printed at the same size is harder to scan, not easier.

Key Takeaways

  • The four levels recover 7% (L), 15% (M), 25% (Q), and 30% (H) of data bytes, per ISO/IEC 18004 and QR inventor Denso Wave.
  • Higher correction is not free. We encoded the same link at all four levels: a 90-character URL went from 37x37 modules at L to 53x53 at H, a 43% increase per side and roughly double the module count.
  • At a fixed printed size, more modules means each module is smaller. That is why H can scan worse than M on a business card.
  • M is the default for a reason. Denso Wave states it is the level most frequently selected.
  • Go to Q or H for logo overlays, weather exposure, curved surfaces, and industrial settings, and increase the printed size at the same time.

The short answer

Use M unless you have a specific reason not to. It recovers 15% of the data bytes and keeps the code small enough to scan reliably at normal print sizes.

Go up to Q or H in four situations: you are placing a logo over the centre of the code, the code will get dirty or wet, it is going on a curved or flexible surface, or it is going somewhere you cannot reprint easily. Drop to L only when you are encoding a lot of data in a clean indoor environment and the code is already at its size limit.

The part most guides leave out is that raising the level costs you something real. It is not a free safety margin, and the rest of this article measures exactly what it costs.

What error correction actually does

Error correction lets a scanner rebuild the encoded data when part of the code is unreadable. It is not damage tolerance in a vague sense; it is a mathematical guarantee about how many data bytes can be missing before decoding fails.

QR codes implement this with Reed-Solomon error correction, the same family of codes used on CDs and in deep-space transmission. Redundant bytes are computed from your data and stored alongside it inside the pattern. When a scanner reads a damaged code, it uses those redundant bytes to reconstruct what is missing.

The behaviour is standardised in ISO/IEC 18004, the QR symbology specification, so every compliant scanner handles it identically. A code generated by us decodes the same way as one generated by anyone else. That is worth knowing when a vendor implies their codes are more reliable than the standard allows.

One consequence people find surprising: the redundancy is spread across the whole symbol rather than pooled in one corner. Damage concentrated in a single area is handled well, which is why a logo over the centre works at all.

The four levels

There are exactly four levels, and their recovery rates are fixed by the standard rather than chosen by the generator. Denso Wave, which invented the QR code, publishes the reference table.

LevelNameData bytes recoverableTypical use
LLow7%Clean indoor surfaces, large payloads already near the size ceiling
MMedium15%The default for print and screen. Denso Wave notes it is chosen most often
QQuartile25%Logo overlays, outdoor signage, packaging that gets handled
HHigh30%Industrial and factory settings, curved surfaces, harsh weather

Tips

  • These percentages describe data bytes, not surface area. A code is not guaranteed to survive 30% of its physical area being destroyed.
  • The three position-detection squares in the corners are not covered by error correction in the same way. Damage those and the scanner may never find the code to begin with.

What each level actually costs in size

This is the number the reference pages do not give you, so we measured it. We encoded five realistic payloads at all four levels with the same encoder our generator uses, and recorded the resulting module grid.

A module is one square in the pattern. More modules at the same printed size means each square is physically smaller, and small squares are what scanners struggle with.

PayloadCharactersLMQH
Short link2625x2525x2529x2933x33
Type page URL3125x2529x2929x2933x33
URL with UTM tags9037x3741x4149x4953x53
[WiFi credentials](/qr-codes/wifi)4729x2933x3333x3341x41
Short [vCard](/qr-codes/vcard)12241x4145x4553x5357x57

Tips

  • Moving from L to H widened every code by 32% to 43% per side, which is 74% to 105% more modules in total.
  • The penalty grows with payload size. A short link barely changes; a vCard jumps from 41x41 to 57x57.
  • Measured with the same encoder the EZQR generator uses. Reproduce it yourself with any ISO/IEC 18004-compliant library and you will get the same grid sizes.

How we measured this, and how to check it yourself

We encoded each payload four times, once per error correction level, and recorded the module grid the encoder produced. No rendering, no scaling, no design settings; the grid size is a property of the encoded data and the level, so it is deterministic and anyone can reproduce it.

The encoder is the same ISO/IEC 18004-compliant library behind the EZQR generator. Because the standard fixes how versions and error correction blocks are chosen, a compliant encoder anywhere will return the same grid for the same input. If you run the same five payloads through a different library and get different numbers, one of the two is not compliant.

Two things we deliberately did not do. We did not test scan success rates, because that depends on printer, substrate, lighting, and camera, and any number we published would be a property of our test rig rather than of the code. And we did not average across payload lengths, because the size penalty scales with payload and an average would hide the effect that matters.

What the data supports is narrow and reliable: for a given payload, moving up the error correction scale increases the module count, and the increase is larger for longer payloads. What it does not support is a claim that one level scans better than another in the real world. That depends on the printed size you choose afterwards, which is the subject of the next section.

Tips

  • Payloads used: a short link, a type page URL, a UTM-tagged campaign URL, a WPA WiFi credential string, and a six-field vCard.
  • Grid sizes are reported as modules per side, before the quiet zone is added. The quiet zone adds four modules on every edge regardless of level.

Why a higher level can scan worse

This is the counterintuitive part, and it is the reason so many printed codes fail in the field. Error correction protects against damage. It does nothing about resolution, and raising it makes the resolution problem worse.

Picture a code printed at one inch square. At level M with a short link, that inch holds a 25x25 grid, so each module is about one millimetre. Switch to H and the same inch now holds 33x33 modules, so each module drops to roughly 0.77 millimetres. The code did not get safer. It got finer, and the camera has less to work with.

The failure mode this produces is specific and common. Someone puts a logo on a code, bumps error correction to H because that is the advice everywhere, keeps the print size the same, and ends up with a code that scans from four inches instead of twelve. It looks fine on screen at 400 pixels and fails on a table tent.

The rule that resolves it: if you raise the error correction level, raise the printed size too. Our size guide covers the scan-distance maths, and the short version is that printed width should be about one tenth of the intended scanning distance.

The logo question

Most people arrive at this topic because they want a logo in the middle of the code, so it deserves a direct answer.

A centred logo works because it covers a contiguous region the error correction can reconstruct. Keep the logo under roughly 20% of the code area and use Q or H. Above that, you are betting on a reconstruction the standard does not promise.

What actually breaks logo codes is rarely the logo size. It is the combination of a large logo, a long destination URL, and a small print size arriving together. Shorten the URL first, because that shrinks the grid more effectively than anything else you can do. A dynamic code encodes a short redirect rather than a long campaign URL with UTM parameters, which is why dynamic codes tolerate logos better than static ones carrying the same destination.

Contrast matters more than either. A logo in a colour close to the background, or a code printed in two mid-tone colours, fails at any error correction level. Our design guide for logos and dark backgrounds covers the contrast floor, and round and circular designs have their own constraints because rounded modules shrink the effective dark area.

Tips

  • Test the logo version at final print size, not on screen. Screens are far more forgiving than paper.
  • If the logo has to be large, shorten the payload rather than raising error correction. Fewer characters means fewer modules means larger modules.

How to choose, by medium

Match the level to the physical reality of where the code will live, then set the printed size to suit the level you picked.

Where the code goesLevelWhy
Business card, flyer, slide deckMClean, handled briefly, scanned close up
Restaurant [table tent or menu](/qr-codes/menu)MIndoor, short scan distance, gets wiped but not abused
Code with a centred logoQ or HThe logo occludes a contiguous region
Product [packaging](/blog/qr-code-packaging-labels-guide)QHandled, scuffed, sometimes curved
Outdoor signage and [billboards](/blog/qr-codes-for-billboards-2026)QWeather and distance, and reprints are expensive
Industrial labels, warehouse, workshopHDirt, abrasion, chemicals
Curved bottles and cylindersHPart of the code is always at an angle
Large payload already at the size ceilingLOnly when the environment is clean and controlled

Mistakes worth avoiding

The pattern behind most of these is treating error correction as a substitute for print quality. It is not; it is insurance against damage after printing.

Tips

  • Raising the level without raising the print size. This is the most common error and it makes scanning harder, not easier.
  • Using H everywhere by default. It costs modules on every single code for a benefit most of them never need.
  • Encoding a long UTM-tagged URL directly into a static code, then trying to fix the resulting density with error correction. Shorten the payload instead.
  • Assuming 30% recovery means 30% of the physical code can be destroyed. It refers to data bytes, and the corner position markers are a separate vulnerability.
  • Testing only on screen. A code that scans from a monitor at 400 pixels can fail on a printed card at the same nominal size.
  • Printing in low contrast and blaming the error correction level when it fails.

Setting the level when you generate

Every code the EZQR generator produces uses a sensible level by default, and the design step lets you raise it when the situation calls for it. Because the choice interacts with size, the practical sequence is to pick the level, generate, then check the result at the size you will actually print.

Export as SVG or PDF for anything going to print. Vector output scales to any dimension without the softening that kills scan reliability at large sizes, and softening is a resolution problem that no error correction level will rescue.

If you are producing many codes at once, set the level once and apply it across the batch with bulk CSV import rather than adjusting each code by hand. For the wider set of pre-print checks, the best practices guide covers contrast, quiet zone, and scan testing.

FAQ

What are the four QR code error correction levels?

L, M, Q, and H. They restore approximately 7%, 15%, 25%, and 30% of data bytes respectively, as defined in ISO/IEC 18004 and documented by QR inventor Denso Wave.

Which error correction level should I use?

M for almost everything. Move to Q or H when the code carries a centred logo, goes outdoors, sits on a curved surface, or lives in a dirty environment. Use L only for large payloads in clean indoor settings.

Does error correction level H make a QR code more reliable?

Only against damage. H also makes the code denser, and at a fixed printed size a denser code is harder to scan. In our measurements H was 32% to 43% wider per side than L for the same payload.

Does higher error correction make the QR code bigger?

Yes. We encoded a 90-character URL at every level: 37x37 modules at L, 41x41 at M, 49x49 at Q, and 53x53 at H. Denso Wave states the same relationship, that raising the level increases the code size.

What error correction level do I need for a logo?

Q or H, with the logo kept under roughly 20% of the code area. Shortening the destination URL helps more than raising the level, because a shorter payload produces a coarser, more scannable grid.

What is the smallest QR code?

Version 1, a 21x21 module grid. QR versions run from 1 to 40, with version 40 at 177x177 modules. The version needed depends on your payload length and the error correction level you choose.

How much data fits in a QR code?

At the maximum version 40 with level L, a QR code holds up to 7,089 numeric characters, 4,296 alphanumeric, 2,953 bytes, or 1,817 Kanji. Higher error correction levels reduce those ceilings.

Can I change the error correction level after printing?

No. The level is encoded into the pattern itself, so changing it means generating and reprinting a new code. What you can change without reprinting is the destination, and only if the code is dynamic.

Do all scanners support all four levels?

Yes. The levels are part of ISO/IEC 18004, so any compliant scanner, including every modern phone camera, reads all four without configuration.

More From This Category

Related Articles

Written by

Tasnim Ahmed
Tasnim Ahmed

Founder, EZQR

Tasnim Ahmed founded EZQR and writes its guides on QR code strategy, print workflows, and the specifications behind whether a code actually scans.

Ready to create your QR code?

No signup for static codes. Dynamic codes start at $5/mo. No watermarks, no expiry.

Create a QR code