QRQRKEEP
HOME/DOCS

HOW IT WORKS

DOCS & UTILITY
TECHNICAL BREAKDOWNISO/IEC 18004 SPECIFICATIONZERO REDIRECTS

How QR Codes Work: Static vs. Dynamic QR Codes and Direct Encoding

A comprehensive guide to matrix geometry, error correction mathematics, and barcode permanence

1. The Fundamental Mechanics of a 2D Matrix Barcode

The Quick Response (QR) code was invented in 1994 by Masahiro Hara at the Japanese automotive engineering company Denso Wave. Unlike traditional one-dimensional (1D) UPC barcodes found on grocery packages—which encode data in a single horizontal strip of varying line widths—the QR code is a two-dimensional (2D) matrix barcode. It stores binary data both horizontally and vertically across an array of black and white square modules.

Because data is encoded across two spatial dimensions, a QR code can store several hundred times more information than a 1D barcode within a fraction of the physical surface area. Under the international standard ISO/IEC 18004, a QR code can store up to 7,089 numeric digits, 4,296 alphanumeric characters, or 2,953 binary bytes.

When your smartphone camera views a QR code, optical image processing software identifies the distinct geometry of the pattern, extracts the orientation, corrects for perspective tilt, decodes the binary bitstream, and presents the resulting string or URL to your operating system.

2. Static vs. Dynamic QR Codes: The Great Industry Divide

In the modern web and digital marketing landscape, QR codes are categorized into two fundamentally different technical architectures: Static QR Codes and Dynamic QR Codes. Understanding the operational distinction between these two approaches is essential before printing a single flyer or packaging box.

Dynamic QR Codes: The Intermediate Redirect Model

A dynamic QR code does not encode your final destination link directly into the visual squares. Instead, it encodes a temporary URL pointing to a central server managed by the generator platform (for example: https://vendor-qr.com/r/82914a).

When a user scans the code, their mobile browser requests that intermediate URL. The vendor's server logs the request, records the scanner's geographic location, IP address, operating system, and timestamp, increments a database hit counter, and finally issues an HTTP 301 or 302 redirect header sending the visitor to your actual website.

Pros: You can edit the destination URL after printing, and view scan count analytics.

Cons & Severe Vulnerabilities:

  • Vendor Lock-In & Paywalls: If you stop paying the vendor's $15–$45 monthly subscription fee, your physical printed codes break immediately.
  • Single Point of Failure: If the vendor's server experiences downtime, DDoS attacks, or the company goes out of business, your codes stop working forever.
  • Added Scan Latency: Users experience a noticeable delay while waiting for the redirect server to process the request before loading your site.
  • Privacy Invasion: Every person who scans your code has their browsing behavior and IP address harvested by a third-party tracking company.

Static QR Codes: The Direct-Encode Architecture (Used by QRKeep)

A static QR code encodes the complete, unadulterated payload directly into the visual pattern of the matrix. If your URL is https://mycafe.com/menu, those exact characters are compiled into binary modules.

When a smartphone camera focuses on a static QR code, the camera firmware decodes the geometric squares directly into the destination URL without contacting any intermediary server. The phone launches the browser and connects directly to your website.

Pros:

  • Permanent & Immortal: It is mathematically impossible for the code to expire. It will work decades from now as long as your destination website exists.
  • Zero Cost: No subscriptions, no renewal fees, and no scan quotas.
  • Lightning Fast: Zero redirect hops means instant navigation with zero added network latency.
  • Complete Privacy: Scans do not trigger third-party analytics trackers or harvest visitor data.

Limitation: The encoded URL is physically permanent. You cannot change the encoded destination link after the physical paper is printed (unless you control the destination domain and configure an HTTP redirect on your own server).

3. Detailed Comparison: Static vs. Dynamic QR Codes

FEATURESTATIC QR (QRKEEP)DYNAMIC QR (COMMERCIAL SAAS)
Expiration DateNever (Permanent for life)Expires when subscription ends
Monthly Cost$0 Forever$10 to $45 / month recurring
Scan LimitsUnlimited scansTypically capped at 50–500/mo on free
Server DependencyNone (Zero external server hops)Requires 100% uptime of vendor server
User Privacy100% Private (No data logging)Tracks IP, device, GPS & timestamps
Scan LatencyInstantaneous (0 ms added)200ms – 1500ms redirect lag
URL EditabilityFixed once printedEditable via online dashboard

4. The Anatomy of a QR Code: Deciphering the Visual Grid

When you examine a QR code closely, you will notice that it is not merely a chaotic scatter of random pixels. Every section of the 2D grid serves a precise mathematical and geometric function:

  • Position Detection Patterns (Finder Patterns): The three prominent nested square boxes located in the top-left, top-right, and bottom-left corners. These allow camera sensors to recognize the barcode instantly, calculate its physical scale, and determine its rotation angle in 360-degree space.
  • Alignment Patterns: Smaller square markers distributed within larger QR codes (Version 2 and higher). These provide reference anchor points that allow camera software to correct for physical warping or curved surfaces, such as codes printed on soda cans or flexible food wrappers.
  • Timing Patterns: Alternating black and white module tracks running horizontally and vertically between the finder patterns. These allow the scanning engine to calculate the exact coordinate grid coordinates for each module in the matrix.
  • The Quiet Zone: The critical white margin surrounding all four outer edges of the code. According to the ISO standard, this border must be at least four modules wide. Without this clear buffer, camera software cannot reliably distinguish the barcode from surrounding background graphics or typography.
  • Format Information: Dedicated modules adjacent to the finder patterns that encode the chosen error correction level (L, M, Q, or H) and the masking algorithm applied to the matrix.
  • Data and Error Correction Codewords: The remaining interior areas of the grid, where your payload is stored alongside interleaved mathematical error recovery blocks.

5. Reed-Solomon Error Correction: Mathematical Resilience

One of the greatest engineering achievements of the QR specification is its ability to sustain severe physical damage without losing a single bit of information. If a barcode on a restaurant table has coffee spilled across it, or a corner is torn off a concert poster, standard 1D barcodes fail completely. A QR code continues to scan effortlessly.

This resilience is powered by Reed-Solomon error correction, a sophisticated algebraic error-correcting code first developed in 1960 by Irving S. Reed and Gustave Solomon. During generation, the raw data codewords are treated as coefficients of a polynomial over a Galois Field (specifically GF(28) or GF(256)). The algorithm divides this polynomial by an error-correction generator polynomial to produce redundant parity codewords.

The ISO standard establishes four distinct error correction levels:

  • Level L (Low): Approximately 7% of damaged or obscured codewords can be mathematically reconstructed. Produces the smallest, least dense matrix.
  • Level M (Medium — QRKeep Default): Approximately 15% of damaged codewords can be recovered. This provides the optimal real-world balance between robust damage tolerance and clean, open module density for rapid camera recognition.
  • Level Q (Quartile): Approximately 25% recovery capacity. Ideal for industrial environments, manufacturing factory floors, or outdoor logistics.
  • Level H (High): Up to 30% recovery capacity. Commonly selected when designers intentionally place custom corporate logos in the center of the code.

6. How QRKeep Computes QR Codes Directly in Your Browser

When you enter text on QRKeep, our application carries out the entire multi-stage compilation pipeline locally on your machine in under 5 milliseconds:

  1. Input Analysis & Mode Selection: The input string is analyzed to select the most compact encoding mode (Numeric, Alphanumeric, Byte, or Kanji) to minimize the required grid dimension.
  2. Bitstream Packing & Padding: The data is packaged into 8-bit bytes with terminator bits and alternating padding bytes (0xEC and 0x11) to fill the required codeword capacity.
  3. Parity Codeword Calculation: Galois Field polynomial arithmetic computes the Reed-Solomon redundancy blocks and interleaves them with the data codewords.
  4. Matrix Placement & Masking: The modules are laid out into the grid matrix alongside finder, alignment, and timing patterns. Eight standard optical mask patterns are evaluated with algorithmic penalty scores (penalizing long consecutive lines, 2×2 blocks, and unbalanced light/dark ratios) to select the most readable pattern.
  5. Vector SVG Emission: The final boolean grid is rendered into an in-memory Scalable Vector Graphic (SVG) with clean <rect> elements, or drawn to a high-density 2,900×2,900px HTML5 Canvas for instant PNG export.

Because all of these computations occur inside your browser's memory, your data never leaves your device.

Generate Your Permanent QR Code Now

Experience the speed, permanence, and privacy of direct-encoded static QR codes.