QR Code, also known as Denso Barcode, QRCode, Quick Response Code, is a matrix code (or two-dimensional bar code) created by Japanese corporation Denso-Wave in 1994.
The "QR" is derived from "Quick Response", as the creator intended the code to allow its contents to be decoded at high speed.
Maximum data characters per QR Code with Version 40-L
Four levels of Reed-Solomon error correction (referred to as L, M, Q and H in increasing order of capacity) allowing recovery of the QR Code barcode data.
Each QR Code barcode shall be constructed of nominally square modules set out in a regular square
array and shall consist of an encoding region and function patterns.
The function patterns includes:
The encoding region includes
Function patterns do not encode data. The QR Code barcode shall be surrounded on all four
sides by a quiet zone border.
Image-1: The image below illustrates the structure of a Version 7 QR Code.
There are forty sizes of QR Code barcode referred to as Version 1, Version 2 ... Version 40.
Version 1 measures 21 modules x 21 modules, Version 2 measures 25 modules x 25 modules and so on increasing in
steps of 4 modules per side up to Version 40 which measures 177 modules x 177 modules.
The image below illustrates a QR Code with size Version 1
There are three identical Finder Patterns located at the upper left, upper right and lower left corners of the
symbol respectively.
Each finder pattern may be viewed as three superimposed
concentric squares and is constructed of dark 7 x 7 modules, light 5 x 5 modules and dark 3 x 3 modules.
The image below shows the structure of QR Code finder pattern.
A one-module wide separator, constructed of all light modules, is placed between each finder pattern and the
Encoding Region.
The QR Code timing pattern is used to determine the size of module, the number of rows and columns.
The timing patterns have two lines, a horizontal line and a vertical one, with alternating dark and light modules, commencing and ending with a dark module.
Alignment patterns are for QR Code Version 2 or larger barcodes.
Each alignment pattern is constructed of dark 5 x 5 modules, light 3 x 3
modules and a single central dark module.
The number of alignment patterns depends on the symbol version.
Table-1: Number of alignment patterns for each QR Code version barcodes
Version | Number of alignment patterns |
1 | 0 |
2 | 1 |
3 | 1 |
4 | 1 |
5 | 1 |
6 | 1 |
7 | 6 |
8 | 6 |
9 | 6 |
10 | 6 |
11 | 6 |
12 | 6 |
13 | 6 |
14 | 13 |
15 | 13 |
16 | 13 |
17 | 13 |
18 | 13 |
19 | 13 |
20 | 13 |
21 | 22 |
22 | 22 |
23 | 22 |
24 | 22 |
25 | 22 |
26 | 22 |
27 | 22 |
28 | 33 |
29 | 33 |
30 | 33 |
31 | 33 |
32 | 33 |
33 | 33 |
34 | 33 |
35 | 46 |
36 | 46 |
37 | 46 |
38 | 46 |
39 | 46 |
40 | 46 |
Four sides on the QR Code barcode should be surrounded by quiet zones.
For QR Code barcodes, its quiet zone width shall be 4X. (4 times of module size)
The following QR Code encode modes are based on the character values and assignments associated with the default ECI.
Numeric mode encodes data from the decimal digit set (0 - 9) (byte values HEX 30 to HEX 39). Normally, 3 data characters are represented by 10 bits.
Alphanumeric mode encodes data from a set of 45 characters.
In this mode, the QR Code data is encoded at 8 bits per character.
The Kanji mode efficiently encodes Kanji characters in accordance with the Shift JIS system based on JIS X 0208. The Shift JIS values are shifted from the JIS X 0208 values. JIS X 0208 gives details of the shift coded representation. Each two-byte character value is compacted to a 13-bit binary codeword.
The Extended Channel Interpretation (ECI) protocol defined in the AIM Inc. ECI allows the output data stream to have interpretations different
from that of the default character set.
The default interpretation for QR Code is ECI 000003 representing the ISO/IEC 8859-1 character set.
To create GS1 compatible QR Code barcodes, a special mode indicator "FNC1 in first position" should be encoded. The mode indicator shall be placed immediately before the first mode indicator used for efficient data encoding (Numeric, Alphanumeric, Byte or Kanji), and after any ECI or Structured Append header.
A QR Code data message can be divided and stored in up to 16 QR Code barcodes in a structured format. If a QR Code barcode is part of a Structured Append message, it must include two data information: