The unique data architecture of QR codes
In just a few years, QR codes have become a familiar sight on phones and billboards everywhere. A scan is all it takes to make a payment, get information, or access a service.
The formation of QR code
QR codes (short for Quick Response) were first developed in 1994 by Denso Wave, a subsidiary of Toyota, in Japan.
This code was originally created to track components in the automobile production line. When traditional barcodes did not have enough data and scanning speed, Japanese engineers sought to create a new type of code that could be read quickly and contained more information, and thus the QR code was born.
Unlike barcodes that are only read horizontally, QR codes are designed in a square shape so that they can store data both horizontally and vertically. This allows them to hold more characters (from a few dozen to thousands), including numbers, letters and symbols.
When it first came out, QR codes were mainly used within factories. But when phones with cameras became popular, the code "got a new lease of life." It was taken off the assembly line and used in advertising, payments, product lookups, and class attendance.
The QR code's structure is quite unique, consisting of three large squares at the corners to help with positioning when scanning; the rest are small data boxes. Although it looks simple, inside the code is a very carefully encoded string of binary numbers.
There are up to 40 versions of QR codes, depending on the length and complexity of the data. Each QR code has built-in error correction so that even if it is blurred, torn or misprinted, it can still be read correctly thanks to the backup algorithms in the encoding platform.
Why are QR codes almost never the same?
According to Tuoi Tre Online 's research, QR codes work as a type of "digital writing" that contains information. It can be a link, text, phone number, identification code... Although the black and white squares look similar, having two identical QR codes is extremely rare, almost impossible. The reason lies in the encoding method and its storage capacity.
A QR code is more than just an image . It is a two-dimensional matrix data encoding structure. Depending on its complexity, a QR code can store anywhere from a few characters to thousands of characters.
Specifically, a standard QR code can store up to about 7,000 numeric characters or about 3,000 alphanumeric characters. If calculated in bits, the maximum capacity is up to about 3KB of data.
Technically, a QR code can be generated from a unique set of input data and will generate a unique image accordingly. That is, if you create a QR code containing content, the QR image generated from that content is fixed. Changing even 1 character like adding a period will completely change the QR code.
The “near-zero duplication” ability comes from the huge number of combinations of QR. With 40 size levels (from version 1 to version 40) and 4 error correction levels (L, M, Q, H), along with the way the data is divided into blocks, the number of QR combinations that can be created is billions of billions of different codes. Specifically, if using the most complex QR type (version 40, low error correction level), the number of possible combinations is up to 10 to the 700th power - more than the number of atoms in the known universe.
Furthermore, QR codes are designed to be error-correcting: you can blur or obscure up to 30% of the area, and the content will still be read correctly. This makes each QR code not only unique in content, but also highly resistant to "interference", helping to avoid confusion between two nearly identical codes.
In practice, when a QR code generation system (e.g. e-ticketing, login system...) needs to generate a unique code for each person, it usually attaches a unique ID string , or time, specific information, to ensure that it is never duplicated. Therefore, even when accessing the same website, the QR code for each person can be different, for example, airline tickets, guest cards, or OTP QR.
Finally, platforms usually do not generate QR codes randomly, but have a system for checking, storing and controlling. So even if a human can duplicate (re-paste an old code), the system can still detect and refuse to process it.
With all of these factors combined, there is a huge number of combinations, strong error correction, and a controlled way of generating codes, so QR codes almost never coincidentally match. If they do, it's usually... intentional or due to copying.
Source: https://tuoitre.vn/ma-qr-duoc-hinh-thanh-the-nao-vo-so-ma-qr-lieu-co-bi-trung-khong-20250624104002249.htm
Comment (0)