The short answer
Error correction is the redundancy built into every QR code so a damaged, dirty, or partially-covered code still scans. The encoder does not store just your data — it appends extra "check" codewords computed from that data, and if some modules become unreadable the scanner uses the redundancy to reconstruct them. You pick how much redundancy at generation time from four levels: L, M, Q, and H, which recover roughly 7%, 15%, 25%, and 30% of the codewords respectively. More recovery means a more resilient code; the trade-off is that the redundancy consumes space the data could otherwise use, so a higher level holds less data at the same grid size. The rule of thumb is M by default, H the moment a logo or wear enters the picture, and L only for maximum data in a clean, logo-free setting. Our short qr error correction guide gives the one-paragraph version; this page is the comprehensive deep dive for the technical buyer — the mechanics, the Reed-Solomon maths behind it, the capacity trade-off, and how to choose. It pairs naturally with the how does a QR code work guide, which places error correction inside the full encode-to-scan pipeline.
What error correction actually is
Under the hood a QR code is a grid of dark and light modules that encode bits. The bits are grouped into 8-bit "codewords", and a portion of those codewords are your payload while the rest are error-correction codewords computed from the payload. When a scanner reads the code, a smudge, a scratch, a print defect, or a centered logo covering part of the data area leaves some codewords unreadable — and the redundant codewords carry enough information to recover them. This is the same idea as a parity bit or a checksum, but vastly more powerful: a checksum can detect an error, while error correction can locate and repair many codewords at once.
That repair capability is the defining resilience property of a QR code over a plain one-dimensional barcode. A 1D barcode that loses a bar to damage is unreadable; a QR code that loses dozens of modules to dirt or a logo still decodes because the redundancy reconstructs the missing data. The recovery is not magic and it is not unlimited — each level budgets a specific fraction of the codewords for repair, and once the damage exceeds the budget the decode fails. The four levels exist precisely so you can spend more of the grid on resilience when the use case needs it, and less when you would rather have data capacity.
How Reed-Solomon error correction works
QR codes use a specific error-correcting code called Reed-Solomon, defined for QR by the ISO/IEC 18004 standard. The mechanism is algebraic. The encoder treats your data codewords as the coefficients of a polynomial, divides that polynomial by a fixed "generator polynomial", and the remainder of that division becomes the error-correction codewords appended to the data. The generator polynomial is fixed by how many error-correction codewords the chosen level requires, so the whole process is deterministic: the same data at the same level always produces the same redundancy, which is one reason the same payload renders identically on a spec-compliant generator.
On decode the maths reverses. The scanner evaluates the received codewords (data plus redundancy) at the roots of the generator polynomial; the results are called syndromes. If every syndrome is zero, the data is intact and no repair is needed. If the syndromes are non-zero, their pattern encodes both where the errors are and what the correct values should be — the decoder solves a small system to find the error locations and magnitudes and applies the corrections. This is powerful because it does not need to know in advance which modules are bad: it discovers the errors from the redundancy itself.
There is an important distinction between unknown errors and erasures. An erasure is a codeword whose position is already known to be unreadable — for example, the modules sitting under a centered logo, whose location the encoder effectively pre-commits. Reed-Solomon can correct twice as many erasures as unknown errors for the same redundancy budget: with 2t error-correction codewords you can repair up to t unknown errors or up to 2t erasures. This is exactly why a centered logo is practical at all — the covered region counts against the erasure budget, which is roughly twice as efficient as recovering random unknown damage. It is also why level H (the largest budget) is recommended whenever a logo covers the data area: the logo consumes erasure capacity, and H leaves enough headroom to keep the code scannable. The block structure that the redundancy is woven into is set by the version, which our qr code version guide covers, and the whole pipeline sits inside the encode-to-scan flow described in the how does a QR code work guide.
The four levels L, M, Q, and H
The standard defines exactly four error-correction levels, and the percentage attached to each is the approximate fraction of codewords that can be recovered when the damaged positions are known (erasures). L recovers about 7%, M about 15%, Q about 25%, and H about 30%. For purely unknown errors — where the scanner does not know which modules are bad — the recoverable fraction is roughly half of each figure, because unknown errors cost twice the redundancy of erasures. In practice most real-world damage is a mix: a centered logo is a known-position erasure, while a scratch or a smudge is an unknown error, so the effective budget lands between the two.
A "codeword" here is an 8-bit byte — both your data and the redundancy are measured in codewords. The level is fixed at generation time and recorded in the format information block, the small metadata block next to each finder pattern that also stores the mask number. That means a scanner reads the level out of the code itself before it attempts to decode the data, so it always knows the recovery budget it is working with. The format information is covered alongside the mask in our qr code masking guide and the finder structures in our qr finder pattern guide; the short qr error correction guide gives the one-line summary of these four levels, while this page is the full technical picture.
The capacity trade-off
Error correction is not free storage — the redundant codewords occupy space that would otherwise hold your data. At a fixed grid size (a fixed QR version), raising the error-correction level shrinks the data capacity, because more of the codewords are reserved for redundancy. Equivalently, the same payload at a higher level may force the encoder up to a higher version — a bigger grid with more modules — to find room for both the data and the extra redundancy. This is why the two headline habits reinforce each other: keep the payload short so the version stays low, and choose the error-correction level deliberately so the redundancy does not push the grid bigger than it needs to be.
The numbers make the trade-off concrete. At version 10 (a 57×57 grid) in byte mode, level L holds roughly 271 bytes of data while level H holds roughly 125 bytes — less than half — because the H grid carries far more error-correction codewords. A long URL that fits comfortably at L may need a higher version at H, which means a denser, harder-to-scan-small grid. This is the same version-and-capacity story our qr code version guide and how many characters can a QR code hold guide cover; error-correction level is the third variable alongside payload size and encoding mode, and all three interact to set the final grid size.
Level-by-capacity at a glance
The table below shows the four levels with their approximate recovery capability and a representative byte-mode capacity at version 10 (a 57×57 grid), plus the use case each level is meant for. The capacity figures are approximate because the exact number of data codewords depends on the version and on how the encoder splits the data into blocks; the recovery percentages are the standard approximate values for known-position (erasure) recovery.
| Level | Data recovery | Byte capacity at V10 (57×57) | Best for |
|---|---|---|---|
| L (Low) | ~7% | ~271 bytes | Maximum data in a clean environment — screen-only codes with no logo and no wear |
| M (Medium) | ~15% | ~224 bytes | The default — most plain codes on screens and clean indoor prints |
| Q (Quartile) | ~25% | ~178 bytes | Codes exposed to handling or mild scuffing — packaging, table tents, touched surfaces |
| H (High) | ~30% | ~125 bytes | Centered logos, rough or outdoor surfaces, heavy wear, anything reprinted after styling |
| L → H trade-off | ~7% → ~30% recovery | ~271 → ~125 bytes (≈half) | H roughly quadruples the damage tolerance but holds about half the data of L at the same grid size |
When to use each level — and the quiet zone + logo relationship
Use level L only when you need maximum data capacity in a clean, logo-free setting — typically a code that lives on a screen, is scanned once, and never sees wear. Use M as the default for plain codes on screens and clean indoor prints; it is the right balance for the majority of use cases and keeps the grid as small as the payload allows. Use Q when the code will be handled or mildly scuffed — packaging, table tents, surfaces that get touched. Use H whenever a centered logo covers the data area, whenever the code is printed on a rough or outdoor surface, whenever it will take wear, or whenever you plan to reprint after styling changes (so a small print defect does not brick the run).
Two relationships are worth stating plainly because they are commonly misunderstood. First, error correction repairs data modules — it cannot manufacture a missing quiet zone, and it cannot repair a covered finder pattern. The finder patterns are read first and are not protected by Reed-Solomon at all, so covering a finder eye with a logo or a frame is fatal regardless of the level. The 4-module quiet zone is likewise a structural requirement, not something error correction can substitute for; our qr code quiet zone guide covers why a missing margin is the single most common scan failure. Second, a centered logo consumes erasure capacity, which is why level H is recommended whenever a logo sits in the data area — H leaves enough headroom to absorb a logo up to roughly 20–22% of the code width, which our qr code with logo guide covers in detail. Error correction and the quiet zone solve different failure modes: EC fixes damaged data modules, the quiet zone lets the scanner find the code in the first place.
How to choose, and how QRForge handles it
The decision is straightforward in practice. Default to M for any plain code. Step up to H the moment a centered logo, an outdoor or rough surface, or heavy wear is in play — the capacity cost is real but the resilience gain is what keeps a printed code scannable for the life of the print. Drop to L only when you have a clean, logo-free, screen-bound code and you genuinely need the extra data room. In between, Q is a sensible middle ground for handled codes that are not quite outdoor-grade. The same encoder drives all three export formats at QRForge — SVG, PNG, and EPS — so the error-correction level you pick is identical across a vector print file and a raster screen image, and the generator exposes the level as a live control on every content type.
Error correction is insurance against damage, not a substitute for the other scannability habits. Keep the payload short so the version stays low and the grid stays coarse, keep dark-on-light contrast high, keep the 4-module quiet zone empty, keep the three finder eyes clear, and choose the level deliberately. When a logo is involved, pair level H with a logo no wider than about 20–22% of the code, centered in the data area, never over a finder. Then run the final exported image through the free /decode helper to confirm the payload round-trips, and scan-test it on at least two real phones before any print run. These habits are laid out end to end in our qr best practices guide, the sizing math lives in the qr code size guide, and the pre-print confidence routine is in the qr code validation guide — error correction is one lever among them, the one that decides how much damage a finished code can take and still scan.
Frequently asked questions
What are the four QR error correction levels?
L, M, Q, and H. They recover approximately 7%, 15%, 25%, and 30% of the codewords respectively when the damaged positions are known (erasures), and roughly half that for unknown errors. The level is set at generation time and recorded in the format information block so the scanner knows the recovery budget before decoding.
Which error correction level should I use?
Use M by default for plain codes. Use H whenever a centered logo covers the data area, or the code is printed on a rough or outdoor surface, or will take wear. Use L only for maximum data capacity in a clean, logo-free, screen-only setting. Q is a sensible middle ground for handled codes that are not quite outdoor-grade.
Does a higher error correction level make the QR code bigger?
For the same data, yes. More error-correction codewords take up space the data could use, so at the same grid size a higher level holds less data, and the same payload may force a higher version (a bigger grid with more modules) to fit. Keep the payload short to offset — the two habits reinforce each other.
How much of a QR code can be damaged and still scan?
Roughly 7/15/25/30% of the codewords for L/M/Q/H when the damaged positions are known (erasures), or about half that for unknown errors. A centered logo counts against this budget as erasures, which is why level H is recommended whenever a logo covers the data area.