What is a QR code?
How QR codes store data, what the patterns in the corners do, why error correction lets damaged codes still scan, and how to make one that works in print.
A QR code is a two-dimensional barcode that stores data as a grid of black and white squares. Point a camera at one and the device reads the pattern back into text — most often a URL.
"QR" stands for Quick Response. The format was created in 1994 for tracking car parts, and is defined by an open standard (ISO/IEC 18004), which is why every phone can read one without any particular app.
How the pattern works
Several distinct regions do different jobs.
Finder patterns
The three large squares in the corners. A scanner looks for these first — their 1:1:3:1:1 ratio of dark to light is rare enough in ordinary images to be a reliable signal. Three corners rather than four is what lets a scanner work out the rotation, which is why a QR code reads correctly upside down.
Timing patterns
The alternating line of squares between the finder patterns. This tells the scanner how large each module is, so it can map the image back to a grid even when the photo is taken at an angle.
Format information
A strip beside the finder patterns recording the error correction level and which mask was applied. A scanner reads this before it can interpret anything else.
Data and error correction
Everything else. The payload is encoded in a zigzag from the bottom right, interleaved with Reed-Solomon error correction codewords.
Why a damaged code still scans
Error correction is the property that makes QR codes practical in the physical world. The encoded data includes redundancy, so a portion of the code can be missing or obscured and the content is still recoverable.
There are four levels:
- L — recovers about 7% damage
- M — about 15%
- Q — about 25%
- H — about 30%
Higher levels need more modules for the same content, making the code denser. Level M is the usual default and is what Zurl uses: enough tolerance for a scuffed print, without making the code unnecessarily dense. Level H is how logos can be placed over the centre of a code — the covered area counts as damage the correction absorbs.
Masking
Large blank or solid regions confuse scanners, so the encoder applies one of eight mask patterns that flips modules according to a formula. All eight are scored against penalty rules and the best is chosen. This is why two codes with nearly identical content can look completely different.
Why shorter content makes a better code
More data means more modules, and more modules mean smaller squares at any given printed size. Small modules are harder to scan — particularly in poor light, at an angle, or from a distance.
This is the practical reason to combine QR codes with short links. A 200-character URL produces a dense code that struggles on a poster; a short link of around 26 characters produces a sparse one that scans quickly from across a room. The short link also lets you change the destination later without reprinting anything.
Making one that actually works
- Keep the quiet zone. The blank margin around the code is part of the specification — roughly four modules wide. Cropping it is the single most common reason a code fails to scan.
- Print it large enough. A rough rule is that the code should be at least one tenth of the scanning distance: 3cm for arm’s length, considerably larger for a wall poster.
- Keep the contrast high. Dark on light. Inverted codes fail on many scanners, and low-contrast colour pairs fail in poor lighting.
- Use SVG for print. Vector output stays sharp at any size. A PNG scaled up becomes blurry, and blurry edges cost you scan reliability.
- Test it before printing. Scan the final artwork with more than one phone. Test at the actual distance people will use.
A note on safety
A QR code hides its destination even more thoroughly than a short link — you cannot read it at all without scanning. Most phones show the URL before opening it; read that preview, particularly for codes on stickers in public places, which are trivial to replace with a malicious one.
Creating one
The QR code generator produces a code for any URL or text, downloadable as PNG or SVG, with no account required.