CIRCULATEQR

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
Format information (pink) appears twice; version information (blue) appears twice in codes of version 7 and above.

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.

Learn more

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