< back to resources

How Do QR Codes Work? QR Code Technical Basics

September 14, 2020

What is a QR code? It's a QR code is a type of barcode. By scanning it, you access the information encoded in it.

In standard barcodes, information is encoded in the width of and distance between vertical lines. In QR codes, information is encoded in the arrangement of squares. Either way, data transforms into a machine-readable arrangement of visual elements. And upon scanning by an optical scanning device, the data translates back to its original form.

But three things make QR codes extra special. The amount of data they can hold, how quickly they are read, and that virtually all of our phones can instantly and easily scan them. 

Here’s how these little miracles work.

How Do QR Codes Work?

A QR code is a scannable barcode encoded with data. Encoded means converted into a particular form. In the case of QR codes, numeric and alphanumeric characters, bytes, and kanji convert into a unique two-dimensional arrangement of squares. When an optical scanner passes over those squares, it translates their arrangement back into that data’s original form.

Here’s an example. We create custom, QR code-based digital restaurant table menus for hospitality businesses. That’s why we have a demo digital menu to show interested parties. To showcase what we can do, we encoded that demo menu’s URL into the QR code below.

QR code menu
A QR code menu example

In the QR code, the arrangement of the squares—or data modules, as they’re called—is actually our URL. It’s just been translated from the alphanumeric string of the URL into a collection of squares. That's how you go from link to QR code. A QR code scanner will then translate it back to the original URL.

Parts of a QR Code

The anatomy of a QR code is mostly relevant to anyone thinking of creating a QR code. Be aware, though, of the QR code security risks associated with free online services.

parts of a QR code
Parts of a QR code

The most important parts of a QR code are:

  • Data module. This is the standard unit of the QR code. It’s typically a black square set against a white background. Though the colors and contrast can be different, black-on-white is the most optimal when creating a custom QR code. The arrangement of these black squares, or data modules, is what makes up the majority of a QR code.
  • Position marker. There are three position markers on every QR code. Consisting of an inner and outer eye, they allow scanners and cameras to quickly and accurately locate the data modules and the scanning direction. 
  • Quiet zone. This is the blank area on all sides of the data module matrix that contains all the data modules and position markers. It allows scanners and readers to optically place where the QR code begins and ends.

These aren't absolutely necessary to know if you're learning how to make a QR code, but the familiarity helps. Some choices made during QR code creation can affect these QR code parts and the QR code's scannability.

What Information Is in a QR Code?

There are three types of information that a QR code stores: size, error correction level, and data type.


A QR code can be made up of a maximum of 177 rows and 177 columns, which makes for a possible 31,329 data modules. Most QR codes aren’t that big, though.

The size of a QR code corresponds to its version. The smallest a QR code can be is 21 rows by 21 columns, which is version 1. 25x25 is version 2, and on and on. The aforementioned largest QR code possible, 177x177, is version 40.

It's also worth noting that QR code minimum size is usually based on scan distance and not data size.

Error Correction Levels

Encoded in a QR code is one of four QR code error correction levels. The higher the correction level, the more damage a QR code can sustain while still being scannable. It’s like a stored backup of the QR code. The lower the correction level, the more space left for size and data.

Data Type

QR codes can store up to 7,089 numeric characters or 2,953 alphanumeric characters. They can also store bytes and kanji, but those are less frequently used. These numbers assume the lowest error correction level.

In practice, this means QR code uses include anything that uses numbers, letters, punctuation, and symbols to communicate. Business cards, QR codes on tables in restaurants, authentication, checking into hotels, logging into websites, contactless payments, digital wine lists, QR code food uses, and more.

For context, the amount of characters a standard one-dimensional barcode can hold is around 20 to 100 characters. This ability of QR codes to store such a large amount of information—and provide it quickly—makes them much more useful tools than standard barcodes. In virtually every industry.

But the more characters you store in a QR code, the bigger, more complicated the QR code has to be, right? Yes and no. That’s the difference between static QR codes and dynamic QR codes.

Restaurant bar code menus

How Do Dynamic QR Codes Work?

A dynamic QR code is a QR code whose encoded information can be changed after creation. That’s because the information encoded in a dynamic QR code is a short redirection URL. That means a URL that redirects to another URL, or what’s called a destination URL.

On the destination URL is the content. This can be a digital wine list, a syllabus, contact information, an invitation, etc. That content can be changed entirely without having to change the QR code. Additionally, the destination URL itself can be changed entirely without having to change the QR code. Because what’s encoded in the QR code is the redirection URL, not the destination URL.

This setup also allows dynamic QR code tracking of scanning and usage, which is crucial for any form of QR code marketing.

Using a dynamic vs static QR code is one of the choices a business makes when creating a QR code. And, given the benefits of using dynamic QR codes, many wonder how dynamic QR codes work. It’s a fair question, because they are quite impressive. They’re also quite simple.

How Do QR Codes Work Technically

While learning how to scan a QR code is easy for you, the QR code and scanner are doing a bit more work.

The QR code scanner begins at the bottom right of the QR code. It then moves up two data modules at a time until it hits the first position marker. Then it moves two data modules to the left and goes down. It repeats this right-to-left, up-then-down zig-zag process until every data module is covered.

Here’s a basic six-step outline of how the scanning process works. 

  1. Point your phone at a QR code.
  1. The QR code scanner in your phone’s camera recognizes the three position markers in the QR code. With a sufficient quiet area, your scanner is now aware of where the edges of the QR code are.
  1. The scanner begins at the bottom right, where it encounters the mode indicator. These four data modules indicate what data type (numeric, alphanumeric, byte, or kanji) the rest of the encoded data is.
  1. Next, the scanner encounters the character count indicator, which are the next 8 data modules up from the mode indicator. These indicate how many characters the total encoded data is.
  1. Knowing the data type and character length, the scanner then continues its zig-zag path along the data modules until all it retrieves all the encoded information and reaches the end indicator.
  1. After reading the final character, the scanner proceeds along its path to the error correction data modules. Within these encoded modules are one of four levels of error correction. Or how much of the QR code’s encoded data is backed up in case of code damage.

This should help you visualize how a QR code works:

How QR codes work
How QR codes work

That's how QR codes work, and here’s how to check if a QR code works.

And That’s How QR Codes Work

There are certainly more nuances to QR code encoding principles that we haven’t covered, but that’s the gist of it.

QR codes are a leap forward from standard UPC barcodes. Just look at QR code history. It's because their encoding and scanning process allows for the storage of much larger sets of data, quicker scanning, and editability after creation. That’s why they’re such a great option for bars or restaurants. Whether those businesses want to create a QR code PDF menu or a fully-responsive HTML menu (both of which BinWise can help with). Just keep in mind that if you create a PDF menu, you'll be responsible for the PDF accessibility.

A touchless menu powered by a QR code is a quick, inexpensive, hygienic way to start transitioning to a contactless and germ-free experience for your guests. Book a demo and we’ll show you how we help bars and restaurants across the country leverage this lovely little technology to boost engagement, discoverability, and revenue.