How a QR code survives damage
QR codes carry Reed–Solomon error correction, the same family of coding used on compact discs and in deep-space communication. Redundant data is added so the original can be reconstructed even when part of the symbol is unreadable.
Four levels are defined: L recovers about 7 percent of the codewords, M about 15, Q about 25 and H about 30. Higher levels tolerate more damage but require more modules for the same payload, producing a denser code. Level H is what allows a logo to be placed over the centre of a code — the covered area is treated as damage and reconstructed.
The three large squares at the corners are finder patterns, letting a scanner locate and orient the symbol from any rotation. A smaller alignment pattern corrects for perspective distortion when the code is photographed at an angle, which is why scanning works without holding the camera square to the surface.
QR codes are a phishing vector
A QR code is opaque to humans. You cannot look at one and see where it leads, which makes it an effective delivery mechanism for malicious links — a technique now common enough to have acquired the name quishing. It bypasses much of the caution people apply to a written URL, because there is nothing to read.
The prevalent physical attack is a sticker placed over a legitimate code — on parking meters, restaurant tables, electric vehicle chargers and public transport signage — directing to a convincing payment page. These have taken real money from real people in numerous documented cases.
The defences are practical. Check whether a code looks applied over something else, and treat a sticker on a public payment terminal with suspicion. Use a scanner that displays the destination URL before opening it, and read that URL carefully — homograph domains substituting visually similar characters are common. Never enter payment details or credentials on a page reached from a scanned code; navigate to the organisation's site yourself instead. Be sceptical of any code arriving by email or printed on an unexpected letter, both of which are used to evade link filtering.
Capacity and what codes hold
A QR code's capacity depends on its version — the physical size in modules, from 21 × 21 up to 177 × 177 — and on the error correction level and encoding mode. At maximum size with the lowest correction, the ceiling is about 7,089 numeric digits, 4,296 alphanumeric characters, or 2,953 bytes.
In practice you want far less than that. A long payload produces a dense code that needs good lighting, a steady camera and a clean print to scan reliably. Keeping URLs short, or using a redirect, produces a code that scans instantly on a poor phone camera in bad light — which is the real design constraint.
Physical size matters too: the usual guidance is a scanning distance of about ten times the code's width, so a 2-centimetre code works at roughly 20 centimetres and a poster code needs to be considerably larger. Preserve the quiet zone — the blank margin of four modules on all sides — since scanners rely on it to detect the symbol's edges, and codes that fail to scan for no apparent reason are often ones printed hard against other content. To create codes rather than read them, the QR generator covers the options.