QR Codes are known for their robustness in the physical world. This is due to a little something called ‘error correction’ - a feature specific to QR Codes that ensure they are scannable, even if there has been some form of physical damage to the code.
In QR Codes, error correction is taken care of 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 uniquely define that polynomial 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 a piece of 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 amount of 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 it’s ideal to have as much error correction as possible, higher levels require more modules. Larger module configurations, as we have seen, 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.
Read next: Create time-limited QR Codes with Beaconstac