QR code glossary · Anatomy of a QR code
Module
Also called: QR code module
Definition
A module is a single square cell of a QR code, either dark or light, and the basic unit of the symbol: each one is a bit of data or part of a fixed pattern, and the printed width of one module decides how far away the code can be read.
How it works
A QR code of version V is 17 + 4V modules across, from 21 × 21 (441 modules) at version 1 to 177 × 177 (31,329 modules) at version 40. In the data area a dark module is a binary one and a light module a binary zero.
Not every module carries data. The finder patterns, their light separators, the timing and alignment patterns and the format information occupy fixed positions. What remains is the encoding region, where every 8 modules hold one codeword of data or error correction. In a version 1 code, 208 of the 441 modules carry codewords: 26 codewords of 8 bits each.
- Finder patterns
- Separators (always light)
- Timing patterns
- Alignment patterns
- Format information and the dark module
The width of one module is often called the X-dimension. Decoders estimate it from the finder patterns and then sample each module near its center, which is why rounded or dot-shaped modules can still scan, provided the dots are large enough and the contrast is strong.
Why it matters
A code’s printed width is its module count times the module size, so the two trade against each other. Put more content in a code and it needs more modules; print it at the same width and every module gets smaller, which shortens the distance it can be scanned from and makes it more sensitive to blur, ink spread and low resolution.
That is the practical reason to keep content short, for example with a short URL, and to print dense codes larger. Export vector files (SVG or PDF) for print so module edges stay sharp, and keep every module the same size: hand-editing or stretching a code breaks the grid the scanner expects.
Example
A 28-character short link at error correction level M makes a version 3 code, 29 modules across. Printed 2.5 cm wide (not counting the quiet zone), each module is about 0.86 mm. The same width holding a 90-character link with campaign tags (version 6, 41 modules) leaves each module about 0.61 mm, roughly 30% smaller.
In CirculateQR
CirculateQR’s designer offers square, rounded and dot-shaped modules, and exports basic codes as SVG, so module edges stay sharp at any print size.
Related terms
- QR code versionA QR code’s version is its size on a scale from 1 to 40: version 1 is 21 × 21 modules and each version adds 4 modules per side, up to 177 × 177 at version 40, so a version V code is 17 + 4V modules across.
- Quiet zoneThe quiet zone is the blank margin that must surround a QR code on all four sides so a scanner can tell where the code begins; ISO/IEC 18004 requires it to be at least 4 modules wide for a regular QR code and 2 modules for a Micro QR code.
- Data capacityData capacity is the most content a QR code can hold, which depends on its version, error correction level and encoding mode; the largest code, version 40 at level L, holds 7,089 numeric digits, 4,296 alphanumeric characters, 2,953 bytes or 1,817 kanji characters.
- Finder patternA finder pattern is one of the three large concentric squares in the top-left, top-right and bottom-left corners of a QR code, which a scanner uses to detect the code, measure its size and angle, and work out which way up it is.
- Contrast ratioContrast, for a QR code, is the difference in brightness between its dark and light modules; scanners need a large difference, with the dark modules darker than the light ones, and designers often check it with the WCAG contrast ratio, which runs from 1:1 (no difference) to 21:1 (black on white).
Learn more
- QR code size guide: Module size, scanning distance and a size table.
- QR code design: Module shapes, colors and logos.
Sources
Last updated . Written by the CirculateQR team; technical facts follow the sources listed above. Example codes and sizes are computed with the open-source qrcode encoder that CirculateQR uses. Spotted something wrong? Email support@circulateqr.com. QR Code is a registered trademark of DENSO WAVE INCORPORATED.
← Browse the full glossary