Printed a code and need to change the link? QR Gen makes codes you can edit later.Edit codes after printing with QR Gen.See QR Gen

Open on your phone

QR code error correction levels L, M, Q and H

QR code error correction levels L, M, Q and H explained with measured sizes for the same link, plus what 30% really covers and which level to pick.

Use level M unless you have a reason not to. QR code error correction comes in four levels, L, M, Q and H, which repair about 7%, 15%, 25% and 30% of the code’s stored data if part of it is dirty, scuffed or covered. Higher levels survive more damage and make the code bigger. Pick Q or H for stickers that will be handled and for any code with a logo; pick M for paper in a shop; pick L only for a clean screen with a lot of data.

The percentages are the most misread part. They don’t mean you can cover 30% of the picture, and the size cost is steeper than most guides show. Here is both, measured.

What the percentages count

A QR code stores your text as a row of codewords, each one eight modules (the small squares). Some of those codewords are your data and the rest are repair data, using a scheme called Reed-Solomon. Denso Wave’s error correction page says one codeword is 8 bits and that the scheme needs twice as many repair codewords as the number it corrects. The four levels differ in how many repair codewords they add, and the quoted figures are the share of codewords that can be restored: Seagull Scientific’s documentation lists them as approximately 7%, 15%, 25% and 30% of codewords.

Take our link https://www.example.com/shop/menu-card, a 38 character address, at version 3. A version 3 code has 70 codewords in total. The repair share at each level comes from the standard’s table, which Thonky’s reference prints and our generator library agrees with:

Level Repair codewords of 70 Half of those (can be fixed) Share of the 70
L 15 7 10%
M 26 13 19%
Q 36 18 26%
H 44 22 31%

(Q and H are split into two equal blocks, and each block repairs half of its own repair codewords.) The published 7, 15, 25 and 30 sit a little under our arithmetic, so treat them as the cautious version. But note that “30% of codewords” is a statement about the data inside the code, not about the area you can cover with a thumb or a logo. A version 3 code is 29 by 29, 841 squares, and only 560 of them (70 codewords times 8) carry codewords. The other third is the three corner markers, the alignment square, the timing lines and the format strips, none of which the codeword repair covers. So even a perfect H code can lose at most about 22 codewords, which is 176 squares, which is 21% of the area.

How much damage each level survived

We tested it. For three links we blanked out a centred square, made it bigger a little at a time, and recorded the biggest one still read by two decoders (jsQR, the open-source decoder our scanner falls back on, and the QR detector built into Chrome on macOS). Each link was built at each level; larger levels end up as bigger versions, as the next table shows.

Level Biggest blank square that still scanned (share of width) Share of area What the label says
L 20 to 24% 4 to 6% 7%
M 24 to 35% 6 to 12% 15%
Q 35 to 44% 12 to 19% 25%
H 41 to 49% 17 to 24% 30%

How much of the code you can lose

  • L version 3, 29 by 29

    4 to 6%label 7%

  • M version 3, 29 by 29

    6 to 12%label 15%

  • Q version 4, 33 by 33

    12 to 19%label 25%

  • H version 5, 37 by 37

    17 to 24%label 30%

Area we could blank and still scanWhat the label saysBars run from 0 to 30%

Each code holds the same 38 character link. The blank square is drawn just under the smallest width all three of our test links survived, and all four still scan with jsQR, the decoder our scanner falls back on.

These are clean, sharp renders, the best case. A real sticker adds glare and a tilted camera on top. So “up to 30% of the surface” claims you may see for logos are generous: in our test H gave away about a fifth of the area at most, and you want to stay well inside that. The logo guide turns this into a rule of about a quarter of the width.

Also note how little L tolerates: a blank square under a quarter of the width. A code at L has almost nothing in reserve for a crease or a grease mark.

What each level costs in size

This is the part most guides leave out. The same link needs a bigger grid at every step up. We measured four real payloads with the project’s qr-facts script:

Link L M Q H
24 characters (https://example.com/menu) 25 by 25 25 by 25 29 by 29 29 by 29
58 characters (a UPI payment link) 33 by 33 33 by 33 37 by 37 41 by 41
98 characters (a campaign link with tags) 37 by 37 41 by 41 49 by 49 53 by 53
173 characters (a longer tagged link) 49 by 49 53 by 53 61 by 61 69 by 69

On the 98 character link, H needs 53 by 53 squares against 37 by 37 for L: 2,809 squares against 1,369, about twice as many. Printed 30 mm wide, each square shrinks from 0.81 mm at L to 0.57 mm at H. To keep the squares of M (41 modules) at H (53 modules) you would have to print the code about 29% wider. On the 24 character link the penalty is small, 16% wider, which is why short links make H easy.

The ceiling moves too. The most plain lowercase text a version 40 code (177 by 177 squares) holds, measured with the same library:

Level Most characters of lowercase text
L 2,953
M 2,331
Q 1,663
H 1,273

H holds 43% of what L does. You will not hit this with a link, but you will with a vCard or a long note. See the guide on vCard codes for how fields add up.

Which level to pick

Where it lives Pick Why
Paper in a shop, a menu card, a flyer, a business card M Denso Wave says M is the most frequently chosen level, and it keeps the code small
A sticker on a bottle, a box or a door that people touch Q Scuffs and creases are likely; the cost is one version step on most links
A code with a logo in the middle H The logo is deliberate damage; our generator switches to H for you
A code on a rough or curved surface, or one that will be outdoors Q or H Denso Wave suggests Q or H for places where the code gets dirty
A code on a clean phone or laptop screen, or one crammed with data L Little damage expected; every square saved helps

Our own bias: don’t use H as insurance on a long link. On the 98 character link it adds 12 squares to every side, and at a fixed 30 mm print the squares shrink from 0.73 mm to 0.57 mm. Tiny squares are a way to fail on their own. If a long link is the issue, shorten the link or print larger, as the size guide shows.

Error correction also isn’t a licence to be sloppy. Low contrast, a small print and a skewed phone all draw on the same repair budget, so a code that is barely readable has nothing left for a scratch. The colours guide puts numbers on the contrast side.

Setting it in the generator

In the generator, the Shape tab has a control called “Damage it can survive” with four options, 7%, 15%, 25% and 30%. These are L, M, Q and H, and the default is 15%. The label is a little generous for the reasons above; read it as the codeword share, not the area. Adding a logo moves it to 30% automatically. If you are not sure what to choose, leave it at 15% and read the main guide to making a QR code for the other settings worth checking.

Ready to try it? Free, no sign-up, made in your browser.

Open the QR generator