You can create a QR code on the fly with a URL GET request.
QR codes are a popular type of two-dimensional barcode. They are also known as hardlinks or physical world hyperlinks. QR Codes store up to 4,296 alphanumeric characters of arbitrary text. This text can be anything, for example URL, contact information, a telephone number, even a poem! QR codes can be read by an optical device with the appropriate software. Such devices range from dedicated QR code readers to mobile phones.
QR code requests support the following URL query parameters after the ? in the root URL:
|Parameter||Required or Optional||Description|
||Required||Specifies a QR code.|
||Required||The data to encode. Data can be digits (0-9), alphanumeric characters, binary bytes of data, or Kanji. You cannot mix data types within a QR code. The data must be UTF-8 URL-encoded. Note that URLs have a 2K maximum length, so if you want to encode more than 2K bytes (minus the other URL characters), you will have to send your data using POST.|
||Optional||How to encode the data in the QR code. Here are the available values:
QR Code Details [Optional Reading]
Here is a little more about how QR codes work; you don't necessarily need to know this to be able to generate a QR code.
QR codes are squares, with an equal number of rows and columns. There are a fixed set of QR code sizes: from 21 to 177 rows/columns, increasing in steps of four. Each configuration is called a version. The more rows/columns, the more data the code can store. Here is a summary of the versions:
- Version 1 has 21 rows and 21 columns, and can encode up to 25 alphanumeric characters
- Version 2 has 25 rows and 25 columns, and can encode up to 47 alphanumeric characters
- Version 3 has 29 rows and 29 columns, and can encode up to 77 alphanumeric characters
- Version 40 has 177 rows and 177 columns, and can encode up to 4,296 alphanumeric characters
Don't confuse the number of rows and columns with size of the QR code image.
The pixel size of the code is determined using
chs as usual.
The API will determine which version to use, based on the amount of data you provide.
The appropriate QR code version will be returned depending on the number
of characters you provide. For example, if you provide 55 alphanumeric characters,
you will get a Version 3 QR code, although this can change if you specify an error correction (EC) level explicitly using the
Before generating your QR code, consider what kind of device is used to read your code: the best QR code readers are able to read Version 40 codes; mobile devices might only be able to read up to Version 4.
The following table summarizes the characteristics of a few different versions:
|Version||Rows x Columns||EC level||Maximum characters by EC level and character type|
|Digits: 0 to 9||Alphanumeric:
0 to 9, A to Z,
space, $ % * + - . / :
Further Information and Standards
The QR code standard is trademarked by Denso Wave, Inc.
The ISO sells the English language specification on their site. The Japanese version is free.
QR code standards are approved as:
- AIM International (Automatic Identification Manufacturers International) standard (ISS - QR Code) in October 1997.
- JEIDA (Japanese Electronic Industry Development Association) standard (JEIDA-55) in March 1998.
- JIS (Japanese Industrial Standards) standard (JIS X 0510) in January 1999.
- ISO international standard (ISO/IEC18004) in June 2000.
QR code reader software is available from many sources. Google offers a QR Code reader library, Zebra Crossing (ZXing), for free. See http://code.google.com/p/zxing/ for details.
See Barcode Contents for a rough guide to standard encoding of information in barcodes