Decode the Square: Inside QR Codes

Those random-looking squares have a beautiful hidden structure

1

What Do You See?

At first glance, a QR code looks like random noise. But every single square has a purpose. Click on the regions below to explore!

Click a region to explore

Each part of a QR code has a specific job. Discover what makes these squares so smart!

2

The Finder Patterns

Those three big squares in the corners? They're called "finder patterns" - and they're the reason your phone can scan QR codes at any angle!

1:1:3:1:1 ratio

The finder pattern has a unique ratio that scanners look for: 1 black : 1 white : 3 black : 1 white : 1 black

No matter what angle you scan from, or what size the QR code is, the scanner finds these patterns first to locate and orient the code.

Why Three?

Three corners let the scanner know the orientation. The fourth corner is left open for other data.

Any Angle Works

Rotate your phone 90°, 180°, upside down - the scanner still finds the patterns!

Instant Detection

Scanners look for the 1:1:3:1:1 ratio in any direction - horizontal, vertical, or diagonal.

Fun Fact
QR codes were invented in 1994 by Denso Wave to track car parts in factories. "QR" stands for "Quick Response"!
3

The Timing Patterns

Between the finder patterns, there's an alternating black-white line. This tells the scanner exactly how big each module (square) should be.

Grid Calibration

The timing pattern defines the grid. Each alternation = one module width.

Handles Distortion

Even if the QR code is printed at an angle or on a curved surface, timing patterns help the scanner adapt.

QR Code Versions
QR codes come in 40 "versions" - Version 1 is 21×21 modules, Version 40 is 177×177 modules. The timing pattern length tells you the version!
4

The Secret Backup System

What if part of a QR code gets scratched, covered by dirt, or torn? Amazingly, it can STILL work. Here's how:

Without Error Correction
H E L L O
H E ? L O
Can't read: "HE?LO" ✗
With Error Correction
H E L L O +backup data
H E L L O
Recovered: "HELLO" ✓

How does it work?

QR codes store your message plus extra "backup" data calculated using special math (Reed-Solomon codes). If some squares get damaged, the backup data can figure out what was lost - like solving a puzzle with missing pieces!

Choose Your Protection Level

More backup = survives more damage, but needs a bigger QR code

L Low
Survives ~7% damage Best for: Clean environments
M Medium
Survives ~15% damage Best for: General use
Q Quartile
Survives ~25% damage Best for: Outdoor signs
H High
Survives ~30% damage Best for: Logos in center!
That's Why Logos Work!
Ever seen a QR code with a logo in the middle? That's only possible because of error correction! The logo "damages" up to 30% of the code, but level H can recover it.
5

Damage Test

This is a real QR code that says "MYTEKOS" - try scanning it with your phone! Then damage it and see if it still works.

📱 Try scanning this with your phone's camera!

Damage: 0%
Scannable! The message is: MYTEKOS
Pro Tip
Avoid damaging the finder patterns and timing patterns - those are critical! The data area can take much more abuse.
6

How Data Becomes Squares

Watch how your message transforms into the pattern of black and white squares!

1
Your Text
HI
2
ASCII Values
72, 73
3
Binary (8 bits each)
01001000 01001001
4
The Pattern

Multiple Modes

QR codes can encode numbers, letters, or raw bytes - each mode uses different encoding rules.

Plus More

The final QR adds error correction data, format info, and applies a mask pattern for readability!

7

The Final Touch: Mask Patterns

Before a QR code is complete, a "mask" is applied to break up patterns that might confuse scanners. There are 8 possible masks!

Why Mask?

Large areas of same color can look like finder patterns. Masks break them up!

Best Mask Wins

QR generators try all 8 masks and pick the one with the best "score" for readability.

Key Insight
The mask is XOR'd with the data - meaning you can unmask it by applying the same pattern again!

QR Code Expert!

You've discovered the hidden structure inside QR codes. Those "random" patterns aren't random at all - they're a brilliant encoding system that can survive damage!

0
Regions Explored
0
Damage Tests
0
Time Exploring

Finder Patterns

The three big squares help scanners locate and orient the QR code instantly.

Timing Patterns

Alternating modules tell the scanner the exact grid size.

Error Correction

QR codes can lose up to 30% of their data and still work!

Data Encoding

Text becomes numbers, numbers become binary, binary becomes the pattern.

Ready to Create?

Put your new knowledge into practice!

More Discoveries

Suggest a Correction