The Unseen Genius of QR Codes
12th November 2025
You scan a QR code at a restaurant, on an advertisement, or maybe to connect to a guest Wi-Fi network. It seems simple, but beneath that pattern of black and white squares is an astonishingly clever piece of engineering.
Microcontroller SIG enthusiast Chris H recently delved into the inner workings of the Quick Response (QR) code, and gave us some great insights into its history, structure, and surprising level of robustness.
💡 The QR Code’s Automotive Roots
Unlike older, one-dimensional barcodes, the QR code was designed for speed and higher data capacity. Its development began around 1994by a Japanese company working for an automotive manufacturer.
The primary initial purpose of the technology was to efficiently track parts throughout the processes of building, storage, and warehousing. This need for quick, reliable tracking led to a technology that is now ubiquitous globally.
🔍 How the Code Is Read and Structured
When a camera, such as one on a smartphone, looks at a QR code, the first thing it does is detect the three large squares located at the corners.
These squares are critical because they allow the code to orientate the image correctly for scanning. ![]()
- If the image is skewed or at an angle, the camera will internally move the image around until the squares are in perfect alignment. This correction happens seamlessly in the background.
- The actual data within the code is stored as a series of ones and zeros (binary code).
- While many people associate QR codes only with website links (URLs), they can actually encode raw text or words. They are powerful enough to contain complex information, like the network name (SSID) and password for a home Wi-Fi network. Some high-resolution versions are even being used to transport very low-resolution camera images.

The Incredible Power of Reed-Solomon Error Correction
The true genius of the QR code lies in its ability to withstand significant damage and still function perfectly. This resilience is due to a feature called triple redundancy and an error correction system known as Reed-Solomon Error Correction.
Chris noted that this particular error correction system is the same one used in audio CDs, which he learned about while travelling to Japan to study new technologies with engineers.
Chris’ sketch of the 44.1 kHz datastream on a CD and how bytes of digital data are extracted from the sampling of the disc surface.

A more detailed description of how the error correction system works can be found in Wikipedia.
The Redundancy Mechanism
The data within the QR code is not just laid out once; it is distributed in multiple versions and different “planes,” such as a vertical plane and a horizontal plane. This scrambling of data is similar to how a CD player handles data.
Because the data is encoded with multiple redundant copies across different areas of the code, even if a large section is missing or corrupted:
- The system can reconstitute the lost information.
- It compares the corrupted version to the redundant layers it still has and can actually work out what bits were missing.
- This allows the code reader to re-manufacture the original information that should have been there.
In short, the Reed-Solomon code structure is what allows a QR code to be partially destroyed—whether by dirt, a tear, or a scratch—and still be read accurately.
📈 Evolving Data Capacity and Design
As camera technology has improved, the density and resolution of QR codes have also increased. While basic codes are smaller, larger, more complex versions can store an impressive amount of data. For example, a 170×170 code can hold up to 1,852 characters.
Newer software also allows for the inclusion of a company logo or image in the centre of the code, with the QR pattern intelligently wrapping around it, proving that even a tool as simple as a QR code is still evolving.


