What error correction means
QR codes include built-in error correction so they still read even when part of the code is scratched or covered. They use a mathematical encoding technique called Reed–Solomon coding to recover the original data even when some of it is damaged.
Recovery capability comes in four levels. A higher level survives more damage, but it also needs more modules to hold the same information, making the code denser.
The difference between L, M, Q, and H
L (Low) recovers up to about 7% damage, M (Medium) about 15%, Q (Quartile) about 25%, and H (High) about 30%.
The higher the recovery rate, the denser the code. So H is not always best — it's important to balance it against your use case.
Recommendations by situation
For on-screen display or clean indoor printing, M is plenty. M is also the default on this site.
For outdoor posters exposed to rain, dust, or wear — or when you want to place a logo in the center — Q or H is recommended. Conversely, if a large amount of data is making the code too big, you can lower it to L to reduce the module count.
Relationship with adding a logo
Error correction is exactly why you can place a logo in the center of a QR code. Even if the logo covers part of the code, it still reads as long as the damage stays within the correction capacity.
However, once a logo covers more than about 30% of the area, even level H may fail to read, so keep the logo small in the center and maintain enough margin (the quiet zone).