What Is a QR Code?
QR (Quick Response) code is a two-dimensional barcode invented by Denso Wave in 1994 for tracking automotive parts. Unlike a traditional 1D barcode that encodes ~20 characters, a QR code can encode up to 3,000 bytes of arbitrary data — URLs, contact cards, text, binary data — in a scannable square image.
The Anatomy of a QR Code
**Finder patterns** — the three large squares in the corners (not the fourth corner — that's intentionally empty). These allow scanners to detect the QR code's position, size, and orientation regardless of the angle it's being scanned from.
**Timing patterns** — the alternating black-and-white lines connecting the finder patterns. These help the scanner determine the size of the code's internal grid.
**Alignment patterns** — additional squares that appear in larger QR codes. They help correct for physical distortion when scanning curved surfaces.
**Format information** — strips adjacent to the finder patterns that encode the error correction level and the mask pattern (more on this below).
**Data area** — everything else. The remaining modules (cells) encode the actual data in a zigzag pattern starting from the bottom-right.
How Data Is Encoded
QR codes support four encoding modes, chosen automatically based on the data:
- **Numeric** — digits 0–9 only. Most efficient: encodes 3 digits per 10 bits.
- **Alphanumeric** — uppercase letters, digits, and 9 symbols. 2 characters per 11 bits.
- **Byte** — raw 8-bit bytes (UTF-8 text, binary data). 1 character per 8 bits.
- **Kanji** — Japanese characters. 1 character per 13 bits.
A QR code containing a URL automatically uses byte mode for the https:// and alphanumeric or byte mode for the domain and path.
Error Correction: Why QR Codes Still Work When Damaged
This is the most impressive part. QR codes use Reed-Solomon error correction, which means a QR code can be partially destroyed and still decode correctly. There are four error correction levels:
- **L (Low)** — up to 7% of data can be damaged
- **M (Medium)** — up to 15%
- **Q (Quartile)** — up to 25%
- **H (High)** — up to 30%
Higher error correction means more redundancy, which means a larger QR code for the same data. This is also why you can put a logo in the centre of a QR code — you're deliberately damaging up to 30% of the data, but error correction reconstructs it.
The Mask Pattern
Raw QR code data often produces large uniform areas (all black or all white), which confuse scanners. To prevent this, QR codes apply one of 8 mask patterns — mathematical transformations applied to the data area that break up uniform regions. The QR encoder tests all 8 masks and picks the one that produces the best balance of light and dark cells.
The chosen mask is encoded in the format information strips so the scanner knows which pattern to un-apply when decoding.
QR Code Versions
QR codes come in 40 sizes called versions. Version 1 is a 21×21 grid and holds 17–41 characters. Version 40 is a 177×177 grid and holds up to 3,000 bytes. For most URLs (typically 30–80 characters), version 3–5 (29×29 to 37×37) is sufficient.
Practical Tips for Better QR Codes
- **Shorter URLs scan faster and produce smaller, cleaner codes** — use a URL shortener or a short domain for printed QR codes.
- **Use high error correction (H) for printed material** that might get dirty or damaged.
- **Dark on light is more reliable than light on dark** — most scanners optimise for black on white.
- **Test at the smallest size you'll print** — a 1cm QR code might not scan reliably from 50cm away.
- **Minimum quiet zone** — there must be 4 modules of whitespace around the code on all sides. Printing it right to the edge of a box will cause scan failures.
NoxaKit's QR Code Generator creates QR codes entirely in the browser — no server, no data upload, and you can download the output as PNG.