How QR Codes Actually Work

Look at any QR code and you see a square grid of black and white cells, three distinctive square patterns in three corners, and seemingly random noise filling the middle. None of it is random. Every element — from the three corner squares to the arrangement of cells — serves a specific function in a precisely defined standard (ISO 18004).

Finder Patterns and Timing

The three identical square markers in the corners of every QR code are finder patterns. They allow a scanner — at any angle, any distance, under any lighting — to locate the code in its visual field. The scanner detects the 1:1:3:1:1 ratio of the finder pattern (dark:light:dark:light:dark) and uses the three patterns' positions to determine the code's orientation and size. This is why QR codes scan from any angle — the scanner reorients itself based on the finder patterns.

Between the finder patterns run timing patterns — alternating black and white cells that define the grid size and help the scanner enumerate individual cells accurately even when the code is slightly distorted by camera angle or print quality.

A QR code doesn't "know" where it's pointing. The finder patterns give the scanner all the information it needs to determine orientation and scale — which is why QR codes scan reliably even when tilted, crumpled, or photographed at an angle.

Data Encoding

The actual data in a QR code is encoded in binary form across the remaining cells. QR codes support several encoding modes — numeric (highly efficient for digit-only data), alphanumeric (for URLs and text), binary (for arbitrary byte data), and Kanji (specialized for Japanese characters). A URL starting with "HTTPS://" uses alphanumeric mode, which encodes two characters per 11 bits — more efficiently than raw binary.

Reed-Solomon Error Correction

The most elegant feature of the QR standard is its error correction. Reed-Solomon codes are a mathematical technique that adds redundant data allowing recovery when part of the code is damaged. A Level H QR code can fully recover even when 30% of its cells are obscured or corrupted — which is why QR codes still scan when they're scratched, dirty, printed on textured surfaces, or have a logo placed over the center.

Generate QR codes at QRHub — with adjustable error correction levels for design applications or maximum reliability in challenging environments.