QR Code

QR Code – Quick Recognition Code. A QR code is a type of barcode that can be read by a digital device and which stores information as a series of pixels in a square-shaped grid. Standard barcodes can only be read in one direction – top to bottom and store a small amount of information, usually in an alphanumeric format. A QR code is read in two directions – top to bottom and right to left, and can store significantly more data.

QR code example.

A QR reader can identify a standard QR code based on the three large squares outside the QR code. Once it has identified these three shapes, it knows that everything contained inside the square is a QR code.

The QR reader then analyzes the QR code by breaking the whole thing down to a grid. It looks at the individual grid squares and assigns each one a value based on whether it is black or white. It then groups grid squares to create larger patterns.

A standard QR code is identifiable based on six components:

  1. Quiet Zone – This is the empty white border around the outside of a QR code. Without this border, a QR reader will not be able to determine what is and is not contained within the QR code (due to interference from outside elements).
  2. Finder pattern – QR codes usually contain three black squares in the bottom left, top left, and top right corners. These squares tell a QR reader that it is looking at a QR code and where the outside boundaries of the code lie.
  3. Alignment pattern – This is another smaller square contained somewhere near the bottom right corner. It ensures that the QR code can be read, even if it is skewed or at an angle.
  4. Timing pattern – This is an L-shaped line that runs between the three squares in the finder pattern. The timing pattern helps the reader identify individual squares within the whole code and makes it possible for a damaged QR code to be read.
  5. Version information – This is a small field of information contained near the top–right finder pattern cell. This identifies which version of the QR code is being read (see “Types of QR code” below).
  6. Data cells – The rest of the QR code communicates the actual information, i.e., the URL, phone number, or message it contains.

There are four widely accepted versions of QR codes. The version used determines how data can be stored and is called the “input mode.” It can be either numeric, alphanumeric, binary, or kanji. The type of mode is communicated via the version information field in the QR code.

  1. Numeric mode – This is for decimal digits 0 through 9. Numeric mode is the most effective storage mode, with up to 7,089 characters available.
  2. Alphanumeric mode – This is for decimal digitals 0 through 9, plus uppercase letters A through Z, and symbols $, %, *, +, –, ., /, and : as well as a space. It allows up to 4,296 characters to be stored.
  3. Byte mode- This is for characters from the ISO–8859–1 character set. It allows 2,953 characters to be stored.
  4. Kanji mode – This is for double–byte characters from the Shift JIS character set and used to encode characters in Japanese. This is the original mode, first developed by Denso Wave. However, it has since become the least effective, with only 1,817 characters available for storage. A second kanji mode called Extended Channel Interpretation (ECI) mode can specify the kanji character set UTF–8. However, some newer QR code readers will not be able to read this character set.

There are two additional modes which are modifications of the other types:

  • Structured Append mode – This encodes data across multiple QR codes, allowing up to 16 QR codes to be read simultaneously.
  • FNC1 mode – This allows a QR code to function as a GS1 barcode.

[Thanks to Kaspersky for this information.]