# QR codes on 3d-printed qr codes

> A printed-in-relief QR code relies on shadow for contrast, which makes it lighting-dependent and unreliable. Two-colour printing with a filament change is far better: real luminance contrast, and it works in any light.

Source: https://useqr.app/qr-codes-on/3d-prints · Last reviewed 2026-08-21 · UseQR is free forever, MIT licensed, no signup.

---

| Typical scan distance | **20–50 cm** |
|---|---|
| Minimum code width | **4–8 cm** |
| Error correction | **H** |

## Relief alone is unreliable

A raised or recessed pattern in one colour has no luminance contrast — only shadow. Rotate
the object, or move the light, and the contrast inverts or vanishes. Codes like this scan on
a desk under a lamp and fail everywhere else.

## Two-colour is the fix

Print the base in a light filament, pause at the layer where the code begins, swap to a dark
filament, and continue. The result has genuine colour contrast and scans like paper.

Most slicers support a filament change at a layer (`M600` in Marlin). A single-nozzle printer
handles this fine — no multi-material hardware needed.

## Geometry

- **Modules at 1.5 mm or larger**, and ideally a multiple of your nozzle width (0.4 mm nozzle
  → 1.6 mm modules = 4 extrusion widths).
- **Two to three layers** of colour depth is plenty; more just wastes filament.
- **Recess** the dark modules rather than raising them if printing in relief — recessed
  modules hold shadow more consistently than raised ones.
- Print the code on the **top surface**, not a vertical wall, so layer lines run across the
  modules rather than along them.

## If you must use single-colour relief

Use error correction **H**, make modules at least 2 mm, and recess to 0.6 mm or more. Accept
that it will need directional lighting.

## Try it

- https://useqr.app/url
- https://useqr.app/size-calculator
- https://useqr.app/validate
