How does a QR code work?
That square of black and white dots holds information your phone reads instantly. How a QR code works, what it's for, and why it's so resilient.
You point your phone’s camera at a square full of little dots and, instantly, a web page, a menu, or a payment opens. QR codes are everywhere today: posters, packaging, restaurants, tickets. But what exactly are they, and how do they store so much information in so little space?
What a QR code is
QR stands for Quick Response, and that name says it all: it was designed to be read very fast. It is, essentially, a two-dimensional barcode. While a normal barcode has only stripes (one dimension), the QR uses a pattern of black and white squares in a grid, which lets it store much more information.
It was invented in 1994 by the Japanese company Denso Wave, initially to track parts in the automotive industry.
How it stores information
The trick is in the grid. Each small square (called a module) can be black or white, and that combination of blacks and whites represents data in binary (ones and zeros). By combining hundreds of modules in two dimensions, a QR can store anything from a web link to text, contact details, or payment information.
Since it can be read both horizontally and vertically, it fits far more information than a linear barcode of the same size.
How your phone reads it
When you point the camera at a QR, the phone does several steps in an instant, as HowStuffWorks explains:
- It detects the code thanks to large squares in three of its corners (the “position patterns”), which tell it where it is and how it’s oriented.
- It reads the grid of black and white modules.
- It translates that pattern into the ones and zeros it encodes.
- It interprets the data: if it’s a link, it opens the web; if it’s text, it shows it; and so on.
It all happens in fractions of a second.
Why it’s so resilient
A brilliant detail: QR codes keep working even if they’re a bit damaged, dirty, or wrinkled. This is because they include error correction: part of the information is intelligently duplicated, so if a piece of the code is missing or ruined, the reader can reconstruct the complete data. That’s why they work even with a logo on top or with smudges.
What they’re used for today
The QR’s versatility has led it to a thousand everyday uses:
- Links to web pages and restaurant menus.
- Mobile payments and transfers.
- Event tickets and boarding passes.
- Product information and advertising campaigns.
- Quick connection to Wi-Fi networks.
A square that opens a thousand doors
QR codes are a perfect example of simple yet powerful technology: a mere pattern of dots capable of storing information, resisting damage, and being read in an instant with any phone. Born for industry, today they connect the physical world with the digital one at a single glance. The next time you scan one, you’ll know what that mosaic of dots is hiding.