Back to Blog
Reference 2026-04-22

QR Code Anatomy: How They Actually Work

Inside the squares: error correction, data capacity, and the patterns that make scanning work.

QR codes look like static. They are actually a precisely engineered 2D barcode with redundancy, alignment, and capacity scaling baked in.

Anatomy

Three large squares in the corners are finder patterns — they let cameras detect orientation regardless of rotation. Smaller squares throughout are alignment patterns, and dotted lines between finders are timing patterns that establish the grid scale.

Capacity

A QR code's data capacity depends on three things:

VersionModulesNumeric (max)AlphanumericBytes

|---------|---------|---------------|--------------|-------|

121x21412517 1057x57652395271 25117x117261115821085 40177x177708942962953

Numeric is the densest because each character only needs 3.33 bits. Bytes (UTF-8) take the most space.

Error Correction Levels

QR codes use Reed-Solomon coding with four levels:

  • L (Low) — 7% of data restorable
  • M (Medium) — 15%
  • Q (Quartile) — 25%
  • H (High) — 30%

Higher levels mean larger codes for the same data, but tolerance for damage and logo overlay. H is what lets you put a brand logo in the center.

Why They Scan So Well

The combination of finder patterns + error correction means a QR code can be photographed at an angle, partially obscured, or printed at low contrast and still decode. Modern scanners need only roughly 60% of the code visible.

Common Use Cases

  • Wi-Fi credentials: WIFI:T:WPA;S:NetworkName;P:password;;
  • Contact cards: vCard format
  • Payment codes: most regional payment apps embed structured data
  • App download deep links

Security

QR codes are URLs the user did not type. Phishing via printed-over QR codes (covering legit codes with malicious stickers) is real. Apps now preview destinations before opening.

Generating Codes

Most languages have a library. For complex use cases, choose error correction H, set version manually for stable size, and avoid logos larger than 25% of the code area.

Generate codes in the [QR Code Generator](https://sdk.is/qr-code-generator).