Design

Hidden QR code in an image: how to do it without breaking the scan

Paolo Matias TonelloUpdated 7 min read

Hiding a QR code inside a photograph, an illustration or a packaging pattern is a real design technique, not a trick. It works because the QR standard reserves part of every code for error correction. What breaks these designs is not the artwork itself but covering the structural zones a scanner needs to find and align the grid.

Which parts of a QR code are structural

A scanner does three things in order: it locates the three large squares in the corners, it uses the smaller alignment square and the dotted timing lines to work out the grid geometry, and only then does it read the data modules. The first two steps are pass or fail. If they fail, no amount of error correction saves the scan.

What you can decorate in a QR code
ZonePurposeSafe to decorate
Three corner squaresFinder patternsNo
Dotted lines between cornersTiming patternsNo
Small square near bottom-rightAlignment patternNo
Quiet zone (margin)Separates code from backgroundNo — keep it clear
Central data modulesPayload plus error correctionYes, within limits

How much of the code you can actually cover

Error correction level H can reconstruct roughly 30% of the code's data, which is why logo overlays work. But that budget is shared: print defects, glare, angle and a low-contrast background all consume it too. Treat 15% coverage as a practical ceiling for artwork so the remaining margin absorbs real-world conditions.

  • Use error correction level H for any decorated code
  • Keep coverage centred and contiguous rather than scattered across the grid
  • Never let artwork bleed into the quiet zone around the code
  • Keep true black-and-white contrast in the data area, even when the artwork is colourful
  • Prefer a dynamic code so the payload stays short, which keeps the grid coarse and forgiving

How to blend a code into a photograph

  1. Generate the code as SVG so you can edit geometry instead of pixels.
  2. Pick a region of the image with flat, light tone — sky, wall, paper, fabric.
  3. Place the code there and darken its modules to true black against that light area.
  4. Keep the three finder patterns fully intact and fully contrasted.
  5. Blend only the data modules into the texture, module by module, never partially.
  6. Export the final artwork as vector or at print resolution, never as JPEG.

Test a hidden code properly

A hidden code that scans on your desk can still fail on a shelf. Test with at least three phones, including one older Android, at the real distance, under the real lighting, and at an angle. Then test the printed proof, not the screen: paper reflectance and ink spread change the contrast you measured on a monitor.

Author

Paolo Matias TonelloFounder, Qreator

Founder of MT Digital Services LLC and builder of Qreator. Writes about QR codes, print production and privacy-friendly analytics.

Put it into practice