How QR Codes Actually Work
A QR code is not an image of a link — it is text, written in binary, painted as squares. Here is the whole pipeline, without the maths.
Open the QR decoder1. Text becomes bits
The encoder first picks a mode based on your data: numeric, alphanumeric, byte, or Kanji. Numeric data packs three digits into ten bits, so a code holding only numbers stores far more characters than one holding a long URL. The chosen mode, the character count, and the data itself are concatenated into one bit stream.
2. Error correction is added
Reed-Solomon error correction appends redundant codewords so the code still reads when part of it is dirty, torn, or covered by a logo. There are four levels — L, M, Q, and H — recovering roughly 7%, 15%, 25%, and 30% of the symbol. Higher protection costs capacity, which is why a logo-heavy marketing code holds less data than a plain one of the same size.
3. Bits become modules
The bit stream is laid out in a grid of black and white squares called modules, around fixed structures:
- Finder patterns — the three big corner squares that tell a scanner where the code is and how it is rotated
- Alignment patterns — smaller squares that correct for perspective and curvature
- Timing patterns — the alternating line that fixes the module grid size
- Format and version information — which error-correction level and symbol version was used
- Quiet zone — the mandatory blank margin; without it, scanning often fails
4. Masking makes it readable
Large blank areas confuse scanners, so the encoder XORs the data area with one of eight mask patterns and keeps the one that scores best. That is why two codes containing the same text can look slightly different.
5. Decoding runs the process backwards
A decoder locates the finder patterns, corrects the perspective, samples the grid, removes the mask, verifies and repairs the data with the error-correction codewords, and finally converts the bits back to text. This is exactly what QRDecoder does inside your browser when you upload an image — no server involved.
Related guides
Decode your QR image now
Free, private, and instant — your image never leaves your device.
Upload a QR image