QR code error correction: L, M, Q and H tested (with live damage simulator)

QR codes have four error-correction levels — L (~7%), M (~15%), Q (~25%) and H (~30%) — that trade grid size for damage recovery. Use M for plain codes and H for a centre logo or harsh wear. Those percentages count 8-bit codewords, not surface area: in our seeded decode test of 600 clean digital codes with jsQR 1.4.0, a 21×21 code survived a median of only 3 scattered random wrong modules at L and 9 at H (4.3% of data modules), whereas a compact centre square on a 57×57 code at H survived up to 22% of the grid. Scratch a code below to watch each level pass or fail live.

Live QR damage simulator

Enter any link or text, pick a level, then paint directly on the QR code or move the damage sliders. Everything runs in your browser with jsQR 1.4.0; nothing is uploaded.

Drag on the code to paint damage. Red squares mark altered modules. Each level card gets the same strokes at the same spot, as if all four were printed at the same width.

Clean code — decoded by jsQR 1.4.0 at level M

Drag across the code, move the sliders or press “Scratch finder corner” to see where level M (~15%) breaks.

Grid
33×33 (version 4, level M)
Damaged
0 modules
Fixed patterns hit
None
Brush
Brush size

A Qex dynamic link stays 21×21 at level M (25×25 at H) — smaller than 33×33 for the example link — so each module prints wider and the link can be changed later.

Make a free dynamic code for this link →

This simulator decodes clean digital images with jsQR 1.4.0 in your browser. Phone cameras handle blur, glare and angles differently — always print a proof and scan it with real phones.

L, M, Q and H compared

Every QR code uses Reed-Solomon error correction at one of four levels defined in ISO/IEC 18004. Higher levels reserve more codewords for recovery, leaving less room for your content.

The four error-correction levels with measured jsQR 1.4.0 survival on 25×25 and 57×57 codes
LevelStandard codeword recovery25×25 random flips (median)57×57 random flips (median)57×57 centre square (all 25 decoded)Best for
L (Low)~7%5 (1.4%)30.5 (1.1%)15×15 (7%)Smallest grid; least room for damage
M (Medium)~15%9 (2.5%)56 (2.0%)19×19 (11%)Default for plain codes without a logo
Q (Quartile)~25%12 (3.3%)74.5 (2.7%)25×25 (19%)More margin for scuffs, folds and glare
H (High)~30%16 (4.5%)88 (3.2%)27×27 (22%)Most recovery; required for a centre logo

Measured damage tolerance: scattered vs compact

Two patterns of damage behave very differently. Scattered single-module noise (dust, speckles, ink voids) hits many separate 8-bit codewords, while one compact blotch (a centre logo or sticker) concentrates its hits into fewer codewords. Both tables below use Qex’s encoder and jsQR 1.4.0 on clean digital images.

Median random wrong data modules survived before jsQR 1.4.0 failed (30 codes per cell; share of data modules in brackets)
Grid (version)Data + ECC modulesLevel LLevel MLevel QLevel H
21×21 (v1)2083 (1.4%)5 (2.4%)7 (3.4%)9 (4.3%)
25×25 (v2)3595 (1.4%)9 (2.5%)12 (3.3%)16 (4.5%)
29×29 (v3)5677 (1.2%)14 (2.5%)18 (3.2%)22 (3.9%)
41×41 (v6)1,38317 (1.2%)27 (2.0%)43.5 (3.1%)52.5 (3.8%)
57×57 (v10)2,76830.5 (1.1%)56 (2.0%)74.5 (2.7%)88 (3.2%)

Compare that with compact damage: on a 57×57 code at level H, codes survived a median of 88 random wrong modules (3.2% of data modules), whereas in our centre-logo decode test every 57×57 code at H still decoded with a 27×27 centre square (729 modules, 22% of the whole grid) covered. At level L on 57×57, codes survived a median of 30.5 random flips (1.1%) while a centre square survived up to 15×15 (7%).

How we tested (2 December 2026): 600 codes (30 seeded random payloads for each of five grids from 21×21 to 57×57 across L, M, Q and H), encoded with the same encoder Qex uses. For each code, we flipped data and error-correction modules one at a time in a seeded random order — skipping finder, timing, alignment, format and version patterns — drew the grid at 4 pixels per module with a 4-module clear margin, and decoded it with jsQR 1.4.0. A code passed only if the decoded string matched the payload exactly. These are clean digital images and one decoder, not a phone-camera or physical-print test.

Why “30% recovery” is not 30% of the print

  1. One wrong module spoils an 8-bit codeword. QR codes pack data into 8-module codewords. Reed-Solomon repairs whole codewords, so flipping 1 bit inside a codeword costs the same repair budget as ruining all 8 modules of that codeword. Scattered defects spend the budget up to 8× faster than a single compact patch.
  2. Large codes split into interleaved blocks. Bigger QR versions divide codewords across several independent Reed-Solomon blocks (for example, version 10 at H uses 8 blocks: 6 of 43 codewords and 2 of 44). Once any single block exceeds its own error limit, the whole code fails even if the other blocks are untouched. That is why the percentage of random flips survived actually drops slightly from 4.3% on 21×21 to 3.2% on 57×57.
  3. Fixed patterns sit outside Reed-Solomon. The three corner finder squares, the timing lines and the alignment squares have no error correction at all, and the format information has only its own small code (stored twice). Toggle “Highlight fixed patterns” and press “Scratch finder corner” in the simulator above: damaging a few corner modules stops even a level H code from decoding.

The size cost of higher error correction

Stronger error correction is not free. More recovery codewords leave less room for your link, so the encoder moves to a larger grid with smaller squares. Printed at the same physical width, a denser level H code can actually be harder to scan from a distance than a cleaner level M code.

Grid size across L, M, Q and H for real content, measured with Qex’s encoder
ContentCharsLevel LLevel MLevel QLevel H
Qex dynamic link (HTTPS://QEX.ME/AB3XK)2021×2121×2125×2525×25
Short static URL (https://example.com)1925×2525×2525×2529×29
Static URL with campaign tag5833×3333×3337×3741×41
Guest Wi-Fi credentials4429×2933×3333×3337×37
Static contact card (vCard)13441×4149×4957×5761×61

Notice the difference on a tagged link: moving from M to H grows the static grid from 33×33 to 41×41, which needs a wider print for the same scanning distance (see the QR code size calculator). A Qex dynamic short link is uppercase alphanumeric and stays 21×21 at M and 25×25 even at H, whatever destination URL it redirects to. Full capacities for all 40 grids are in QR code versions 1 to 40.

Which level to pick (and what Qex uses)

Questions

What are the four QR code error correction levels?

L (~7%), M (~15%), Q (~25%) and H (~30%). Those percentages are the share of damaged 8-bit codewords Reed-Solomon error correction can rebuild, not a share of the printed area. Higher levels add spare data, which can force a larger grid for the same link.

Which error correction level should I use?

M for most plain QR codes (menus, flyers, business cards, websites), and H when you place a logo in the centre or print on a surface that will scuff or wear. Avoid jumping straight to H on a long static link: it makes the grid denser and every square smaller. Shortening the link or using a dynamic code keeps the grid small even at H. See the QR code size calculator.

Can a level H QR code really still scan with 30% missing?

Only when the damage hits codewords cleanly and avoids fixed locator patterns. In our decode test of 600 codes with jsQR 1.4.0, 21×21 codes at H survived a median of only 9 scattered random wrong modules (4.3% of data modules) and 57×57 codes 88 (3.2%), because one wrong module spoils an entire 8-bit codeword. A compact centre square hits fewer codewords: on 57×57 at H, every test code still decoded a 27×27 square (22% of the grid).

Why does scratching a corner break a level H QR code right away?

Reed-Solomon error correction only covers the data and error-correction region. The three corner finder squares, the alternating timing lines between them and the alignment squares let the scanner find the grid and read its orientation, and none of them has any error correction. Wipe enough of a finder (its centre, as the simulator's “Scratch finder corner” button does) and the scanner cannot locate the code at all, even at level H; a single stray module on a finder often still reads. (The format information has its own small error-correcting code and is stored twice, so it tolerates a little damage.)

Yes, in practice. A centre logo hides modules on purpose, using up part of the error-correction budget before the print even leaves the printer. Qex switches automatically from level M to level H when a logo is enabled, which moves a Qex dynamic code from 21×21 to 25×25. See measured logo sizes.

Is the link I type into the simulator sent to a server?

No. Encoding, damage simulation and decoding with jsQR 1.4.0 run in JavaScript in your browser. Nothing you type or draw leaves your device. The page sends only an anonymous page-load count (and share-button clicks if you share the blank tool).

Keep the grid small even at high error correction

Free dynamic QR code · QR code with logo · QR code size calculator · QR code versions 1 to 40