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.
Text, URL, Wi-Fi, Email, SMS, vCard. PNG + SVG output. 4 error-correction levels.
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.
URL, text, Wi-Fi, email, SMS, vCard. Download as PNG or SVG. Preview live as you type.

