QR Code — abbreviated from Quick Response Code — is the trademark for a type of matrix barcode (or two-dimensional code) first designed for the automotive industry. More recently, the system has become popular outside of the industry due to its fast readability and large storage capacity compared to standard UPC barcodes. The code consists of black modules arranged in a square pattern on a white background. The information encoded can be made up of four standardized kinds ("modes") of data (numeric, alphanumeric, byte/binary, Kanji), or by supported extensions virtually any kind of data.
Invented by the Toyota subsidiary Denso Wave in 1994 to track vehicles during the manufacturing process, the QR Code is one of the most popular types of two-dimensional barcodes. It was designed to allow its contents to be decoded at high speed.
There are several standards in documents covering the physical encoding of QR Codes:
- October 1997 – AIM (Association for Automatic Identification and Mobility) International
- January 1999 – JIS X 0510
- June 2000 – ISO/IEC 18004:2000 Information technology – Automatic identification and data capture techniques – Bar code symbology – QR code(now withdrawn)
Defines QR code models 1 and 2 symbols.
- 1 September 2006 – ISO/IEC 18004:2006 Information technology – Automatic identification and data capture techniques – QR Code 2005 bar code symbology specification
Defines QR code 2005 symbols, an extension of QR Code model 2. Does not specify how to read QR Code model 1 symbols, or require this for compliance.
At the application layer, there is some variation between implementations. NTT DoCoMo has established de facto standards for the encoding of URLs, contact information, and several other data types. The open-source "ZXing" project maintains a list of QR Code data types.
Although initially used to track parts in vehicle manufacturing, QR Codes are now (as of 2012) used over a much wider range of applications, including commercial tracking, entertainment and transport ticketing, product/loyalty marketing (examples: mobile couponing where a company's discounted and percent discount can be captured using a QR Code decoder which is a mobile app, or storing a company's information such as address and related information alongside its alpha-numeric text data as can be seen in Yellow Pages directory), band in-store product labelling. It can also be used in storing personal information for use by government. An example of this is Philippines National Bureau of Investigation (NBI) where NBI clearances now come with a QR Code. Many of these applications target mobile-phone users (via mobile tagging). Users may receive text, add a vCard contact to their device, open a Uniform Resource Identifier (URI), or compose an e-mail or text message after scanning QR Codes. They can generate and print their own QR Codes for others to scan and use by visiting one of several pay or free QR Code-generating sites or apps. Google has a popular API to generate QR Codes, and apps for scanning QR Codes can be found on nearly all smartphone devices.
QR Codes storing addresses and Uniform Resource Locators (URLs) may appear in magazines, on signs, on buses, on business cards, or on almost any object about which users might need information. Users with a camera phone equipped with the correct reader application can scan the image of the QR Code to display text, contact information, connect to a wireless network, or open a web page in the telephone's browser. This act of linking from physical world objects is termed hardlinkingor object hyperlinking. QR Codes may also be linked to a location to track where a code has been scanned. Either the application that scans the QR Code retrieves the geo information by using GPS and cell tower triangulation (aGPS) or the URL encoded in the QR Code itself is associated with a location.
QR Codes can be used in Google's mobile Android operating system via both their own Google Goggles application or 3rd party barcode scanners like ZXing. The browser supports URI redirection, which allows QR Codes to sendmetadata to existing applications on the device. Nokia's Symbian operating system features a barcode scanner which can read QR Codes, while mbarcode is a QR Code reader for the Maemo operating system. In the Apple iOS, a QR Code reader is not natively included, but more than fifty paid and free apps are available with both scanning capabilities and hard-linking to URI. With BlackBerry devices, the App World application can natively scan QR Codes and load any recognized Web URLs on the device's Web browser. Windows Phone 7.5 is able to scan QR Codes through the Bing search app.
In the USA, QR Code usage is expanding. During the month of June 2011, according to one study, 14 million mobile users scanned a QR Code or a barcode. Some 58% of those users scanned a QR or bar code from their home, while 39% scanned from retail stores; 53% of the 14 million users were men between the ages of 18 and 34. QR Codes are also being tested for "virtual store" formats, particularly in South Koreaand Argentina.
While the adoption of QR Codes in some markets has been slow to begin (particularly in markets such as the United States, where competing standards such as Data Matrix exist), the technology is gaining some traction in the smartphone market. Many Android, Nokia, Blackberry handsets, and the Nintendo 3DS, come with QR Code readers installed. QR reader software is available for most mobile platforms. Moreover, there are a number of online QR Code generators which enable users to create QR Codes for their own needs.
The amount of data that can be stored in the QR Code symbol depends on the datatype (mode, or input character set), version (1,...,40, indicating the overall dimensions of the symbol), and error correction level (L[ow], M[edium], Q[uality], H[igh]). The maximum storage capacities occur for 40-L symbols (version 40, error correction level L), and are as follows (where character refers to individual values of the input mode/datatype, as indicated):
|Numeric only||Max. 7,089 characters (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)|
|Alphanumeric||Max. 4,296 characters (0–9, A–Z [upper-case only], space, $, %, *, +, -, ., /, :)|
|Binary/byte||Max. 2,953 characters (8-bit bytes)|
|Kanji/Kana||Max. 1,817 characters|
Here are some sample QR Code symbols:
Although encrypted QR Codes are not very common, there are a few implementations. An Android app, for example, manages encryption and decryption of QR codes using DES algorithm (56 bits). Japanese immigration use encrypted QR Codes when placing visas in passports.
Codewords are 8 bits long and use the Reed–Solomon error correction algorithm with four error correction levels. The higher the error correction level, the less storage capacity. The following table lists the approximate error correction capability at each of the four levels:
|Level L||7% of codewords can be restored.|
|Level M||15% of codewords can be restored.|
|Level Q||25% of codewords can be restored.|
|Level H||30% of codewords can be restored.|
Due to the design of Reed–Solomon codes and the use of 8-bit codewords, an individual code block cannot be more than 255 codewords in length. Since the larger QR symbols contain much more data than that, it is necessary to break the message up into multiple blocks. The QR specification does not use the largest possible block size, though; instead, it defines the block sizes so that no more than 30 error-correction symbols appear in each block. This means that at most 15 errors per block can be corrected, which limits the complexity of certain steps in the decoding algorithm. The code blocks are then interleaved together, making it less likely that localized damage to a QR symbol will overwhelm the capacity of any single block.
Thanks to error correction, it is possible to create artistic QR Codes that still scan correctly, but contain intentional errors to make them more readable or attractive to the human eye, as well as to incorporate colors, logos and other features into the QR Code block.
The format information records two things: the error correction level and the mask pattern used for the symbol. Masking is used to break up patterns in the data area that might confuse a scanner, such as large blank areas or misleading features that look like the locator marks. The mask patterns are defined on a 6×6 grid that is repeated as necessary to cover the whole symbol. Modules corresponding to the dark areas of the mask are inverted. The format information is protected from errors with a BCH code, and two complete copies are included in each QR symbol.
The message data is placed from right to left in a zigzag pattern, as shown below. In larger symbols, this is complicated by the presence of the alignment patterns and the use of multiple interleaved error-correction blocks.
Four-bit indicators are used to select the encoding mode and convey other information. Encoding modes can be mixed as needed within a QR symbol.
|0001||Numeric encoding (10 bits per 3 digits)|
|0010||Alphanumeric encoding (11 bits per 2 characters)|
|0100||Byte encoding (8 bits per character)|
|1000||Kanji encoding (13 bits per character)|
|0011||Structured append (used to split a message across multiple QR symbols)|
|0111||Extended Channel Interpretation (select alternate character set or encoding)|
|0101||FNC1 in first position (see Code 128 for more information)|
|1001||FNC1 in second position|
|0000||End of message|
After each indicator that selects an encoding mode is a length field that tells how many characters are encoded in that mode. The number of bits in the length field depends on the encoding and the symbol version, as shown below.
Alphanumeric encoding mode stores a message more compactly than the byte mode, but cannot store lower-case letters and has only a limited selection of punctuation marks. Two characters are coded in an 11-bit value by this formula:
- V = 45 × C1 + C2
Alphanumeric character codes are as follows.
The following images offer more information about the QR code.
The use of QR Codes is free of any license. The QR Code is clearly defined and published as an ISO standard.
Denso Wave owns the patent rights on QR Codes, but has chosen not to exercise them. In the USA, the granted QR Code patent is US 5726435, and in Japan JP 2938338. The European Patent Office granted patent EP0672994B1 to Denso Wave, which was then validated into French, British and German patents, all of which are still in force as of November 2011.
The word QR Code itself is a registered trademark of Denso Wave Incorporated.In UK, the trademark is registered as E921775, the word “QR Code”, with a filing date of 03/09/1998. The UK version of the trademark is based on the Kabushiki Kaisha Denso (DENSO CORPORATION) trademark, filed as Trademark 000921775, the word “QR Code”, on 03/09/1998 and registered on 6/12/1999 with the European Union OHIM (Office for Harmonization in the Internal Market).The US Trademark for the word “QR Code” is Trademark 2435991 and was filed on 29/09/1998 with an amended registration date of 13/03/2001, assigned to Denso Corporation.
The word QR CODE is a separate trademark assigned to King Estate Winery Limited, US trademark 85293411.
Micro QR Code is a smaller version of the QR Code standard for applications with less ability to handle large scans. There are different forms of Micro QR Codes as well. The highest of these can hold 35 numeric characters.
Standard QR Code is the QR code standard for applications that possess the ability to handle large scans. A standard QR Code can contain up to 7,089 characters, though not all QR readers can accept that much data.
Malicious QR codes combined with a permissive reader can put a computer's contents and user's privacy at risk. This practice is known as "attaging", a portmanteau of "attack tagging." They are easily created and may be affixed over legitimate QR codes. On a smartphone, the reader's many permissions may allow use of the camera, full internet access, read/write contact data, GPS, read browser history, read/write local storage, and global system changes.