How do QR codes work? A simple explanation
What all those little squares actually do — explained in plain English.
The basics
A QR ("Quick Response") code is a two-dimensional barcode invented in 1994 by Denso Wave to track car parts. Instead of a single row of lines, it stores data in a grid of dark and light squares called modules, so it can hold much more information — up to several thousand characters.
The three big squares
The large squares in three corners are finder patterns. They tell the camera where the code is, how big it is and which way up it is, so it can be scanned from any angle.
Error correction
QR codes include extra, redundant data so they can still be read if part of the code is dirty, damaged or covered. There are four levels: L (about 7% can be restored), M (15%), Q (25%) and H (30%). That's why you can put a logo in the middle of a QR code: the generator switches to level H and the missing area is rebuilt from the redundant data.
Why contrast and margins matter
Scanners look for the difference between dark and light modules, so a dark code on a light background scans best. The empty border around the code — the quiet zone — helps the scanner find where the code starts. Avoid cropping it or placing busy graphics right up to the edge.