What Is a QR Code?
QR codes are on menus, posters, parcels and train tickets, and most phones read them with the camera. But what is a QR code, exactly, and how does a pattern of black and white squares turn into a web page on your screen? This guide explains what QR stands for, how the code works inside, and how to choose the right kind for your own use.
What does QR stand for?
QR stands for Quick Response. The name describes what the code was built for: to be read quickly, from any angle, by a machine. A QR code is a two-dimensional barcode. A normal barcode stores information in one direction, as a row of lines. A QR code stores it in two directions, across and down, so the same space holds far more.
In everyday use, a QR code is a shortcut. Instead of typing a long web address, a Wi-Fi password or a phone number, you point your phone camera at the code and the phone does the typing for you.
Where QR codes came from
The QR code was invented in 1994 by Denso Wave, a Japanese company in the Toyota group that made barcode equipment. Car factories used barcodes to track parts, and a single part often needed several barcodes to hold all its details. Workers had to scan them one by one. The team, led by engineer Masahiro Hara, set out to make a code that held more data and could be read in one quick pass.
Denso Wave patented the design but chose not to enforce the patent, so anyone could make and read QR codes for free. That decision is a big part of why the format spread. The code became an international standard, ISO/IEC 18004, and "QR Code" is still a registered trademark of Denso Wave.
In the early 2000s, phones in Japan began to ship with QR readers, and the codes appeared on posters and magazines. In the rest of the world they took off once phone cameras could read them without a separate app. Apple added QR reading to the iPhone camera in 2017, and Android phones followed through the camera app and Google Lens. During the pandemic, menus and check-in signs made QR codes part of daily life.
How do QR codes work?
A QR code is a grid of small squares called modules. Each module is either dark or light, and together they spell out the data in binary, the ones and zeros that computers use. Around the data, the code has fixed parts that help a camera find it and read it the right way up.
- Finder patterns: the three large squares in the corners. They tell the scanner where the code is, how big it is and which way it is turned. The missing fourth corner is how the scanner knows the orientation.
- Alignment patterns: smaller squares inside larger codes. They help the scanner correct for a code that is tilted or printed on a curved surface.
- Timing patterns: lines of alternating dark and light modules between the finder patterns. They show the scanner how wide each row and column is.
- Format information: a strip of modules near the finder patterns that records the error correction level and the mask used.
- Data and error correction: the rest of the grid, holding your content plus extra data for repairing damage.
- Quiet zone: the empty margin around the code. Scanners need it to see where the code starts and ends.
What happens when you scan a QR code
All of this takes a fraction of a second. The code itself does not contact anything. If it holds a web address, the phone opens that address in the browser, and only then does the internet come into play.
- The camera finds the three finder patterns and works out the size, angle and orientation of the code.
- It maps the grid and reads each module as dark or light.
- It reads the format information and removes the mask, a pattern applied when the code was made to avoid large blocks of one color.
- It uses the error correction data to fix any modules it could not read.
- It turns the bits back into text and decides what to do: open a link, offer to join a Wi-Fi network, show a contact or display plain text.
QR code error correction levels: L, M, Q and H
Every QR code carries extra data that lets a scanner rebuild missing or damaged parts. There are four levels. Higher levels survive more damage, but they need more modules for the same content, so the pattern gets denser.
| Level | Can recover about | Typical use |
|---|---|---|
| L (Low) | 7% of the code | Clean screens and documents, where space matters most |
| M (Medium) | 15% of the code | A common default for general use |
| Q (Quartile) | 25% of the code | Labels and parts in dirty or rough places |
| H (High) | 30% of the code | Codes with a logo, frames or decorative patterns |
Why error correction lets you add a logo
A logo in the middle of a code covers some modules. The scanner treats them as damage and rebuilds them from the error correction data. That only works if the logo stays well within what the level can recover.
Codes made here use level H, the highest. The logo is kept to a small area in the center with a white box behind it, and before you download, we read the finished image back to check that it still scans. If it does not, the download is blocked and you are asked to change the design. You can try it with a QR code with logo.
QR code versions: why some codes have more squares
QR codes come in 40 sizes, called versions. Version 1 is a grid of 21 by 21 modules. Each version adds four modules on each side, up to version 40 at 177 by 177. The version is chosen automatically to fit the content and the error correction level.
The largest code can hold up to about 7,000 digits, or about 4,300 letters and numbers, or just under 3,000 bytes of other text. In practice you never want to get close to that. The more a code holds, the more modules it has, the smaller each module is, and the larger you have to print it for a phone to read it. See QR code size for printing for practical sizes.
What can a QR code hold?
A QR code holds text. What makes it useful is that phones recognize certain kinds of text and act on them:
- A web address, which opens in the browser.
- Wi-Fi details in a standard format, which the phone offers to join.
- A contact card, which the phone offers to save.
- A phone number, an email or a text message, ready to send.
- Plain text, which is simply shown on the screen.
Static vs dynamic QR codes
A static QR code holds its content directly in the pattern. It works without any service, but it can never be changed and nobody can count its scans. A dynamic QR code holds a short link that sends people on to your content. You can change where it leads after printing, and every scan is counted. The short link also keeps the pattern small and simple.
Every type on this site is dynamic except Wi-Fi, which has to hold the network details in the code itself. For the full comparison, read Dynamic vs static QR codes, or browse the QR code types to see what a code can open.
How to scan a QR code
Most phones made in the last few years read QR codes with the built-in camera app. Open the camera, point it at the code, and tap the link or notice that appears. There are step-by-step guides for iPhone and Android. If the code is in a screenshot or a file on your own device, see how to scan a QR code from an image, or use our free QR code scanner in the browser.
Are QR codes safe?
A QR code is just text, and it cannot install anything on its own. The risk is where it leads. A code on a sticker or in an unexpected email can send you to a fake login or payment page. Before you open a link from a code, read the address your phone shows. Be careful with codes that ask for passwords or payment, and if in doubt, type the website address yourself.
Questions
What does QR code stand for?+
QR stands for Quick Response. The code was designed to be read quickly and from any angle by a scanner or phone camera.
How does a QR code work?+
It stores data as a grid of dark and light squares. A phone camera finds the three corner squares, reads the grid, repairs any damage with built-in error correction and turns the result back into text, such as a link.
Who invented the QR code?+
Denso Wave, a Japanese company in the Toyota group, invented it in 1994 to track car parts in factories. A team led by Masahiro Hara designed it.
Do QR codes expire?+
A static code never expires, because its content is in the pattern. A dynamic code works for as long as its short link is active. Here, codes keep working as long as they exist in your account and are not paused.
Can a QR code work without internet?+
Yes, if it holds text, a phone number or Wi-Fi details directly. A code that opens a website needs internet, because the website does.