How to 3D print a QR code that actually scans
Get strong contrast with a two-colour filament swap, size the squares for your nozzle, keep the quiet zone and test a small tile before the full part.
Add LearnQRCode as a preferred source on Google
Quick answer
- Scanners need contrast, not depth. Print the code in two colours (dark squares on a light base) by changing filament at the layer where the squares begin.
- Keep the data short so each square (module) is several times wider than your nozzle. Fewer, bigger squares print cleanly.
- Leave a blank four-square border, then print a small test tile and scan it with two phones first.
3D print a scannable QR code in 4 steps
- 1Keep the data shortFewer modules means bigger squares
- 2Size modules 3–4× nozzle widthRule of thumb: 1.2–1.6 mm at 0.4 mm
- 3Add a filament changeDark squares on a light base
- 4Print a test tile firstScan with an iPhone and an Android
In this guide
A 3D printed QR code makes a neat Wi-Fi sign, plant label or keyring. But a QR code is a 2D symbol: scanners read the difference between dark and light squares, not height. The job is to get crisp, high-contrast squares out of a machine that builds in layers.
Why most failed prints fail
- Not enough contrast. One colour relies on shadows, which change with the light.
- Squares too small for the nozzle. Corners round off and neighbouring squares merge.
- No quiet zone. The code runs to the edge, so the scanner can’t find where it starts.
- Too much data. A long link makes a dense code with tiny squares.
Step 1: Keep the data short
The more you encode, the more squares (modules) the code needs. DENSO WAVE, the company that invented the QR code, explains that versions run from 21 x 21 modules (Version 1) up to 177 x 177 (Version 40), adding four modules per side each time. Fewer modules means bigger, easier-to-print squares.
- Use the shortest link you can, such as
example.com/wifi. - A Wi-Fi code’s length is set by your network name and password. See our Wi-Fi QR code guide.
Step 2: Choose an error correction level
DENSO WAVE describes four levels, L, M, Q and H, which restore roughly 7%, 15%, 25% and 30% of the codewords. M is the most commonly chosen; Q or H suit places where codes may get dirty or damaged.
A higher level gives margin for blobs and stringing, but adds modules, so each is smaller at the same size. Try M or Q first, and move to H only if your squares stay comfortably large.
Step 3: Size the squares for your nozzle
Rule of thumb, not a standard: make each module at least three to four times your nozzle width. With a 0.4 mm nozzle, that’s around 1.2 to 1.6 mm or larger.
- Count the modules across, or look up the version (Version 2 is 25 x 25, Version 3 is 29 x 29).
- Multiply by your module size. A 25 x 25 code at 1.5 mm is 37.5 mm across.
- Add the quiet zone: four modules each side, eight extra across.
DENSO WAVE’s general advice applies: larger modules read more reliably, so print as large as the space allows.
Step 4: Model it with contrast in mind
The most dependable method on a single-nozzle printer is a layer-based colour change:
- Build a flat base plate in a light colour, big enough for the quiet zone.
- Raise only the dark modules one to a few layers above the base. Many QR generators (for example QRJiffy’s link QR code generator, made by our publisher, DPR Software Labs) export an SVG that you can import and extrude in your slicer or CAD tool.
- Add a filament change at the first layer where the raised squares begin.
In PrusaSlicer, Prusa’s knowledge base says to slice, drag the layer slider to the target layer and click the orange plus icon. The printer pauses and prompts you to swap filament; Prusa recommends filaments of the same type. Other slicers have similar options. A multi-colour printer can simply assign base and squares to different filaments.
Colour choices
- Use dark squares on a light background. Our QR code colours guide explains why inverted codes are riskier.
- Avoid shiny or silk filament for the squares: glare washes out contrast.
- A matte top surface usually scans better than a glossy one.
Step 5: Print a test tile first
Print the code alone as a small tile at the final size.
- Scan it with an iPhone and an Android phone, in the light where it will live.
- Scan from the real distance. Our QR code size guide covers this.
- If it fails, check the three large corner squares. If they’re rounded or merged, make the modules bigger or use a smaller nozzle.
If you still have trouble, see our QR code not scanning checklist.
Embedded and engraved codes
Sinking the squares into the surface or printing face-down on a textured bed can work, but still needs colour or strong shadow for contrast. The same three rules hold: big squares, a clean quiet zone and plenty of contrast.
Frequently asked questions
- Can a phone scan a single-colour 3D printed QR code?
- Sometimes, but it's unreliable. With one colour, the squares only show up as shadows from raised edges, so scanning depends on the lighting angle. Two contrasting colours work far better.
- How do I 3D print a Wi-Fi QR code?
- Generate a Wi-Fi QR code (it holds your network name, security type and password as text), export it as an SVG or a 3D model, and print it the same way as any other code. Our Wi-Fi QR code guide explains the format and the security trade-offs of displaying it.
- What size should a 3D printed QR code be?
- It depends on your nozzle and how much data the code holds. As a rule of thumb, aim for each square to be at least three to four nozzle widths across, which for a common 0.4 mm nozzle means squares of roughly 1.2 to 1.6 mm or more. Test before printing large parts.
- Which error correction level should I use?
- A higher level such as Q or H helps the code survive small print defects, at the cost of more squares. DENSO WAVE suggests Q or H where codes may get dirty or damaged; test whether your printer copes with the extra density.


