QR Code Guide
A plain-language tour of what is actually inside a QR code and how a scanner turns those black-and-white squares back into text.
On this page
The anatomy of a QR code
A QR (Quick Response) code is a grid of black and white squares called modules. Different regions of the grid do different jobs, and understanding them explains why some codes scan effortlessly and others fail.
Finder patterns
The three large squares in the corners are finder patterns. They let a scanner locate the code and work out its orientation almost instantly, from nearly any angle. A fourth, smaller alignment pattern helps with distortion on bigger codes.
Timing patterns
The alternating line of modules running between the finder patterns is the timing pattern. It acts like a ruler, telling the scanner how many modules wide and tall the code is so it can map the grid precisely.
Data and error-correction modules
The remaining modules store your encoded content plus redundant error-correction data. That redundancy is what lets a code survive a smudge, a crease or a logo (see our error-correction guide).
The quiet zone
QR codes need an empty margin around them — the quiet zone — so scanners can tell where the code ends. Removing it is one of the most common reasons a code won't scan.
Static vs dynamic codes
A static code, like the ones QRBarcodeTools creates, stores its content directly. A dynamic code stores a short redirect URL that a server resolves, which allows editing and tracking but adds a dependency and a privacy trade-off. Static codes can't be changed once printed, but they never break because a server went away.
The scan, step by step
A scanner finds the finder patterns, reads the timing pattern to build the grid, samples each module as light or dark, applies error correction to fix any misreads, and finally decodes the bits back into text — all in a fraction of a second.
What is actually in the pattern
A QR symbol is a grid of modules, and most of them are not your data. Knowing which parts are structural explains nearly every scanning failure.
| Element | Where | What it does | If it is damaged |
|---|---|---|---|
| Finder patterns | Three corners | Let the scanner locate the symbol and its rotation | Unrecoverable |
| Separators | Around each finder | One clear module isolating the finder | Unrecoverable |
| Timing patterns | Dotted lines between finders | Establish the module grid and count | Unrecoverable |
| Alignment patterns | Version 2 and up | Correct for perspective and curvature | Degrades badly on angled scans |
| Format information | Beside the finders | Error-correction level and mask, itself heavily protected | Duplicated, so usually survives |
| Version information | Version 7 and up | Symbol size | Duplicated |
| Data and error correction | Everything remaining | Your content plus Reed–Solomon redundancy | Recoverable up to the level's budget |
| Quiet zone | 4 modules all around | Marks where the symbol ends | Unrecoverable |
This is why "the error correction is set to H so it will be fine" is not true in general. Error correction protects the data region. Covering a finder pattern or cropping the quiet zone breaks the stage that runs before error correction ever gets a chance.
Versions and capacity
QR symbols come in 40 versions. Version 1 is 21 × 21 modules and each step adds 4 modules per side, so version 40 is 177 × 177. The encoder picks the smallest version that fits your data at the error-correction level you chose.
| Version | Modules | Numeric (L) | Alphanumeric (L) | Bytes / UTF-8 (L) |
|---|---|---|---|---|
| 1 | 21 × 21 | 41 | 25 | 17 |
| 2 | 25 × 25 | 77 | 47 | 32 |
| 4 | 33 × 33 | 187 | 114 | 78 |
| 10 | 57 × 57 | 652 | 395 | 271 |
| 40 | 177 × 177 | 7089 | 4296 | 2953 |
Those are the maxima at level L, from ISO/IEC 18004. Level H reduces them by roughly 60%. The four encoding modes are the reason the columns differ so much: numeric packs three digits into 10 bits, alphanumeric packs two characters into 11 bits, and byte mode spends 8 bits per byte. A URL in uppercase can use alphanumeric mode; the same URL in mixed case falls back to byte mode and takes noticeably more space — which is one of the few cases where SHOUTING AT A SERVER genuinely helps.
Non-Latin scripts and emoji are UTF-8, so they consume several bytes per character. A short message in Korean or Japanese can produce a denser symbol than a much longer English one.
Masking, and why two codes with the same data look different
After the data is laid out, the encoder applies one of eight mask patterns — a checkerboard, stripes, diagonals — XORed over the data region. The purpose is to avoid large blank areas and to stop accidental copies of the finder pattern appearing in the data, both of which confuse scanners.
The encoder scores all eight against penalty rules from the specification and keeps the best. This is why regenerating the same content can produce a visibly different pattern, and why you cannot meaningfully compare two QR images by eye to see whether they hold the same data. The way to check is to decode them — which is exactly what the scanner is for, and what the Verify button does automatically before you download.
Written and maintained by the QRBarcodeTools Editorial Team · Last reviewed 2026-08-12 · How we write and check these guides