The Side Quest
πŸ”Ž

How QR Codes Work

A QR code looks like a glitchy chessboard, but it's an engineered grid that can survive coffee stains, sun glare, and a 30-degree tilt.

#technology#internet#design
← All guides

A QR code is a 2D barcode β€” but instead of a single row of lines, it's a grid of black and white squares that pack up to 300Γ— more data than a regular barcode. Designed in 1994 for tracking car parts, it now runs menus, payments, tickets, and packaging worldwide.

The finder patterns

The three big squares in the corners. These are the "look here" anchors β€” the unique pattern a scanner searches for to locate the code and figure out its orientation. They're why a QR code can be scanned upside down, sideways, or even from an angle.

The alignment patterns

Smaller squares scattered through the grid. They help the scanner map the code's geometry if it's printed on a curved surface (a cup, a bottle, a bent flyer). The bigger the code, the more alignment squares.

The timing pattern

A dashed line of alternating squares connecting finder patterns. It tells the scanner the grid spacing β€” how wide each module is β€” so the code can be read at any size, from a billboard to a business card.

The format & version data

Hidden strips near the finders carry error-correction settings and (for larger codes) the version size. The scanner reads this before it decodes anything else.

The data zone

All the rest of the squares β€” thousands of them β€” encode the actual payload: URLs, text, contact cards, Wi-Fi credentials. The bits snake through the grid in a specific zigzag path, weaving around the finder and timing patterns.

The error correction

This is the superpower. QR codes use Reed-Solomon error correction, the same math that makes CDs scratch-resistant. At its highest level, a QR code can lose up to 30% of its data and still be read perfectly. That's why a coffee stain, a torn corner, or a logo in the middle doesn't kill it.

The quiet zone

The blank margin around the whole code β€” at least four modules wide. Without it, the scanner can't tell where the code begins.

What the scanner does

  1. Finds the three finder squares.
  2. Works out orientation and size.
  3. Reads the format/version data.
  4. Walks the zigzag, decoding bits.
  5. Applies error correction to patch any damage.
  6. Decodes the message β€” usually in well under 50 milliseconds.

A QR code is not random noise. It's a tiny, redundant, self-locating data fortress β€” engineered to be read by a phone in a hurry, in bad light, at the wrong angle, half-destroyed.

Written with πŸ’– by Waela Β· Back to The Side Quest

Built with πŸ’– by Waela