How QR Codes Actually Work

A QR code looks like static, but every square in that grid is doing a specific job. Denso Wave invented the format in 1994 for tracking car parts on Toyota's factory floor, and it was designed from the start to be readable fast, from any angle, even partially damaged. That last requirement is why a QR code is so much more than a black-and-white barcode stretched into two dimensions — it's a small, self-describing data structure with its own error correction built in.

The building block: a module

Each individual black or white square in a QR code is called a module, not a pixel — "pixel" describes a unit of a screen, while "module" describes a unit of the code's own grid, which stays the same regardless of how large or small the code is rendered. A QR code is always square, and its side length in modules follows a fixed formula based on its version, a number from 1 to 40: version 1 is 21×21 modules, and each version up adds 4 modules per side, topping out at version 40's 177×177 grid. QR Mint picks the smallest version that fits your content automatically — more data, or a higher error-correction level, pushes the version (and the module count) up.

The three eyes: finder patterns

The three bold square-in-square-in-square markers in the top-left, top-right, and bottom-left corners are finder patterns. They're identical and deliberately unambiguous at any rotation, which is how a scanner locates and orients a QR code before it even starts reading data — find those three squares, and you know which way is up, how large the grid is, and roughly how skewed the camera's angle is. Larger QR codes also get smaller alignment patterns scattered through the interior, which correct for the lens distortion that shows up over a bigger grid, and thin timing patterns — alternating black-and-white strips connecting the finder patterns — that let the scanner count modules accurately even if the image is a little blurry.

Turning your content into bits

Once the frame is built, the actual content gets encoded using one of several modes, chosen automatically based on what characters are present: numeric mode packs digits three at a time into 10 bits, the most efficient option for something like a phone number; alphanumeric mode handles uppercase letters, digits, and a small set of symbols at roughly 5.5 bits per character; and byte mode — used for anything else, including lowercase letters, punctuation, and full Unicode text — spends a full 8 bits per byte. A short numeric string and an equally long byte-mode string won't produce the same size code, which is part of why a phone number QR code can look noticeably simpler than a paragraph of text at the same error-correction level.

Error correction: the part that makes QR codes reliable

This is the feature that separates a QR code from an ordinary barcode. Before the data is laid into the grid, a mathematical technique called Reed–Solomon error correction generates extra "parity" codewords derived from the original data and interleaves them alongside it. A scanner doesn't need every module to be read correctly — it can reconstruct the original content even if a meaningful chunk of the code is smudged, torn, glared-out, or deliberately covered by a logo, as long as the damage stays within the code's chosen tolerance. QR Mint lets you pick that tolerance directly via the error-correction level (L, M, Q, or H) — see our full breakdown of what each level actually means for the size tradeoff involved.

Masking: making the pattern scanner-friendly

Raw encoded data doesn't always produce a grid that's easy to scan — long runs of the same color, or patterns that accidentally resemble a finder pattern, can confuse a scanner's edge detection. Before finalizing a code, the encoder tries all eight standardized mask patterns (each one XORs the data against a different repeating geometric rule) and scores the result on things like run-length and pattern balance, then keeps whichever mask produces the most scanner-friendly grid. This step is invisible to you as a user, but it's why two QR codes encoding similar content can look visually quite different — they may simply have picked different masks.

The last two pieces: format and version info

Two small strips of modules next to the finder patterns encode the error-correction level and mask pattern used, protected by their own short error-correcting code — this is how a scanner knows how to undo the masking and interpret the rest of the grid correctly. Codes at version 7 and above (45×45 modules or larger) also carry a small version information block, since at that size the module count alone is ambiguous. All of this — finder patterns, timing, alignment, format info, version info, masking, and Reed–Solomon error correction — is what QR Mint's built-in encoder assembles the moment you type into the generator, entirely on your device.

Keep reading