QR Codes

Published Mar 19, 2023Updated May 15, 2024
Contribute to Docs

What is a QR Code?

A QR Code (quick response code) is code used to store information and it can be read by a device that has QR scanning software on it. QR codes differ from barcodes seen in a retail or grocery store in that a standard barcode is one-dimensional and reads horizontally. A QR code is a square-shaped, with the data enclosed within the square. The three squares in the corners of the QR code tell the QR code scanning software how the QR code is orientated, so the scanning software can read the QR code’s data correctly. Here is a good web page detailing how the data is structured in the QR code.

QR codes are used just like their bar code counterparts: They contain data, and when scanned the data is entered into an app or is used by a device, greatly speeding up the data entry process and eliminating typing errors. Barcodes usually hold just a number, and once scanned and entered into an application. The scanned number can be used to lookup a specific item and retrieve the item’s name, price, and other information. QR codes hold all kinds of data, so they are more widely used than barcodes.

Some QR codes are static, and some are dynamic. A static QR code has all the data encoded, and the data will not change. If a data entry error is made during QR code creation, that error is permanent. A dynamic QR code fixes the problem. A dynamic QR code will retrieve data from the internet, allowing the QR code owner to edit the data as needed.

QR codes do need to be square in shape, but there is room for some artistic styling. The squares and data dots can have rounded corners. The QR code does not have to be black on white. The black can be changed to another color, but a higher contrast leads to more readability. A logo can be included in the center square. These changes make the QR code visually unique and more suited to its use.

Reading a QR Code

To read a QR code one does not need a special laser bar code reader. Most camera apps in mobile devices contain QR code scanning software. Just open the camera app, focus on the QR code, and a clickable link appears in the camera app.

Creating a QR Code

Software is used to create the QR code. The user enters the data to be encoded and how the QR code will be used. When the user is done entering the data, the software will create the QR code. There are several QR code generator websites. Some will generate basic QR codes for free.

Uses for QR Codes

QR codes have many more uses than regular bar codes. QR codes hold more data, and they are easily readable by today’s mobile devices. The data can be just text, or instructions to open an app and populate fields. A QR code can hold the URL for a web page or help log into a Wi-Fi network. QR codes can show proof of purchase. They are also used to track how many times the QR code has been scanned. There are several other uses as well.

One of the most common uses for QR codes is an URL for a web page. Instead of requiring a user to enter “codecademy.com/resources/docs/general” into a web browser, the URL is embedded into a QR code. The user scans the QR code and clicks the link. Many restaurants use QR code URLs for online menus. Sporting events use QR codes allowing spectators to get up-to-the-minute stats. Charitable organizations use QR codes to direct donors to the donation website.

QR codes are also used as entry passes. When purchasing a movie ticket online, the user will be sent a QR code. The user retrieves the QR code on a mobile device, and at the movie theater, the user has the QR code scanned and is admitted.

But QR codes can also be used to point a user to a malicious web site, just like a phishing email. One should be careful about scanning and clicking on a QR code. A QR code passed out at a conference, enabling the attendees to log into the local Wi-Fi is going to be safe to scan and click. On the other hand, a QR code on a flyer stuck to a lamppost might be suspect. Just like emails, use good judgement before scanning and clicking.

QR codes are easy to create and use. They make it easy for users to use their mobile devices without the need to type in data. QR codes are used by the QR code’s creator, allowing the creator to track how the QR code is used.

All contributors

Looking to contribute?

Learn More on Codecademy