Basics
What a QR Code is and how it works
From the square with three eyes to the content that opens on a phone: how the code stores information, why it survives dirt and what it does not do.
Qriou Editorial Team 7 min readUpdated
A barcode in two dimensions
QR Code stands for Quick Response Code. It was created in 1994 by Denso Wave, a Japanese company in the Toyota group, to track parts on car assembly lines. The ordinary barcode held only a few characters and could be read in one direction only; the factory needed something that fit on a small label, held more data and could be read fast, from any angle.
The answer was to spread the information across two dimensions, in a grid of light and dark squares called modules. Each module is one bit: dark is 1, light is 0. Denso Wave registered the "QR Code" trademark but made the specification free to use, and it later became an international standard (ISO/IEC 18004). That openness is what lets any phone, app or website read and create the same code.
For years the QR Code stayed in industry and a few uses in Japan. The turning point came when phone cameras started reading the code without an extra app. Today it is on restaurant tables, payment signs at the counter, tickets, packaging and business cards.
The parts of a QR Code
Up close, every QR Code has the same anatomy. Knowing the name of each part helps you understand why some customizations work and others break scanning.
- Finder patterns: the three large squares in the corners, often called eyes. They tell the camera where the code is, how big it is and how it is rotated.
- Alignment patterns: smaller squares, present from version 2 onward, that correct distortion when the code is on a curved surface or photographed at an angle.
- Timing patterns: alternating rows of light and dark modules between the eyes that help calculate the width of each module.
- Format information: stores the error correction level and the mask used in the pattern.
- Data area: the rest of the grid, which holds the content and the error correction blocks.
- Quiet zone: the light margin around everything. It stores no data, but without it the camera cannot separate the code from its surroundings.
Versions and capacity
The size of the grid is called the version. Version 1 has 21 by 21 modules; each version adds four modules per side, up to version 40, with 177 by 177. The more content, the higher the version and the smaller the modules when the code is printed in the same space.
At the limit, a version 40 QR Code with the lowest error correction holds 7,089 digits, or 4,296 simple alphanumeric characters, or 2,953 bytes. In practice, nobody should come close to that. A short web address makes a small code with large modules that are easy to read. A long text makes a dense grid that needs a bigger print and a better camera.
The lesson is simple: the content you put in the code decides how easy it will be to read. Shortening a long link, or replacing a paragraph with a link to a page, usually improves scanning more than any color tweak.
Error correction: why a smudged code still works
A QR Code stores part of its information again in mathematical form, using Reed-Solomon codes, the same principle that let a scratched CD keep playing. If some modules disappear because of dirt, a fold or glare, the reader rebuilds what is missing.
There are four correction levels. Level L recovers about 7% of the code; M, 15%; Q, 25%; and H, 30%. The higher the level, the sturdier the code, but it also uses more modules for the same content. That margin is why a small logo can sit in the center: the logo covers modules on purpose, and error correction makes up for them.
Qriou starts at the highest level (H), because it copes better with logos, printing and wear. You can lower the level in the Studio when the content is large and the code needs to be less dense.
What a QR Code can hold
The code itself holds only text. What changes is the shape of that text, and that shape tells the phone what to do. Text that starts with https:// opens in the browser. Text that starts with WIFI: is offered as a network to join. A BEGIN:VCARD block becomes a contact. A Pix code, Brazil's instant payment, follows the Central Bank's BR Code standard and is recognized by banking apps.
That is why a generator asks for the type before the content. In the Qriou Studio you choose between website, WhatsApp, Pix, Wi-Fi, contact, event, location and text, and the Studio builds the right format for each one.
A website QR Code: when scanned, it opens qriou.com.br in the phone's browser.
Show what the code contains
https://qriou.com.br
How the phone reads the code
Reading happens in a few steps. The camera looks for the three eyes, works out the angle and size of the grid, corrects the perspective and turns each module into light or dark. Then the reader removes the mask, puts the bits together, applies error correction and hands the final text to the system. All of this takes a fraction of a second.
On iPhones and most current Android phones, you just open the camera and point it. The phone shows a preview of the content, such as the website address, and only opens it when you tap. That preview is the right moment to check the destination is the one you expect, as we explain in How to tell if a QR Code is safe.
What a QR Code does not do
A lot of confusion about QR Codes comes from wrong expectations. It helps to separate what belongs to the code from what belongs to other systems.
- It does not install anything on its own or run programs. The worst a malicious code can do is lead to a website or an action the person has to confirm.
- It does not know who scanned it. An ordinary QR Code, called static, records no scans. Counting scans requires a dynamic QR Code, which goes through an intermediate link.
- It does not expire. A static QR Code works as long as its destination exists. If the website goes offline, the code still scans but leads to a broken page.
- It does not protect the content. A Wi-Fi password in a QR Code is visible to anyone who scans it.
Static and dynamic in one sentence
In a static QR Code, the content is drawn into the code itself and never changes. In a dynamic QR Code, the code holds a short link from a service that redirects to the destination you chose, so you can change that destination after printing. At Qriou, static codes are free and dynamic codes are part of PRO. The full comparison is in Static or dynamic QR Code.
Good habits from your first code
Once you know how the code works, the rules of use become obvious. They apply to any type of content.
- Say what the code does. A line like "Point your camera to see the menu" increases scans and builds trust.
- Keep contrast high, with dark modules on a light background.
- Respect the quiet zone around the code.
- Prefer short content, which makes less dense codes.
- Test the final file on more than one phone before printing or publishing.
Frequently asked questions
- Do I need an app to scan a QR Code?
- On most current phones, no. The iPhone camera has read QR Codes since iOS 11, and most Android phones read them with the camera or Google Lens. On older devices, a free scanner app does the job.
- Does a QR Code have an expiry date?
- A static QR Code does not expire: the content is in the pattern. What can stop working is the destination, such as a website that went offline. A dynamic QR Code depends on the redirect service staying active.
- What is the difference between a QR Code and a barcode?
- A barcode stores information in one dimension and usually has few digits. A QR Code uses two dimensions, holds much more data, has error correction and can be read from any angle.
- Can I use the name QR Code in my materials?
- Yes. "QR Code" is a registered trademark of Denso Wave, which allows free use of the term and the specification. It is common to credit the trademark in technical materials.
Next step
Put the guide into practice
Create your QR Code in the Studio, customize it, check the scan test and download it as a PNG for free.
Create this QR Code