QR Code 2D Barcode Information & Tutorial

Barcode Information | Tutorials | Examples

Overview

QR-Code is a two-dimensional (2D) barcode type similar to Data Matrix or Aztec, which is capable of encoding large amounts of data. QR means Quick Response, as the inventor intended the symbol to be quickly decoded. The data encoded in a QR Code may include alphabetic characters, text, numbers, double characters, and URLs. The symbology uses a small area of square modules with a unique perimeter pattern, which helps the barcode scanner determine cell locations to decode the symbol. IDAutomation’s implementation of QR-Code is based on the ISO/IEC 18004:2015 standard and is also compatible with QR-Code 2005 and ISO/IEC 18004:2006 specifications.

Fig. 1. A 2D QR-Code Symbol Generated with the IDAutomation QR-Code Image Generator.

2D QR Code Barcode Encoding VCARD Contact Info

QR-Code Common Uses

QR Codes are commonly used with mobile and smartphone devices to direct users to additional information about a particular topic or product.

Website URL:

Scanning QR Code URL from screen

QR Code may be used to direct users to a website when the URL is encoded directly. When this is done, the entire URL should always be included and begin with either www or HTTP, for example:
www.bcgen.com

The generated QR Code asks the user if they want to open the encoded website when viewed with the camera app on most iOS and Android devices. IDAutomation offers a free QR Code URL Generator that may be used for this purpose.

WiFi SSID:

QR Codes may be used to easily provide WiFi connections to mobile users.

The common syntax is:
WIFI:T:WPA;S:NetworkName;P:Password;;
where T: is WPA or WEP, S: specifies the name of the network, and P: provides the password.

IDAutomation offers a free QR Code WiFi Access Encoder that may be used for this purpose.

Encoding Product Information:

When a QR Code is used in combination with a product that has an assigned UPC Code or GTIN, GS1 recommends using the GS1-QRCode format or the GS1 Digital Link. This may be used to encode the UPC Code for POS systems and an extended packaging URL for users in a single symbol. The extended packaging URL may include additional product information, demonstration videos, or a user manual, for example.

IDAutomation offers a free GS1 QR Code Generator that may be used for this purpose. When the GS1-QRCode format is used, data is encoded with the FNC1 character (~1) and begins with the AI of (01) to reference the GTIN and proceeds with the (8200) AI to reference the URL, for example:

~101049123451234591598200https://www.bcgen.com

QR Code Scan Results Menu(GS1-QRCode tutorials and examples)

If the GS1-QRCode format is not used, or if the QR-Code is not used in connection with a product that has a GTIN, a simple URL may be encoded, for example, URL: https://www.bcgen.com/

Whether to use the GS1 format or not depends on the requirements of GS1, your trading partners, and the supply chain. When in doubt, contact your local GS1 office for more information.

 

Encoding Contact Information:

Encoding vCard contact information (in MeCard format) on business cards is also a common implementation. The image to the right demonstrates the options available after scanning the barcode in Fig. 1 above with a smartphone app.

The chart below lists other common encoding techniques. The Free MeCard QR Code Generator may be used to generate all codes described below. Simply copy the example below into the Free QR Code Generator, replacing the generic information with yours.

PurposePrefixExamples (IDAutomation does not suggest encoding Tiny URLs or Indirect Links)
Website URLURL:URL:https://www.bcgen.com/
FacebookURL:URL:http://facebook.com/IDAutomation
XURL:URL:http://x.com/IDAutomation
E-mail AddressEMAIL:EMAIL:admin@yoursite.com
Phone NumbersTEL:TEL:+18135142564
MeCard Contact
Information, in
MeCard format
MECARD:MECARD:N:Smith,John;ADR:550 N. Reo St.,Suite
300,Tampa, FL33609;TEL:+18135142564;EMAIL:you@com;URL:bcgen.com
NOTE: Symbols created with the MeCard format only work correctly when scanned with a compatible MeCard app.

QR-Codes may also encode the vCard format; however, these symbols will be larger than the MeCard format. This is an example of the data that would be encoded to create a vCard:

BEGIN:VCARD VERSION:3.0 N:Smith,John FN:Displayname ORG:IDAutomation URL:https://www.idautomation.com/EMAIL:you@com TEL;TYPE=voice,work,pref:+18135142564 END:VCARD

QR Code may also be easily displayed on smartphone devices in place of anything that is normally printed with a barcode, such as coupons, tickets, and passes. When used in this way, the QR Code is displayed on the screen via a website, email, or text and scanned from the screen.

Image Overlay and Center Override

Changing the middle of the QR Code symbol may be necessary to differentiate it from other QR Codes, such as in the case of the QR Bill, used for digital payment transactions. A common method of changing the middle of a QR Code is to overlay an image on top of it. IDAutomation also offers Center Override, which makes use of a Patent Pending process that changes the array of modules in memory that make up the symbol before it is generated.

Generating and Printing

IDAutomation offers a Free QR-Code 2D Barcode Image Generator, designed to encode a MeCard business card barcode or URL, which can encode up to 200 characters. The capability to encode more than 200 characters is available in the products described below.

The IDAutomation QR Code Barcode Font and Encoder is a collection of encoders and components that generate QR Codes with either fonts or graphics. Several types of QR Code encoders are available in the package to support multiple operating systems, including Windows 32 and 64-bit systems, Mac OS X, Unix, and Linux. The package also includes the IDAutomation_QRFontEncoder(DataToEncode) function to easily generate symbols from VBA code in Microsoft Office 365 and VB code in OpenOffice, in addition to support for development environments including .NET, Java, C#, VB, and C++.

QR-Code is also offered in several barcode components, such as the ASPX Script, Crystal Reports Barcode Generator, .NET, Java, SSRS Power BI, and Streaming Server for IIS, as well as the 2D QR-Code Image Generator for Windows and the Barcode Label Software Pro.

Symbol Size

QR-Codes are some of the smallest and most dependable barcodes in use today; however, they are generally not as small as Data Matrix and Aztec symbols. QR-Code is also a good choice when sending barcodes over faxed documents because the symbol can withstand many poor resolution and scanning issues, especially when using IDAutomation’s 2D S font.

According to the specification, a quiet zone of four times the size of one module is required on all sides of the QR-Code symbol. The quiet zone should be the same color as the background within the symbol. This quiet zone of QR Code is also larger than the Data Matrix, which only requires one module.

Choosing the correct encoding mode and the lowest error correction of “L” (or parameter 2) will help ensure the symbol size is as small as possible.

Verifying QR-Code Symbols

IDAutomation offers 2 products to assist in verification:

  1. For a desktop system with a USB-connected scanner, use the Barcode Scanner ASCII String Decoder.
  2. To verify with an app on a mobile device, use the Barcode Data Decoder Verifier App.

Both products reveal hidden control characters such as the FNC1, GS, RS, and EOT. The app contains the additional capability to decode HRI in GS1 symbols and reveal other data, such as Base64 encoded strings. When downloaded to a mobile device, it can be easily read from the screen or printed material. It also reveals information about the symbol, including the size, error correction, and encoding method. It also supports the decoding of UTF-8.

The IDAutomation Barcode Data Decoder Verifier App decodes HRI in GS1 symbols

Error Correction | Encoding Modes

Products such as the IDAutomation QR-Code Barcode Fonts and the QR-Code Components all support the encoding modes listed below. By default, the encoding mode for most components is “byte” and an error correction level of M (15%). If the choice is to encode numbers and uppercase text only, and size is a concern, a change of the encoding mode to Alpha-Numeric may produce a smaller symbol. Auto Encoding Mode is also available in many products to compress the symbol size when the data includes many numbers or uppercase letters. To verify the encoding mode in a symbol, use the Barcode Scanner ASCII String Decoder.

EncodingParameter*Description
Auto-1(Default) With products supporting Auto-encoding mixed mode.
Byte0Encodes any data byte by byte.
Alpha-Numeric1Encodes numbers and uppercase letters.
Numeric2Encodes only numbers.

Four levels of Reed-Solomon error correction are referred to as L, M, Q, and H. The error correction levels allow verification of data and recovery if part of the symbol is damaged. Increasing the error correction level increases the symbol size and reduces data capacity. The percentage of recovery and capacity noted below is approximate. To generate the smallest symbol, choose error correction “L” or parameter “2”. To verify the error correction in a symbol, use the Barcode Scanner ASCII String Decoder.

Error Correction Level% of RecoveryByte Capacity at Size 24 Parameter*
L7%11712
M15%9110
Q25%6613
H30%5111

* The parameter selection is the parameter to use in IDAutomation’s QR Code Font and Encoder and other QR Code Components.

The Denso Wave website offers more specific information about encoding modes.

Symbol Version | Micro QR-Code

The version is the size of the symbol from (1) 21×21 to (40) 177×177. Zero is the automatic selection and the default. If the symbol needs to be larger than the selection, the component automatically overrides this value. Review information capacity and versions for more information.

Micro QR-Code symbols may also be generated with the setting of (-4) for automatic. Micro QR-Code is only available in products that support GS1 QR-Code. The size of the micro QR-Code symbol is from (-4) 11×11 to (-1) 17×17. The largest micro symbol can hold 35 numeric characters in numeric encoding mode with error correction level set to L (2). If the symbol needs to be larger than the selection, the component automatically overrides Micro QR-Code mode and creates a standard QR-Code symbol. Choosing the correct encoding mode and the lowest error correction L (2) will help ensure the symbol is as small as possible. The following is a Micro QR-Code encoding 1234567890123456789012 in numeric mode with error correction L (2).

Micro QR-Code symbol

The Denso Wave website offers more specific information about versions and sizes.

Control Characters | Tilde

IDAutomation QR Code Barcode Fonts, Components, and Applications use the tilde character “~” to recognize special characters when “Apply Tilde” or “Process Tilde” is enabled. QR Code allows ASCII codes to be easily encoded for various functions, such as tabs and returns. These functions are not usually visible when scanned unless the Barcode Scanner ASCII String Decoder is used with a scanner that has lower ASCII capability, such as the IDAutomation 2D Barcode Scanner with Control + ASCII mode enabled.

  • When ProcessTilde is enabled, the following options are available:
    • ~1 represents the GS1 FNC1 in the first position (in supporting products).
    • ~2 represents the AIM FNC1 in the second position (in supporting products).
    • ~CO is a center override function available in products updated in 2020 or later.
    • ^| enables TLV (Tag-Length-Value) encoding. When the first two characters are ^|  TLV values separated by | are encoded. Available in products updated 2022 or later.
    • | enables TLV in Base64 encoding. This allows TLV fields to be encoded in Base64 when | is the first character encoded. Available in products updated 2022 or later.
    • = enables Base 64 encoding. When the first character is “=”, all data is encoded in Base64. Available in products updated 2022 or later.
    • ~ENNN encodes ECI Data in supporting products.
    • ~dNNN represents the ASCII character encoded by the 3-digit NNN.
      • For example:
        ~d009 represents a tab,
        ~d013 represents a return,
        ~d029 represents the <GS> character and
        ~d065 represents the character ‘A’.

    In many development environments, Chr or Char may also be used to encode the ASCII value directly. For example, the programming examples below encode “QR” <tab> CODE:

    Java:
    DataToEncode= “QR” + (char)9 + “CODE”;
    VB: DataToEncode= “QR” & Chr(9) & “CODE”

Reading QR Code Barcodes

The most common method of reading printed QR-Code barcodes is with a camera-based image reader (aka: barcode imager). Most of the hand-held barcode imagers recommended by IDAutomation perform keyboard emulation and receive power from the USB port, so that no external power supply is needed. When a QR-Code barcode symbol is read using keyboard emulation, the data appears at the cursor as if it had been typed in from the keyboard. When reading QR-Code barcodes from the screen of a mobile device, it is necessary to use an advanced imager such as a 2D USB Scanner. Advanced 2D scanners also read from mobile devices and screens, as demonstrated in this video. In many cases, it may be desired to have the scanner trigger a form or action in an application. IDAutomation has documented simple methods of accomplishing this task in the USB Barcode Scanner Application Integration Guide.

Encoding Byte, Double Byte, Kanji, Unicode, and Extended ASCII Characters

To encode any type of data in QR Code, including files, photos, double-byte, kanji, and Extended ASCII Characters, use the byte encoding mode. For information about encoding UTF-8 and Unicode characters, refer to the UTF-8 and Unicode Encoding FAQ. Some products also offer Extended Channel Interpretation (ECI) as an alternative Unicode encoding option.

When reading this type of data from a QR Code, ensure the barcode scanner is capable of reading and decoding bytes of data. With some scanners, this is only possible via the serial interface option with data bits set to 8N and special software. Normally, USB-attached scanners do not support extended characters above ASCII 128 and only scan characters that are actually on the keyboard. Contact the scanner vendor for more information; some of the scanner’s internal settings may also have to be modified. For information about reading UTF-8 and Unicode characters, refer to the UTF-8 and Unicode Encoding FAQ.

The QR Code specification provides a method to encode Kanji characters directly. All IDAutomation products provide byte encoding, which is the recommended method of encoding Kanji for several reasons, including support issues.

Amount of Data Encoded

It is recommended to limit the amount of data encoded in each symbol to 800 characters or fewer if possible. The ISO/IEC 18004 specifications state that up to 2900 bytes and 4200 ASCII characters may be encoded in a single symbol; however, few imagers can dependably decode symbols that large. The amount of data that can be encoded will vary depending on the type of data, the encoding mode, and what the scanner can read.

Mask Patterns

The mask pattern determines which modules are dark and which are light to make it as easy as possible for a QR Code scanner to decode the data. This was important in the early 2000s when matrix-based decoding systems were not as advanced as they are today. With today’s modern matrix decoders, all mask patterns will decode properly in nearly the same amount of time. Because the mask patterns take many calculations to compute, some IDAutomation products released after April 2016 include an option to bypass this calculation to make barcode generation faster.

About the Inventor | Patent Infringement Claims | License Fees

Denso Wave, Inc. invented the QR-Code symbology and owns several patents for this 2D Code. A notification on their website states that no license or royalty fees are required, provided that a proper copyright notice is included that refers to Denso Wave, Inc. as the copyright owner. No trademark comment is necessary in cases where only a QR Code image is used.
Patent Infringement Claims

There have been reported patent Infringement claims (Patent Numbers: 6,199,048 and 8,131,597) regarding the use of “indirect links”, also referred to as “tiny URLs” embedded in QR-Code symbols. Therefore, when encoding URLs in QR-Code, IDAutomation suggests encoding the entire URL. IDAutomation provides the generation component and fonts to generate QR-Code symbols; IDAutomation is not responsible for the data encoded. This suggestion is not to be considered legal advice because IDAutomation does not provide legal advice.

Frequently Asked Questions (FAQ)

What is a QR Code?

A QR Code is a two-dimensional (2D) barcode symbology capable of encoding numeric, alphanumeric, byte/binary and even Kanji characters. It was designed for quick response and higher data capacity than a standard 1D barcode. For detailed technical overview see the BarcodeFAQ QR Code guide.

What are common uses of QR Codes?

QR Codes are widely used to link users (via smartphone cameras) to websites or digital content, embed contact information (vCards), WiFi network credentials, product information (including via GS1 Digital Link), ticketing, and more.

How do I generate QR Codes?

To create QR Codes you’ll need a generator, font or component that supports the encoding specification (e.g., ISO/IEC 18004) and your data (URL, text, GS1 AI, etc.). For example, the IDAutomation QR Code Barcode Font Package provides font-based generation, and the IDAutomation Native Generator or Components offer application/SDK integration.

What is the best way to generate QR Codes in Crystal Reports?

The most efficient and reliable way to generate QR Codes in Crystal Reports is by using IDAutomation’s Native Barcode Generator for Crystal Reports. This solution embeds the QR Code generation directly into the report, eliminating the need for external fonts or DLLs while ensuring accurate, high-quality barcode output.

What are the key technical considerations when using QR Codes?

Important factors include selecting the correct data mode (numeric, alphanumeric, byte, Kanji), choosing the appropriate version (size from 21×21 modules upward), setting error-correction level (L, M, Q, H), ensuring a proper quiet zone around the symbol, and verifying readability on your surface or media. The Encoding Modes Section delves into these details.

What benefits do QR Codes offer over traditional 1D barcodes?

Compared to typical linear barcodes, QR Codes offer far greater data capacity, can be scanned in any orientation (360°) because of their finder patterns and alignment modules, can embed URLs and richer content for mobile engagement, and support higher error correction tolerance. According to GS1 US, QR Codes enable encoding of much more information than 1D barcodes. GS1 US overview.

What is Auto Encoding Mode in the IDAutomation QR Code .NET Font Encoder?

Auto Encoding Mode is a new update that automatically detects the best encoding mode for your data—numeric, alphanumeric, byte, or Kanji—without requiring manual selection. This helps generate smaller, more efficient QR Codes and reduces configuration steps. For details, see the 2025 QR Code .NET Encoder Update.

What are the benefits of the new Auto Encoding Mode?

The Auto Encoding Mode chooses the optimal encoding automatically, which improves symbol efficiency, reduces potential encoding errors, and ensures more compact QR Codes. This is especially helpful when dynamically generating QR Codes with variable data, such as in Crystal Reports, BI Publisher, or Word mail merge automation.

How do I update to the latest QR Code .NET Font Encoder version?

To access the new Auto Encoding Mode, download the most recent version from your IDAutomation account. Active licenses with a Level 2 Support Subscription receive the update at no additional cost. After downloading, replace the existing DLLs or files used in your project and regenerate your QR Codes for best results. No license? Purchase the QR Code Font and Enocder here

Does Auto Encoding Mode affect GS1, Digital Link, or ECI encoding?

No—Auto Encoding Mode enhances these workflows. The update adds improved GS1 Digital Link support and full ECI (Extended Channel Interpretation) compatibility, allowing proper encoding of multilingual or extended character sets. When encoding GS1 or Digital Link data, the encoder automatically selects the most efficient mode while maintaining GS1 compliance.