Those pixelated squares are now everywhere, on restaurant tables, product packaging, posters, and payment terminals. Point a camera at one and your phone instantly opens a website or app. The QR code, short for Quick Response code, was invented in 1994 by a Japanese company to track car parts, and it has quietly become one of the most useful pieces of everyday technology. Its design is a small masterclass in encoding information reliably.
From Squares to Data
A QR code is a two-dimensional barcode. Where an old-fashioned barcode stores information in the widths of vertical lines, a QR code uses a grid of small black and white squares called modules. Each module represents a bit of digital information: black for one value, white for the other. Read in the correct order, these bits spell out text, a web address, contact details, or payment information.
Because the code uses two dimensions instead of one, it can hold far more data in a small space than a traditional barcode, and it can be scanned from any angle. That flexibility is a big reason QR codes replaced older formats for so many uses.
How a Phone Finds Its Bearings
Before a scanner can read the data, it has to locate and orient the code. QR codes include several built-in landmarks that make this fast and reliable.
- Three large squares in the corners, called finder patterns, let the scanner instantly recognize that a QR code is present and work out its rotation.
- Smaller alignment patterns help the scanner correct for tilt and curvature when the code is on a bottle or a crumpled poster.
- Timing patterns, rows of alternating squares, act like a ruler so the scanner can count the grid accurately.
Thanks to these markers, your phone can read a QR code upside down, at an angle, or reflected in a window, all in a fraction of a second.
Why Damage Does Not Break Them
The most impressive feature of QR codes is that they keep working even when scratched, smudged, or partly covered. This comes from error correction, a mathematical technique that stores the data with deliberate redundancy. The code includes extra information calculated from the original data, so that if some modules are unreadable, the missing pieces can be reconstructed.
QR codes offer several levels of error correction, and the highest can recover the full message even if roughly 30 percent of the code is destroyed. This is also why companies can place a logo in the middle of a QR code without breaking it: the error correction fills in for the covered squares. The trade-off is that stronger error correction uses more modules, making the code denser for the same amount of data.
A Note on Safety
Because a QR code can silently send you to any web address, it can be misused. Scammers sometimes stick fake codes over real ones on parking meters or payment signs to redirect people to fraudulent sites. A few habits keep you safe:
- Check that the web address your phone previews looks legitimate before tapping it.
- Be suspicious of codes stuck on top of existing ones or placed in unexpected locations.
- Avoid entering payment or login details on a site you reached only through an unsolicited code.
It also helps to understand what a QR code cannot do on its own. The code is passive; it carries information but performs no action until your phone reads it and decides what to do. A link inside a code only opens if you tap the preview, and a well-behaved phone will always show you where a code leads before going there. That preview step is your best defense, so treat it as a moment to pause rather than a formality to rush past.
Used carefully, QR codes are a small triumph of practical engineering: a simple grid of squares that carries real information, orients itself automatically, and shrugs off damage that would defeat a lesser design.