← Back to articles

What the Three Squares in a QR Code Actually Do (Finder Patterns Explained)

What the Three Squares in a QR Code Actually Do (Finder Patterns Explained)

The three big squares in the corners of a QR code are called finder patterns. They tell a scanner where the code is, which way is up, and how big each cell is — in well under a tenth of a second, from almost any angle. Once you know what they're doing, the code stops looking like random pixels and starts looking like a piece of carefully engineered geometry.

What the three squares actually are

Their official name is finder pattern — sometimes "position detection pattern" in older docs. Every standard QR code has exactly three of them: top-left, top-right, and bottom-left. The bottom-right corner is intentionally empty. Three reference points are enough to fix orientation. A fourth would leave the scanner unable to tell which way is up.

Each finder pattern is built from three nested squares: a 7×7 black square on the outside, a 5×5 white square inside that, and a 3×3 black square at the center. Run a straight line through any of them — horizontal, vertical, or diagonal — and you cross five bands in this exact order: one black, one white, three black, one white, one black. That sequence, the 1:1:3:1:1 ratio, is the entire trick.

How a scanner uses the three squares

Your phone doesn't really "look at" the code the way you do. It runs a fast geometric search.

Step 1: find the squares. The scanner walks across every row of pixels in the camera frame, counting runs of same-colored pixels. As soon as it spots a row that matches the 1:1:3:1:1 ratio, it sweeps vertically through the midpoint to confirm the same ratio holds top-to-bottom. Three confirmed corners and the code has been located — usually in well under a tenth of a second.

Step 2: build the grid. With three corners locked, the scanner draws the bounding shape, rotates the image upright, and computes the width of a single cell (a "module"). On larger codes, the timing pattern — the dotted line of alternating modules running between two finder patterns — tells the scanner how many cells wide each row really is, even if the print has warped slightly.

Step 3: read and error-correct. Each cell becomes a 1 or a 0. The data is unpacked into bytes, and Reed–Solomon error correction repairs anything missing or smudged. The full decoding procedure is formalized in ISO/IEC 18004:2024. For the contrast with traditional 1-D scanning, see QR codes vs. barcodes.

Why the 1:1:3:1:1 ratio

The ratio looks arbitrary until you ask the obvious question: why not something simpler? Denso Wave's engineers — who invented the QR code in 1994 — went looking for the answer. They analyzed newspapers, brochures, and packaging, hunting for the sequence of alternating black and white strips that occurred least often by accident. 1:1:3:1:1 was the rarest. Picking the rarest natural pattern means a scanner sweeping across a striped shirt or a window blind almost never produces a false positive.

The ratio also holds at any rotation. That's why you can hold your phone sideways or upside down and the code still scans without you thinking about it.

Finder vs. alignment vs. timing patterns

Three different patterns live inside a QR code, and they're easy to confuse:

If you're designing a QR code with a logo overlay, knowing the difference matters. Covering the open data area is usually fine. Covering a finder or alignment pattern is not.

When a finder pattern is damaged

QR codes are surprisingly resilient. Reed–Solomon error correction is built in, and the format-information bits around each finder pattern are duplicated. A single damaged corner — a scratch, mild fading, a small sticker — is usually recoverable. Two missing corners is the usual breaking point: without two finder patterns the scanner can't reliably compute orientation.

The practical takeaway for designers: place your logo in the center, not on a corner. If you have to overlap a corner, bump the error correction level up to H (around 30% recovery capacity) and test the result by scanning from a few angles before you print.

Frequently Asked Questions

Why does a QR code only have three squares instead of four?

Because three is exactly enough to define orientation. With four matched corners a scanner couldn't tell which side was up. With three plus a blank fourth corner, the scanner instantly knows the rotation. That empty fourth corner is the trick that lets you scan a code upside down without thinking about it.

What is the difference between a finder pattern and an alignment pattern?

Finder patterns are the three big squares at the corners — they locate the code and set its rotation and scale. Alignment patterns are the smaller bullseye squares dotted through the interior of larger QR codes. They appeared in Model 2 (1998) and exist to correct perspective distortion on curved or angled surfaces.

Can a QR code still scan if one of the three squares is damaged?

Often, yes. Reed–Solomon error correction and the duplicated format-info bits around each finder pattern make a single damaged corner usually recoverable. If two of the three are obscured, detection generally fails.

Why was the 1:1:3:1:1 ratio chosen?

Denso Wave's engineers analyzed printed material and found 1:1:3:1:1 to be the least-occurring sequence of alternating black and white strips. Picking the rarest natural pattern means a scanner sweeping across a real-world photo almost never produces a false positive.

<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [ {"@type": "Question", "name": "Why does a QR code only have three squares instead of four?", "acceptedAnswer": {"@type": "Answer", "text": "Because three is exactly enough to define orientation. With four matched corners a scanner couldn't tell which side was up. With three plus a blank fourth corner, the scanner instantly knows the rotation. That empty fourth corner is the trick that lets you scan a code upside down without thinking about it."}}, {"@type": "Question", "name": "What is the difference between a finder pattern and an alignment pattern?", "acceptedAnswer": {"@type": "Answer", "text": "Finder patterns are the three big squares at the corners — they locate the code and set its rotation and scale. Alignment patterns are the smaller bullseye squares dotted through the interior of larger QR codes. They appeared in Model 2 (1998) and exist to correct perspective distortion on curved or angled surfaces."}}, {"@type": "Question", "name": "Can a QR code still scan if one of the three squares is damaged?", "acceptedAnswer": {"@type": "Answer", "text": "Often, yes. Reed–Solomon error correction and the duplicated format-info bits around each finder pattern make a single damaged corner usually recoverable. If two of the three are obscured, detection generally fails."}}, {"@type": "Question", "name": "Why was the 1:1:3:1:1 ratio chosen?", "acceptedAnswer": {"@type": "Answer", "text": "Denso Wave's engineers analyzed printed material and found 1:1:3:1:1 to be the least-occurring sequence of alternating black and white strips. Picking the rarest natural pattern means a scanner sweeping across a real-world photo almost never produces a false positive."}} ] } </script>

Takeaway

The three corner squares are the reason QR codes feel instant. They let a scanner detect, orient, and start decoding in milliseconds — from any angle, even with part of the code damaged. Next time you point a phone at a poster or a menu, you'll know what those squares are doing.

If you scan codes in the wild, it's also worth knowing whether it is safe to scan an unfamiliar QR code. QRDock includes a built-in URL safety check that flags suspicious destinations before they open. You can try it free at qrdock.app.