QR code


A QR code is a type of matrix barcode first designed in 1994 for the automotive industry in Japan. A barcode is a machine-readable optical label that contains information about the item to which it is attached. In practice, QR codes often contain data for a locator, identifier, or tracker that points to a website or application. A QR code uses four standardized encoding modes to store data efficiently; extensions may also be used.
The Quick Response system became popular outside the automotive industry due to its fast readability and greater storage capacity compared to standard UPC barcodes. Applications include product tracking, item identification, time tracking, document management, and general marketing.
A QR code consists of black squares arranged in a square grid on a white background, which can be read by an imaging device such as a camera, and processed using Reed–Solomon error correction until the image can be appropriately interpreted. The required data is then extracted from patterns that are present in both horizontal and vertical components of the image.

History

The QR code system was invented in 1994 by Masahiro Hara from the Japanese company Denso Wave. Its purpose was to track vehicles during manufacturing; it was designed to allow high-speed component scanning. QR codes are now used in a much broader context, including both commercial tracking applications and convenience-oriented applications aimed at mobile-phone users. QR codes may be used to display text to the user, to add a vCard contact to the user's device, to open a Uniform Resource Identifier, to connect to a wireless network, or to compose an email or text message. There are a great many QR code generators available as software or as online tools that are either free, or require a paid subscription. The QR code has become one of the most-used types of two-dimensional code.

Adoption

During the month of June 2011, according to one study, 14 million American mobile users scanned a QR code or a barcode. Some 58% of those users scanned a QR or barcode from their homes, while 39% scanned from retail stores; 53% of the 14 million users were men between the ages of 18 and 34. QR code usage decreased at 9.76 million on 2018 but is expected to grow to a total of 11 million households by the end of 2020.

Standards

There are several standards that cover the encoding of data as QR codes:
Defines QR code models 1 and 2 symbols.
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.
Renames the QR Code 2005 symbol to QR Code and adds clarification to some procedures and minor corrections.
At the application layer, there is some variation between most of the implementations. Japan's 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.

Uses

QR codes have become common in consumer advertising. Typically, a smartphone is used as a QR code scanner, displaying the code and converting it to some useful form.
QR code has become a focus of advertising strategy, since it provides a way to access a brand's website more quickly than by manually entering a URL. Beyond mere convenience to the consumer, the importance of this capability is that it increases the conversion rate: the chance that contact with the advertisement will convert to a sale. It coaxes interested prospects further down the conversion funnel with little delay or effort, bringing the viewer to the advertiser's website immediately, where a longer and more targeted sales pitch may lose the viewer's interest.
Although initially used to track parts in vehicle manufacturing, QR codes are used over a much wider range of applications. These include commercial tracking, entertainment and transport ticketing, product and loyalty marketing and in-store product labeling. Examples of marketing include 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.
They can also be used in storing personal information for use by organizations. An example of this is Philippines National Bureau of Investigation where NBI clearances now come with a QR code. Many of these applications target mobile-phone users. Users may receive text, add a vCard contact to their device, open a URL, 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 had an API, now deprecated, to generate QR codes, and apps for scanning QR codes can be found on nearly all smartphone devices.
QR codes storing addresses and URLs may appear in magazines, on signs, on buses, on business cards, or on almost any object about which users might want 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 hardlinking or object hyperlinking. QR codes also may 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 or the URL encoded in the QR code itself is associated with a location. In 2008, a Japanese stonemason announced plans to engrave QR codes on gravestones, allowing visitors to view information about the deceased, and family members to keep track of visits. Psychologist Richard Wiseman was one of the first authors to include QR codes in a book, in .
QR codes have been incorporated into currency. In June 2011 The Royal Dutch Mint issued the world's first official coin with a QR code to celebrate the centenary of its current building and premises. The coin can be scanned by a smartphone and link to a special website with contents about the historical event and design of the coin. In 2014 the Central Bank of Nigeria issued a 100-naira banknote to commemorate its centennial, the first banknote to incorporate a QR code in its design. When scanned with an internet-enabled mobile device, the code goes to a website which tells the centenary story of Nigeria. In 2015, the Central Bank of the Russian Federation issued a 100-rubles note to commemorate the annexation of Crimea by the Russian Federation. It contains a QR code into its design, and when scanned with an internet-enabled mobile device, the code goes to a website that details the historical and technical background of the commemorative note. In 2017, the Bank of Ghana issued a 5-cedis banknote to commemorate 60 years of Central Banking in Ghana, and contains a QR code in its design, which when scanned with an internet-enabled mobile device, that code goes to the official Bank of Ghana website.
Credit card functionality is under development. In September 2016, the Reserve Bank of India launched the eponymously named Bharat QR, a common QR code jointly developed by all the four major card payment companies - National Payments Corporation of India that runs RuPay cards along with MasterCard, Visa and American Express. It will also have the capability of accepting payments on the unified payments interface platform.

Augmented reality

QR codes are used in some augmented reality systems to determine the positions of objects in 3-dimensional space. QR Codes are also being used to deliver Augmented Reality experiences.

Mobile operating systems

QR codes can be used on various mobile device operating systems. iPhones running on iOS 11 and higher and some Android devices can natively scan QR codes without downloading an external app. The camera app is able to scan and display the kind of QR code along with the link. These devices support URL redirection, which allows QR codes to send metadata to existing applications on the device. Many paid or free apps are available with the ability to scan the codes and hard-link to an external URL.

Construction sites

Application of QR Codes in the field of Construction have already started in India saving time, paper and energy. The use of QR Code technology in the Safety Vertical of Construction industry aids in usage of resources, allocation of time, and usage of critical information. The dynamic nature of the construction industry requires the need for dynamic technologies and the use of QR codes aids in developing that technology for future usages.

URLs

URLs aided marketing conversion rates even in the pre-smartphone era, but during those years faced several limitations: ad viewers usually had to type the URL and often did not have a web browser in front of them when they first viewed the ad. The chances were high that they would forget to visit the site later, not bother to type a URL, or forget what URL to type. Semantic URLs decreased these risks but did not eliminate them. With the advent of smartphones the issue of viewers not being able to access a website immediately has become less of an issue, however the trouble of typing in URLs still remained and thus QR codes were used in order to allow redirecting to URLs for instant access. Some QR code generators offer an additional feature - dynamic QR codes. Dynamic QR codes can have their end website edited over and over again because even though they themselves cannot be modified, they link to a placeholder URL that redirects the scanner to the website that they actually see. This placeholder's redirect can be customized unlike a regular QR code, which has no "in-between" site and links directly to a site that cannot be changed. The placeholder can also have additional functions like analytics of the code's scanners.

Virtual stores

QR codes have been used to establish "virtual stores", where a gallery of product information and QR codes is presented to the customer, e.g. on a train station wall. The customers scan the QR codes, and the products are delivered to their homes. This use started in South Korea, and Argentina, but is currently expanding globally. Walmart, Procter & Gamble and Woolworths have already adopted the Virtual Store concept.

QR code payment

QR codes can be used to store bank account information or credit card information, or they can be specifically designed to work with particular payment provider applications. There are several trial applications of QR code payments across the world. In developing countries like China and India, QR code payment is a very popular and convenient method of making payments. Since Alipay designed a QR code payment method in 2011, mobile payment has been quickly adopted in China. As of 2018, around 83% of all payments were made via mobile payment.
In November 2012, QR code payments were deployed on a larger scale in the Czech Republic when an open format for payment information exchange — a Short Payment Descriptor — was introduced and endorsed by the Czech Banking Association as the official local solution for QR payments. In 2013, the European Payment Council provided guidelines for the EPC QR code enabling SCT initiation within the Eurozone.

Website login

QR codes can be used to log into websites: a QR code is shown on the login page on a computer screen, and when a registered user scans it with a verified smartphone, they will automatically be logged in. Authentication is performed by the smartphone which contacts the server. Google tested such a login method in January 2012.

Joining a Wi‑Fi network

By specifying the SSID, encryption type, password/passphrase, and if the SSID is hidden or not, mobile device users can quickly scan and join networks without having to manually enter the data. Note that this technique is valid for specifying only static SSID passwords ; dynamic user credentials cannot be encoded in this manner.
The format of the encoded string is:
WIFI:S:;T:;P:;H:;

Order of fields does not matter. Special characters """, ";", ",", ":" and "\" should be escaped with a backslash as in MECARD encoding. For example, if an SSID were "foo;bar\baz", with quotation marks part of the literal SSID name itself, this would be encoded as: WIFI:S:\"foo\;bar\\baz\";;
As of January 2018, iPhones have this feature built into the camera app under iOS 11.x. Android users may have the feature built into one of the device's stock apps or can install one of several available free apps such as "Barcode Scanner" or "QR Droid" to perform the QR Wi-Fi join.

Funerary use

A QR code can link to an obituary and can be placed on a headstone. In 2008, Ishinokoe in Yamanashi Prefecture, Japan began to sell tombstones with QR codes produced by IT DeSign, where the code leads to a virtual grave site of the deceased. Other companies, such as Wisconsin based Interactive Headstones, have also begun implementing QR codes into tombstones. In 2014, the Jewish Cemetery of La Paz in Uruguay began implementing QR codes for tombstones.

TOTP use

QR codes are also used in scanning TOTP secrets to generate time-based one-time passwords.

Encryption

Encrypted QR codes, which are not very common, have a few applications. For example, the Japanese immigration system uses encrypted QR codes on landing permission stamps in passports.

Video games

Popular video games, such as Fez, The Talos Principle, and Watch Dogs, have incorporated QR codes as story and gameplay elements. Mobile games such as Munzee use geolocation in combination with QR codes to create a game that is played in the real world by scanning QR stickers in physical locations.

Loyalty programs

QR Codes have been used by various retail outlets that have loyalty programs. Usually, these programs are in the form of an app that users can download onto their phone and comes with a feature to scan QR codes, which are found printed on the receipt received when making a purchase, allowing users to collect award points simply by scanning the code.

Counterfeit detection

Serialised QR Codes have been used by brands and governments to let consumers, retailers and distributors verify the authenticity of the products and help with detecting counterfeit products, as part of a brand protection program. However, the security level of a regular QR Code is limited since QR Codes printed on original products are easily reproduced on fake products, even though the analysis of data generated as a result of QR Code scanning can be used to detect counterfeiting and illicit activity. A higher security level can be attained by embedding a digital watermark or copy detection pattern into the image of the QR Code. This makes the QR Code more secure against counterfeiting attempts, and fake products which contain a counterfeit QR Code can be detected by scanning the secure QR Code with a specific app.

Food traceability

Different studies have been made to assess the effectiveness of QR Codes as a means of conveying labelling information and their use as pat of a food traceability system. In, it was found that when provided free access to a smartphone with QR Code scanning app, 52.6% of participants would use it to access labelling information. A study made in South Korea showed that consumers appreciate QR code used in food traceability system, as they provide detailed information about food, as well as information that helps them in their purchasing decision. If QR Codes are serialised, consumers can access a web page showing the supply chain for each ingredient, as well as information specific to each related batch, including meat processors and manufacturers, which helps address the concerns they have about the origin of their food.

Design

Unlike the older, one-dimensional barcodes that were designed to be mechanically scanned by a narrow beam of light, a QR code is detected by a 2-dimensional digital image sensor and then digitally analyzed by a programmed processor. The processor locates the three distinctive squares at the corners of the QR code image, using a smaller square near the fourth corner to normalize the image for size, orientation, and angle of viewing. The small dots throughout the QR code are then converted to binary numbers and validated with an error-correcting algorithm.

Storage

The amount of data that can be stored in the QR code symbol depends on the datatype, version, and [|error correction] level. The maximum storage capacities occur for version 40 and error correction level L, denoted by 40-L:
Input modeMax. charactersBits/char.Possible characters, default encoding
Numeric only7,0893⅓0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Alphanumeric4,2960–9, A–Z, space, $, %, *, +, -,., /, :
Binary/byte2,9538ISO 8859-1
Kanji/kana1,81713Shift JIS X 0208

Here are some sample QR code symbols:

Error correction

QR codes use Reed–Solomon error correction over the finite field, the elements of which are encoded as bytes of 8 bits; the byte with a standard numerical value encodes the field element where is taken to be a primitive element satisfying. The Reed–Solomon code uses one of 37 different polynomials over, with degrees ranging from 7 to 68, depending on how many error correction bytes the code adds. It is implied by the form of Reed–Solomon used that these polynomials are all on the form, however the rules for selecting the degree are specific to the QR standard.
When discussing the Reed–Solomon code phase there is some risk for confusion, in that the QR ISO standard uses the term codeword for the elements of, which respect to the Reed–Solomon code are symbols, whereas it uses the term block for what with respect to the Reed–Solomon code are the codewords. The number of data versus error correction bytes within each block depends on the version of the QR symbol and the error correction level, of which there are four. 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:
In larger QR symbols, the message is broken up into several Reed–Solomon code blocks. The block size is chosen so that no attempt is made at correcting more than 15 errors per block; this limits the complexity of 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.
Due 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.
It is also possible to design artistic QR codes without reducing the error correction capacity by manipulating the underlying mathematical constructs.

Encoding

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 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 dataset 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.
The general structure of a QR encoding is as a sequence of 4 bit indicators with payload length dependent on the indicator mode.
Mode indicatorDescriptionTypical structure ''
0001Numeric
0010Alphanumeric
0100Byte encoding
1000Kanji encoding
0011Structured append
0111ECI
0101FNC1 in first position
1001FNC1 in second position
0000End of message

Four-bit indicators are used to select the encoding mode and convey other information.
IndicatorMeaning
0001Numeric encoding
0010Alphanumeric encoding
0100Byte encoding
1000Kanji encoding
0011Structured append
0111Extended Channel Interpretation
0101FNC1 in first position
1001FNC1 in second position
0000End of message

Encoding modes can be mixed as needed within a QR symbol.

--> --> etc... -->

After every 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.
EncodingVer. 1–910–2627–40
Numeric101214
Alphanumeric91113
Byte81616
Kanji81012

Alphanumeric encoding mode stores a message more compactly than the byte mode can, but cannot store lower-case letters and has only a limited selection of punctuation marks, which are sufficient for rudimentary web addresses. Two characters are coded in an 11-bit value by this formula:
This has the exception that the last character in an alphanumeric string with an odd length is read as a 6-bit value instead.
CodeCharacterCodeCharacterCodeCharacterCodeCharacterCodeCharacter
00009918I27R36Space
01110A19J28S37$
02211B20K29T38%
03312C21L30U39*
04413D22M31V40+
05514E23N32W41
06615F24O33X42.
07716G25P34Y43/
08817H26Q35Z44:

Decoding example

The following images offer more information about the QR code.

Variants

Model 1

Model 1 QR code is an older version of the specification. It is visually similar to the widely seen model 2 codes, but lacks alignment patterns.

Micro QR code

Micro QR code is a smaller version of the QR code standard for applications where symbol size is limited. There are four different versions of Micro QR codes: the smallest is 11×11 modules; the largest can hold 35 numeric characters.

IQR code

IQR Code is an alternative to existing QR codes developed by Denso Wave. IQR codes can be created in square or rectangular formations; this is intended for situations where a rectangular barcode would otherwise be more appropriate, such as cylindrical objects. IQR codes can fit the same amount of information in 30% less space. There are 61 versions of square IQR codes, and 15 versions of rectangular codes. For squares, the minimum size is 9x9 modules; rectangles have a minimum of 19x5 modules. IQR codes add error correction level S, which allows for 50% error correction. IQR Codes have not yet been given an ISO specification, and only proprietary Denso Wave products can create or read IQR codes.

SQRC

Secure Quick Response code is a type of QR code that contains a "private data" segment after the terminator instead of the specified filler bytes "ec 11". This private data segment must be deciphered with an encryption key. This can be used to store private information and to manage company's internal information.

QRGraphy

The QR Code with graphical items or logo and colors. These qr_codes have 2 types: Graphical and Transparent. QRGraphy is attractive for designers, marketing and advertising.

Frame QR

Frame QR is a QR code with a “canvas area” that can be flexibly used. In the center of this code is the canvas area, where graphics, letters, and more can be flexibly arranged, making it possible to lay out the code without losing the design of illustrations, photos, etc.

HCC2D

Researchers have proposed a new High Capacity Colored 2-Dimensional Code, which builds upon a QR code basis for preserving the QR robustness to distortions and uses colors for increasing data density. The HCC2D code specification is described in details in Querini et al., while techniques for color classification of HCC2D code cells are described in detail in Querini and Italiano, which is an extended version of Querini and Italiano.
Introducing colors into QR codes requires addressing additional issues. In particular, during QR code reading only the brightness information is taken into account, while HCC2D codes have to cope with chromatic distortions during the decoding phase. In order to ensure adaptation to chromatic distortions which arise in each scanned code, HCC2D codes make use of an additional field: the Color Palette Pattern. This is because color cells of a Color Palette Pattern are supposed to be distorted in the same way as color cells of the Encoding Region. Replicated color palettes are used for training machine learning classifiers.

JAB code

JAB code is a color 2D matrix symbology made of colorful square modules arranged in either square or rectangle grids made by Fraunhofer SIT.
JAB code contains one master symbol and optionally multiple slave symbols. Master one contains four finder patterns located at the corners of the symbol. The software is open-source.

License

The use of QR code technology is freely licensed as long as users follow the standards for QR Code documented with JIS or ISO. Non-standardized codes may require special licensing.
Denso Wave owns a number of patents on QR code technology, but has chosen to exercise them in a limited fashion. In order to promote widespread usage of the technology Denso Wave chose to waive its rights to a key patent in its possession for standardized codes only. In the US, the granted QR code patent is, and in Japan. The European Patent Office granted patent to Denso Wave, which was then validated into French, UK, and German patents, all of which expired in March 2015.
The text QR Code itself is a registered trademark and wordmark 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 trademark, filed as Trademark 000921775, the word "QR Code", on 03/09/1998 and registered on 6/12/1999 with the European Union OHIM.
The U.S. Trademark for the word "QR Code" is Trademark 2435991 and was filed on 29 September 1998 with an amended registration date of 13 March 2001, assigned to Denso Corporation.

Risks

The only context in which common QR codes can carry executable data is the URL data type. These URLs may host JavaScript code, which can be used to exploit vulnerabilities in applications on the host system, such as the reader, the web browser or the image viewer, since a reader will typically send the data to the application associated with the data type used by the QR code.
In the case of no software exploits, malicious QR codes combined with a permissive reader can still put a computer's contents and user's privacy at risk. This practice is known as "attagging", a portmanteau of "attack tagging". They are easily created and can be affixed over legitimate QR codes. On a smartphone, the reader's 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.
Risks include linking to dangerous web sites with browser exploits, enabling the microphone/camera/GPS, and then streaming those feeds to a remote server, analysis of sensitive data, and sending email/SMS/IM messages or DDOS packets as part of a botnet, corrupting privacy settings, stealing identity, and even containing malicious logic themselves such as JavaScript or a virus. These actions could occur in the background while the user is only seeing the reader opening a seemingly harmless web page. In Russia, a malicious QR code caused phones that scanned it to send premium texts at a fee of US$6 each.