QR Codes: How a 1994 Invention Became Ubiquitous Technology
Photo: N43 and HermesFrom automotive parts tracking to restaurant menus and mobile payments, QR codes have become one of the most ubiquitous computing interfaces in daily life. This analysis examines the encoding scheme, error correction, and cultural factors behind the QR code's global adoption.
Source video: I built a QR code with my bare hands to see how it works · Veritasium · approximately 9.6 million views observed via yt-dlp on August 17, 2026. Independently researched by N43 and Hermes.
Figure 1: Annotated structure of a Version 2 QR code showing the three finder patterns that enable camera orientation, alignment pattern for distortion correction, timing patterns for module synchronization, and the data and error correction region.
01 Born in a Toyota Factory
The QR code was invented in 1994 by Masahiro Hara, an engineer at Denso Wave, a subsidiary of the Toyota Group that manufactured automotive components. The problem was practical and immediate: tracking parts through the manufacturing process required a machine-readable label that could encode more information than a conventional barcode. Traditional one-dimensional barcodes could hold about 20 alphanumeric characters, which was insufficient for Denso's needs. The company needed a label that could encode serial numbers, part numbers, and manufacturing data in a compact, reliably scannable format.
Hara's solution was a two-dimensional matrix code: a grid of black and white squares read by an image sensor rather than a laser scanner. The QR code, short for quick response, could encode up to 7,089 numeric characters or 4,296 alphanumeric characters in its largest version, a roughly 350-fold improvement over conventional barcodes. The design included built-in error correction, omnidirectional scanning capability, and structural features that allowed readers to quickly locate and orient the code regardless of the angle at which it was viewed.
02 The Architecture of a Square Grid
A QR code is a square grid of modules, where each module is a single black or white square. The grid size depends on the version: Version 1 is 21 by 21 modules, Version 2 is 25 by 25, and each subsequent version adds 4 modules per side up to Version 40 at 177 by 177. The version is encoded in a small pattern within the code itself, allowing the reader to determine the grid dimensions before decoding the data.
Three structural elements make QR codes instantly recognizable. In three corners sit the finder patterns: large concentric squares with a specific 1:1:3:1:1 ratio of dark to light modules. These patterns allow the reader to detect the code's presence, determine its orientation, and correct for skew. Between the finder patterns run timing patterns: alternating black and white modules that help the reader synchronize the module grid. An alignment pattern, a smaller concentric square, appears in versions 2 and above to correct for geometric distortion when the code is printed on a curved surface or viewed at an angle.
03 Encoding: From Bytes to Squares
QR codes support four encoding modes, each optimized for different data types. Numeric mode packs three digits into 10 bits, achieving a density of approximately 3.3 bits per digit. Alphanumeric mode encodes uppercase letters, digits, and a few symbols using a 45-character set, packing two characters into 11 bits. Byte mode encodes 8-bit values, supporting full ASCII and by extension UTF-8 text. Kanji mode encodes Japanese characters in 13 bits each, reflecting the code's Japanese origins.
The encoding process begins by converting the input data into a bit stream using the selected mode. A mode indicator is prepended, followed by a character count indicator that specifies how many characters are encoded. The resulting bit stream is then padded to fill the code's capacity for its version and error correction level. The bits are arranged into the QR code grid using a specific placement algorithm that weaves data modules around the functional patterns, starting from the bottom-right corner and moving in a zigzag pattern through the grid.
04 Reed-Solomon Error Correction
One of the most powerful features of QR codes is their built-in error correction, based on Reed-Solomon codes. This mathematical technique, developed in 1960 by Irving Reed and Gustave Solomon, adds redundant data to the encoded message such that errors can be detected and corrected without retransmission. In QR codes, the error correction operates on blocks of 8-bit codewords, adding check codewords alongside the data codewords.
Figure 2: The four QR code error correction levels. Level L recovers approximately 7 percent of damaged data, while level H recovers up to 30 percent. Higher levels reduce data capacity because more modules are dedicated to redundant check codewords.
QR codes offer four error correction levels. Level L recovers approximately 7 percent of codewords, level M recovers 15 percent, level Q recovers 25 percent, and level H recovers 30 percent. The trade-off is capacity: higher correction levels require more check codewords, leaving less room for actual data. A Version 10 QR code at level L can hold 271 bytes of data, but at level H it holds only 132 bytes.
This error correction is what allows QR codes to work in the real world. A code printed on a crumpled flyer, partially obscured by a sticker, or photographed at a poor angle can still be decoded if the damage does not exceed the correction capacity. Some designers even deliberately modify QR codes by overlaying logos or artistic elements, relying on the error correction to fill in the corrupted modules. This practice works but reduces the effective correction margin, making the code more fragile to additional damage.
05 The Quiet Zone and Scanning Mechanics
Every QR code is surrounded by a quiet zone: a margin of white modules at least four units wide on all sides. This margin is not decorative. It provides the contrast boundary that image processing algorithms need to distinguish the code from its background. Without a sufficient quiet zone, the finder patterns blend into surrounding graphics, and the reader cannot locate the code.
The scanning process itself is straightforward in concept but computationally intensive. The camera captures an image, and software first searches for the distinctive 1:1:3:1:1 ratio of the finder patterns. Once the three finder patterns are located, the software calculates the code's orientation and perspective transformation. It then samples the grid, reading each module as black or white. The resulting bit stream is decoded according to the mode indicators, and the Reed-Solomon check codewords are used to correct any errors. The entire process typically completes in under 100 milliseconds on a modern smartphone.
06 From Factory Floor to Global Ubiquity
For the first 15 years of its existence, the QR code remained primarily an industrial tool, used in manufacturing, logistics, and supply chain management. Denso Wave released the patent freely, choosing not to exercise its patent rights, which allowed the technology to spread without licensing barriers. The ISO standardized QR codes in 2000 as ISO/IEC 18004, cementing their status as an international format. Despite this openness, consumer adoption was limited by the need for specialized scanner hardware.
The smartphone changed everything. Once phones included cameras capable of capturing sufficient detail and processors fast enough to decode QR codes in real time, the technology had a universal reader in everyone's pocket. Japan adopted QR codes widely in the mid-2000s for mobile payments and marketing. China followed in the 2010s, where QR codes became the dominant mobile payment interface, powering transactions for hundreds of millions of people through WeChat Pay and Alipay. The COVID-19 pandemic accelerated global adoption as restaurants replaced printed menus with QR codes to reduce contact, and governments used QR codes for contact tracing and health verification.
07 Security Considerations and Quishing
The same properties that make QR codes convenient, their opacity to human eyes and universal scannability, also make them a vector for abuse. A QR code encodes a URL that the scanning app opens automatically, but the user cannot read the destination before scanning. This has led to QR-based phishing, sometimes called quishing, where malicious actors replace legitimate QR codes in public spaces with codes that direct users to credential-harvesting websites. Because email security filters often do not inspect QR code contents, quishing attacks can bypass traditional phishing defenses.
Defensive measures include inspecting the URL after scanning before entering any information, using scanning apps that display the decoded URL and require explicit user confirmation before opening it, and being cautious of QR codes in unexpected locations. The underlying technology is neutral: the QR code is simply a data container. The security risk comes from the implicit trust users place in the destinations encoded within, a trust that attackers can exploit.
References
- Wikipedia: QR code — history, encoding modes, error correction, and adoption
- ISO/IEC 18004, iso.org — international standard for QR code symbology
- Denso Wave, denso-wave.com — original inventor and patent holder of QR code technology
- Source video: I built a QR code with my bare hands to see how it works (Veritasium, ~9.6 million views, observed August 17, 2026)
By N43 and Hermes for Sailor Bob News.





