Krill KitsKrill Kits// A swarm of small, sharp tools for letters, numbers, and units.
§ 01 / ARTICLE

How QR Codes. Actually Work.

CATEGORY GENERATORSREAD 4 MINPUBLISHED APR 21, 2026

A QR code is a 2D barcode designed for fast scanning by any camera, at any angle, even when partially damaged. It encodes text — URLs, Wi-Fi credentials, phone numbers, anything — using a specific grid pattern with built-in error correction. Here's what the pieces actually do.

The three big squares

Every QR code has three large squares in three of its four corners. These are position markers, and they do the most important job: letting a camera find and orient the code.

The reason there are three (not four) is clever — two markers define a line, and the third tells the scanner which end is up. With four markers, the code could be read upside-down; with three, there's exactly one valid orientation. Your phone can read a QR code rotated any amount, at a tilt, even from a photo of a screen — all because of those three squares.

The small squares, lines, and dots

Look closely at a QR code and you'll see more structure beyond the three corners:

  • Alignment patterns — smaller squares scattered through larger QR codes. They help the scanner correct for perspective distortion when the code is photographed at an angle.
  • Timing patterns — the alternating black-white lines running between the position markers. They tell the scanner the grid spacing, so it knows where each cell boundary is.
  • Format information — a strip of dots right next to the position markers that encodes the error correction level and the mask pattern used for the rest of the code.
  • Data modules — all the other black-and-white dots. These encode your actual payload plus the error-correction bytes.

The seemingly random noise of dots isn't random. It's a XOR mask applied to the data, designed to avoid visual patterns (like a large block of white) that would confuse scanners.

// TRY THE TOOL
MAKE A QR CODE.

Text, URL, Wi-Fi, Email, SMS, vCard. PNG + SVG output. 4 error-correction levels.

OPEN →

Reed-Solomon error correction

This is the magic that makes QR codes robust. Reed-Solomon coding adds redundant data to the payload so that even if some dots are unreadable — smudged, scratched, covered by a logo — the original message can be recovered.

Four levels of error correction exist, each trading data capacity for robustness:

  • L (Low) — recovers up to 7% lost dots. Maximum data capacity.
  • M (Medium) — 15% recovery. The default for most uses.
  • Q (Quartile) — 25% recovery. Good for printed media at small sizes.
  • H (High) — 30% recovery. Safe for codes with embedded logos.

Higher error correction means the code has to pack more redundant dots, which means a denser-looking QR. That's why high-rez marketing QRs with logos look busier than simple URL QRs — they're using level H so the logo doesn't break the scan.

Versions and sizes

QR codes come in 40 versions, from version 1 (21×21 cells) up to version 40 (177×177 cells). Larger versions hold more data but need higher- resolution printing to scan reliably. The version is picked automatically based on the payload size and error-correction level.

For context, a short URL like https://krillkits.com/tdee fits in version 3 (29×29 cells) at level M. A vCard with a full address, phone number, and email is usually version 6–9. Anything bigger than version 20 gets harder to scan from a phone camera without a great shot.

What happens when you scan

A camera app does five things in quick succession:

  • Find the three position markers.
  • Orient the code based on which square is missing.
  • Correct for perspective distortion using the alignment patterns.
  • Read the data modules and apply the inverse mask.
  • Decode the payload using Reed-Solomon, correcting any bit errors.

All of this happens in a fraction of a second on modern phones. The decoded string is handed to the OS, which routes URLs to the browser, phone numbers to the dialer, Wi-Fi credentials to the network settings, and so on.

// TRY THE TOOL
ENCODE ANYTHING.

URL, text, Wi-Fi, email, SMS, vCard. Download as PNG or SVG. Preview live as you type.

OPEN →
§ 02 / FAQ

Questions. Answered.

What are the three big squares in the corners?+
Position markers. They let a camera find and orient the QR code regardless of rotation. Any two of the three squares define a baseline; the third tells the scanner which way is up. Without them, a phone couldn’t tell a sideways QR code from a misaligned one.
How much data can a QR code hold?+
Depends on size ("version") and content type. A small QR code holds ~40 numeric digits or ~25 ASCII characters. The biggest standard QR (version 40) holds up to 7,089 numeric digits or 2,953 bytes. Most real-world QR codes you scan are version 3–10 and encode URLs.
What does "error correction" mean for QR codes?+
QR codes use Reed-Solomon error correction, which adds redundant dots so the code still decodes even when some dots are unreadable (damaged, dirty, or covered). Four levels — L (7%), M (15%), Q (25%), H (30%) — trade data capacity for robustness. A logo in the middle is possible because of this.
Why are some QR codes denser than others?+
Two reasons: more data requires more dots, and higher error correction requires more redundant dots. A "URL QR with logo" at level H and version 10 packs a lot more dots into the same square than a short text QR at level L.
Can I scan a QR code that’s partially covered?+
Yes, up to the error correction limit. Level H (30%) means you can obscure up to 30% of the dots and still decode. That’s why you can put logos in the center of marketing QRs — the logo covers less than 30% of the code’s area.
Who invented QR codes and when?+
Denso Wave, a Japanese automotive company, invented them in 1994 to track parts. The name "QR" stands for "Quick Response" — the design goal was scanning that worked from any angle, at high speed, on manufacturing lines. Denso released the patent royalty-free, which is why QR is ubiquitous.
§ 03 / TOOLS

Related calculators.

§ 04 / READING

Keep reading.