← All articles
technologyhow do QR codes workQR codeerror correctionAugust 14, 20265 min read

How Do QR Codes Work? A Simple Technology Guide

By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.

A QR code stores data in a grid of small dark and light squares that a camera and decoding software can turn back into information. Special patterns help the reader find the code's position, understand its layout, and recover data even when part of the image is damaged.

A grid, not a line

QR stands for Quick Response. Unlike a one-dimensional barcode that mainly stores information along lines, a QR code uses a two-dimensional grid. That lets it hold more data in a compact space. The encoded information might be text, a web address, contact details, or another supported data format.

Not every square in the grid is part of the message itself. Large square finder patterns near three corners help software recognise the code and determine its orientation. Other fixed patterns help with alignment, timing, format information, and the structure needed to interpret the remaining modules correctly.

This layout is central to how QR codes work because a phone does not simply photograph a random checkerboard and guess. The decoder first identifies the code's geometry, corrects for rotation or perspective, reads structural information, and then extracts the encoded data.

How information becomes black and white squares

Before data is placed into the grid, it is converted into binary information. The encoder chooses a mode suited to the content, adds information about length and structure, and creates codewords that represent the message. It also generates extra error-correction data.

The bits are then arranged into available parts of the QR grid according to defined rules. A masking pattern is applied to avoid visual arrangements that would be difficult for scanners to read reliably, such as large blocks or misleading patterns. Information in the code tells the decoder which mask was used.

Learning this sequence makes how QR codes work much less mysterious. The visible pattern is the final result of several organised steps. The exact squares are not decorative. They represent message bits, recovery data, and structural information that lets many different readers interpret the same standard.

Why a damaged QR code can still scan

QR codes include error correction, which adds redundant information so some missing or incorrect data can be reconstructed:

  • Finder patterns help the camera locate and orient the code.
  • Timing and alignment patterns help reconstruct the grid accurately.
  • Data is encoded into binary codewords.
  • Error-correction codewords add recoverable redundancy.
  • Decoding software reverses the process to recover the original information.

This is why a code can sometimes scan despite a scratch, smudge, or small logo placed over part of it. The amount of damage that can be tolerated depends on the error-correction level and where the damage occurs. Covering a finder pattern or too much of the data can still make the code unreadable.

One safety note belongs with how QR codes work: the pattern itself does not tell you whether the destination is trustworthy. A QR code can contain a link just as text can. Before entering passwords or payment details, check where the code is taking you and whether the destination makes sense.

The takeaway

QR codes combine a structured two-dimensional grid, encoded data, orientation markers, masking, and error correction. Your camera finds the pattern, software straightens and reads it, and the decoder rebuilds the stored information. Once you know the grid has different jobs, a QR code looks less like noise and more like a compact map.

Practise this

Questions from What is Technology?

Reading about something is not the same as being able to recall it. These are real questions from the What is Technology? unit in our Technology track, answers and explanations included. The unit has 123 in total across 24 steps.

  • Multiple choiceLevel 4

    1. Which sequence shows communication technology from oldest to newest?

    • Written letter, telegraph, telephone, smartphone
    • Smartphone, telephone, telegraph, written letter
    • Telephone, written letter, smartphone, telegraph
    • Telegraph, smartphone, written letter, telephone

    Letters came first, then the telegraph, then the telephone, and finally the smartphone.

  • Odd one outLevel 2

    2. Which of these is NOT a simple machine?

    • A computercorrect
    • A lever
    • A pulley
    • A screw

    Levers, pulleys and screws are simple machines, but a computer is a complex electronic device.

  • Match the pairsLevel 2

    3. Match each technology to the problem it helps solve.

    Answer: Umbrella = Staying dry in rain; Refrigerator = Keeping food fresh; Telephone = Talking to people far away; Streetlight = Seeing at night

    Each technology solves a problem, like an umbrella for rain and a fridge for keeping food fresh.