QR code glossary · Anatomy of a QR code
Format information
Also called: Format info
Definition
Format information is a 15-bit field printed twice in every QR code, beside the finder patterns, that tells the scanner which error correction level and which mask pattern the code uses, so it can be read before any of the data.
How it works
The field starts with 5 bits: 2 for the error correction level (L is 01, M is 00, Q is 11, H is 10) and 3 for the mask pattern (000 to 111). Ten error correction bits from a BCH code follow, and the 15 bits are then combined with the fixed pattern 101010000010010 so the field can never be all light.
One copy wraps around the top-left finder pattern. The second is split: 8 bits below the top-right finder pattern and 7 beside the bottom-left one, next to a module that is always dark. The BCH code lets a decoder correct up to 3 wrong bits in a copy, and with only 32 valid combinations it can pick the nearest one. If one corner is damaged, the other copy still works.
- Format information and the dark module
- Version information
Codes of version 7 and above also carry version information: 18 bits, a 6-bit version number plus 12 error correction bits, in two 6 × 3 blocks beside the top-right and bottom-left finder patterns. In smaller codes the decoder works the version out from the number of modules.
Why it matters
Format information is why nobody chooses an error correction level or mask when scanning: the phone reads both from the code. It is also a single point of failure. If both copies are unreadable, the decoder cannot unmask the data, and the code fails even when every data module is perfect.
The strips sit right next to the finder patterns, so keep logos, frames and decorative corners away from them, and leave the quiet zone clear around the corners.
Example
Level M (00) with mask 000 gives the data bits 00000, whose error correction bits are also all zero. After the fixed pattern is applied, the printed field reads 101010000010010. Without that step this combination would be printed as 15 light modules.
Related terms
- Error correction levelAn error correction level is the setting, L, M, Q or H, that decides how much redundant data a QR code carries; the four levels let a scanner restore roughly 7%, 15%, 25% and 30% of the code’s codewords when they are damaged, dirty or covered.
- Mask patternA mask pattern is one of eight fixed patterns that a QR encoder combines with the data area, flipping selected modules, so the finished code avoids large solid blocks, long runs and shapes that look like finder patterns, all of which make a code harder to scan.
- 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.
- 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.
- Reed–Solomon error correctionReed–Solomon error correction is a family of error-correcting codes, published by Irving Reed and Gustave Solomon in 1960, that QR codes use to add calculated check codewords to their data so a scanner can find and repair codewords it misread.
Learn more
- QR code error correction: What the four levels mean in practice.
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