Karuvii LogoKaruvii
Back to Insights
8 min read

How QR Codes Work: A Technical Guide

Anatomy of a QR Code

QR Codes (Quick Response Codes) are 2D matrix barcodes defined by the ISO/IEC 18004 standard. Developed in 1994 by Denso Wave, they can store thousands of characters—up to 7,089 numeric or 4,296 alphanumeric characters. This is a massive improvement over traditional 1D barcodes, which typically max out at around 20 to 30 characters.

1. Finder Patterns and Alignment

The three prominent black-on-white square nested structures located in the top-left, top-right, and bottom-left corners are the Finder Patterns. These patterns allow scanners to detect the orientation, size, and angle of the QR code in a full 360-degree range. Additionally, smaller Alignment Patterns are embedded in larger QR code versions to correct for perspective distortion, enabling reliable scans even from angled surfaces or curved screens.

High-Fidelity QR Generation

Generate ISO-compliant QR codes for URLs, WiFi, and vCards instantly.

Open QR Code Studio

2. Encoding Modes

QR codes dynamically select the most efficient encoding scheme based on the input text structure:

  • Numeric Mode: Encodes numbers 0-9, matching 3 digits into 10 bits.
  • Alphanumeric Mode: Encodes uppercase letters, numbers, and key symbols ($ % * + - . / : and space).
  • Byte Mode: Encodes standard 8-bit binary data (UTF-8 character sets).
  • Kanji Mode: Encodes Shift JIS characters.

3. Reed-Solomon Error Correction

One of the most powerful features of the QR code standard is its built-in resilience to damage, utilizing Reed-Solomon error correction algorithms. The specification supports four selectable levels:

  • Level L: Allows recovery of up to 7% of lost/damaged data.
  • Level M: Allows recovery of up to 15% (standard default).
  • Level Q: Allows recovery of up to 25%.
  • Level H: Allows recovery of up to 30% (frequently used for custom branded codes containing logos).

By generating redundant data code blocks alongside the original data payload, the QR reader can reconstruct missing pixels, ensuring maximum reliability in real-world environments.

4. Data Masking Patterns

During the generation process, a masking pattern is applied to the grid layout. The objective of data masking is to prevent large blocks of purely black or white pixels, which can confuse standard scanner cameras. The QR code standard defines eight default masking patterns (expressed as grid mathematical formulas). The encoder automatically tests all eight patterns and selects the one that results in the most balanced distribution of dark and light modules across the matrix.

QR Code Studio

Create ISO-compliant QR codes with advanced error correction on Karuvigal.

Open Karuvigal

Continue Reading