What is a QR code, and how does it work?

A QR code is a square grid of black and white squares that a camera can read. Here is what all those squares actually do.

QR stands for "Quick Response". It is a two-dimensional barcode: unlike the stripes on a product, a QR code stores data in both directions — across and down — which is why it holds far more information and can be read instantly from any angle.

The parts you can see

The three big squares

Look in three corners (top-left, top-right, bottom-left) and you'll see a large square inside a larger square. These are the finder patterns. A scanner uses them to notice the code, work out its orientation, and figure out where the grid starts — even if the code is rotated or photographed at an angle. There is deliberately no fourth one in the bottom-right, so the reader can tell which way is up.

The dashed lines between them

Between the finder patterns run alternating black-and-white lines called timing patterns. They act like a ruler: the scanner counts them to learn how large each module is and how many there are.

The rest

Everything else is data modules — the actual payload plus its backup — plus a small amount of housekeeping information that records which size, error-correction level and masking pattern the code uses.

What a camera does with it

  1. Find the code using the three corner squares.
  2. Straighten the image and work out the grid.
  3. Sample each module as black or white.
  4. Decode the bits, using the error-correction data to repair anything misread.

Step 4 is why a slightly damaged or imperfectly printed code still works — see error correction levels.

Static by default

A plain QR code contains your data inside the pattern itself. No server, no account and no expiry: whatever you encoded is still there years later. That is what QRacade generates. (It is different from a "dynamic" code, which merely stores a short link to a redirect service — see static vs dynamic QR codes.)

Why codes fail

Most failures come down to a handful of causes: too small for the scanning distance, too little contrast, a missing margin around the code (the quiet zone), or decoration that covered too much of the data. If a code of yours won't read, our troubleshooting checklist walks through each one.

Related guides


Try it

Make your own in seconds with the QRacade generator — or put your brand in the middle with the QR code with logo tool. Every design is decoded and verified before you download it.