QR Generator

What is a QR code and how does it work?

You've pointed your phone at hundreds of them. A menu opened, a network joined, a boarding pass checked. The little square behind all that is a clever piece of engineering, and knowing how it works makes it much easier to make one that scans every time.

Create your QR code

Where QR codes came from

QR stands for Quick Response. Denso Wave, a Japanese company in the Toyota group, invented the code in 1994 to track car parts moving through its factories. Workers were scanning stacks of barcodes on every box, and they needed something faster that could hold more than a part number.

Denso Wave published the specification and chose not to enforce its patent, so anyone can make and read QR codes without paying a fee. It later became an international standard, ISO/IEC 18004. That openness is why every phone maker could build a scanner into the camera.

Why a square holds more than a barcode

A regular barcode is read in one direction, left to right. The height of the bars adds nothing, so it tops out at roughly 20 characters. A QR code stores data both horizontally and vertically, which changes the math completely.

The smallest QR code is a grid of 21 by 21 modules (the tiny squares). The largest is 177 by 177 and can hold up to 7,089 digits or 4,296 letters and numbers. Most codes you see sit near the small end, because a short link doesn't need much room. More content means more modules, and more modules means each one prints smaller, which is why print size depends on what you put inside.

The parts of a QR code

  • Finder patterns: the three large squares in the corners. They tell the scanner a code is there, which way up it is and how big it is.
  • Alignment pattern: a smaller square near the fourth corner, with more of them on larger codes. It helps the phone correct for a code seen at an angle or printed on a curve.
  • Timing patterns: thin rows of alternating dark and light modules running between the finder squares. They give the scanner the spacing of the grid.
  • Quiet zone: the blank margin around the outside, at least four modules wide, that separates the code from everything near it.
  • Data modules: everything else. This is your content, plus the extra information that lets a damaged code still be read.

Error correction, or why a scratched code still works

QR codes use Reed-Solomon error correction, the same family of math that let scratched CDs keep playing. Some of the modules hold a mathematical backup of the rest. If part of the code is smudged, torn or covered, the scanner rebuilds what's missing.

There are four levels. L recovers roughly 7% damage, M about 15%, Q about 25% and H about 30%. Higher levels add more backup, so the code gets denser for the same content.

This is why a logo can sit in the middle of a code. The logo covers modules, and error correction fills them back in. Our generator switches to level H automatically when you add one, and the design guide covers how big that logo can safely be.

How your phone reads one

The camera spots the three finder squares, works out the angle, samples the grid and decodes the pattern. Then it looks at what the content is. A web address gets an Open button. A WiFi code offers to join the network. A contact card offers to save the contact.

Every iPhone since iOS 11 and most Android phones from the last several years do this in the built-in camera app, with no extra download. If yours doesn't, the guides for iPhone and Android walk through the settings.

Make one of your own

Now that you know what's inside, try it. Open the generator on our home page, paste a link to a page you own, and download the code. Then scan it with your own phone and watch the pieces above do their work.

Frequently asked questions

What does QR stand for?

Quick Response. The name comes from the original goal: a code that factory scanners could read faster than a stack of barcodes.

Who invented the QR code?

A team at Denso Wave led by Masahiro Hara, in 1994. Denso Wave still holds the QR Code trademark but lets anyone make and read the codes for free.

How much information can a QR code hold?

Up to 7,089 digits or 4,296 letters and numbers at the lowest error correction level. In practice, keep it short. A short link makes a code that's easier to print small and quicker to scan.

Do I need an app to scan a QR code?

Usually not. iPhones since iOS 11 and most recent Android phones read QR codes straight from the camera app.