Skip to main content
What is error correction?

Learn about the role of error correction in QR Code generation.

Allison Murdoch avatar
Written by Allison Murdoch
Updated over a week ago

QR Codes are known for their robustness in the physical world. This is due to something called ‘error correction’ - a feature specific to QR Codes that ensures they are scannable, even if there has been some form of physical damage to the code.

In QR Codes, error correction is handled by the Reed-Solomon Error Correction algorithm. Every time a QR Code is created, the original data is converted into a polynomial, the number of unique points required to define that polynomial uniquely is determined, and this point set is added back into the QR Code so that it then also contains the original data expressed as a polynomial.

Long story short - the Reed-Solomon algorithm leaves data that enables QR Code scanners to rebuild the entire QR Code, even if a part of it is damaged or missing. You can also say that the QR Code data is “mathematically backed-up”.

There are four levels of error correction to choose from, depending on the damage you expect your QR Code to sustain.

Level L: 7% of data can be restored.

Level M: 15% of data can be restored.

Level Q: 25% of data can be restored.

Level H: 30% of data can be restored.

While having as much error correction as possible is ideal, higher levels require more modules. As we have seen, larger module configurations require a larger area/QR Code size for better scannability. If there are severe size constraints, choosing Level L, where only 7% of the data is retrievable, is ideal.

Did this answer your question?