Encode It With QR Codes

by Paul Arnote (parnote)

You see them everywhere. Little black boxes with smaller black and white squiggly boxes in them. They may be on your passport, the bottle of ketchup you bought, printed in the newspaper or magazine you are reading, or on your next concert ticket. If you don’t have a smartphone, you probably never gave them a second thought. If you do have a smartphone, then chances are pretty good that you not only know what these are, but you have also used them.


Shown above is most of the first paragraph of this article. I am one of those people who fell into both categories. I just got my smartphone – a Motorola Razr Maxx. Until I got it, I really didn’t give the “little black boxes with black and white squiggly boxes” a second thought. But now that I have my smartphone, it’s easy to see how useful they can be.

Called QR codes (for Quick Response codes), they were invented in 1994 by Denso Wave, a subsidiary of Toyota Motors Corporation. Their initial use was to track vehicles through the manufacturing process. It’s essentially a two-dimensional barcode that’s designed to be decoded at high speed. While Denso Wave still retains the patent rights on QR codes, they can be used without license and their standards are clearly defined and published as an ISO standard. Denso Wave has chosen not to exercise their patent rights over QR codes, which has facilitated its meteoric rise in popularity among smartphone users.

The older style UPC barcode was designed to be mechanically scanned by a narrow beam of light. QR codes work a bit differently. Here’s the explanation from Wikipedia:

The QR code is detected as a 2-dimensional digital image by a semiconductor image sensor and is then digitally analyzed by a programmed processor. The processor locates the three distinctive squares at the corners of the image, and normalizes image size, orientation, and angle of viewing. The small dots are then converted to binary numbers and validity checked with an error-correcting code.

So How Do I Use Them?

Using QR codes is actually quite simple. On your smartphone, you will need to download and install a QR code reader app. Start the app and scan the QR code with the camera on your smartphone. The app will take care of decoding the QR code and display it on your smartphone’s screen.

There are several QR code reader apps available, and most are free. I use the free QR Droid widget app, which I downloaded from the Google Play store on my Android phone. Visit the website for the app to learn more, or to search for other similar apps. This article is about QR codes themselves, and not one specific reader.

Not All Created Equal

Currently, there are 40 (count them) different versions of the QR code standard, each defined by a different overall size of the image. By trial and error, using six samples of different QR code versions displayed on Wikipedia, I discovered that my app doesn’t decode version 40 of the QR codes. But, almost everything else I scanned was readable.

There are also some proprietary adaptations of QR codes that you may not be able to read. Just as with most anything else, there are forks, variations and adaptations of QR codes for specialized purposes. One such example is the “Micro QR” codes, which are also unreadable by the app on my phone.

Thanks to built-in error correction, those who create QR codes can (within reason) “embellish” their QR codes with graphics. For example, the following two codes work essentially the same:

They will both take you to the English language home page for Wikipedia. If you have a smartphone, try them out. The “embellishment” helps make the QR code readable by those two-legged creatures that tend to use them – humans.

So … What Do QR Codes Do?

QR codes can do several things. They can contain several types of data, and typically, the QR code scanner app will decode and identify the data the QR code contains. QR codes can contain plain text, website or email addresses, telephone numbers, or even SMS text messages.

Here’s a QR code that contains textual data (the text it contains is immediately after the QR code):

The PCLinuxOS Magazine is a free magazine produced by volunteers from the PCLinuxOS community, focusing on topics of interest to the PCLinuxOS community. The magazine is led by Chief Editor Paul Arnote and Assistant Editor Meemaw. http://pclosmag.com

Here are a couple of QR codes that lead the “user” to a web site:

Notice that I have the web address in human-readable form immediately below the QR code, rather than through the middle of the QR code (like the Wikipedia QR code earlier). I did this by importing the QR code from … and opening it in Gimp … oh, more on that later. It’s a personal choice, but I like this approach better.

Here is a QR code that contains a phone number:

The phone number in the QR code is a fake number (123-555-1212). Go ahead. Scan it. You’ll see. This makes an easy way to share your phone number with other smartphone users. All they have to do is scan the QR code with their phone. No more problems transcribing the number, getting numbers transposed, losing scraps of paper or matchbooks with phone numbers written on them, or trying to be heard over the noise in a noisy restaurant, bar or concert.

You can also encode an SMS text into a QR code. Here’s an example (with the “translation” immediately following the QR code):


I need to discuss the plans for the weekend with you. Meet me at the coffee shop at 6:30 p.m. on the corner of Main and Fifth Avenue.

Now I know my example is not a very practical one, but it still illustrates the use of QR codes for SMS text messaging. Perhaps a more practical use of QR codes for SMS text messaging would be for possibly a sports team to allow their fans to sign up for text alerts on news about the team. Or, perhaps a restaurant could allow their customers to sign up for special periodic discounts at the restaurant, delivered by SMS text messages. Or, perhaps the new band playing at the local pub can allow the pub patrons to join a text messaging mailing list so they can be notified of news about the band. I think you get the idea here.

Creating QR Codes

Many of the QR codes appearing in this article were created at Kaywa QR-Code, using their free QR code generator. When you sign into the website, you’ll see this:

First, select your content type. You can choose between URL, Text, Phone Number, or SMS. Under “Content,” enter the data you want to have encoded into a QR code. Select the size of the QR code graphic you want (S, M, L or XL), then select Generate! Your QR code will appear in the white box at the left.

Kaywa provides a line of raw HTML formatted text that you can copy and embed into your blog or web page, or you can right click on the QR code image, and save the image to your computer’s hard drive. The latter is what I did for the QR code images in this article.

To further “embellish” my QR codes for the web address of the main PCLinuxOS site and of the main PCLinuxOS Magazine site that I used earlier as the example QR codes for website addresses, I copied the image into Gimp, added the human-readable text below the QR code, then re-saved the image.

Many of the phone apps also have the ability to create QR codes, so you can create them right on your phone. The QR Droid app I mentioned earlier has this ability, as do many of the other QR apps that are available. One thing that is nice about being able to create them on your phone is that you can also encrypt the data, using a 56-bit DES algorithm.

There are some inherent risks to QR codes. Unscrupulous individuals or entities can introduce viruses to your phone, cause your location or passwords to be revealed to (and collected by) a central server, or as happened in Russia a while back, unsuspecting users scanned a QR code that caused phones to send premium text messages at a cost of $6 (U.S.) each. You must simply use some common sense and restraint when using QR codes.

Anything For Regular Web Users?

Well … not yet. There is one college student, Kung Wong, who is working on a Firefox plugin that will recognize and decode QR codes. There are four parts to the postings, so search around to find all four parts (it’s not hard to find).

There is a beta plugin for the Chrome and Chromium browsers. It adds a menu entry to the right-click context menu that allows you to decode a QR code from an image. Keeping in mind that it’s still in beta, the reviews for this plugin were on the low side. It seems to need a bit more work before it’s fully functional.


As you can see, QR codes can be quite handy and useful. Certainly, you’ve seen them pop up all over the place in recent years. I hope this short guide helps demystify them for you, and enables you to better understand their use, as well as enabling you to make better use of them with your smartphone.