How-to guides
How to 3D print a QR code
Print the code in two colours — a light base with dark raised modules via a filament swap or multi-material setup — with modules at least 2 mm square and matt filament. Single-colour relief codes rely on shadows and scan unreliably. Extrude the SVG about 1 mm and scan a test piece first.
Colour first, geometry second
A scanner needs luminance contrast, and a single-colour print has none — a raised-module relief code in one filament depends entirely on shadows, which means it scans under a desk lamp at the right angle and fails in diffuse light. It can work as an art piece; it is not a reliable code.
The reliable approaches, ranked:
- Filament swap at a layer height (any single-extruder printer). Print a light base, pause at the layer where the modules begin, swap to dark filament, finish. Every mainstream slicer supports a colour-change pause at a given layer. Result: dark modules on a light field — correct polarity, real contrast.
- Multi-material printing (AMS/MMU/toolchanger). Same result without the manual swap, and the module layer can be flush rather than raised.
- Single-colour relief — only with strong, raking light. Treat it as decorative.
Dark base with light modules is an inverted code — avoid it for the same reasons as in any medium (inverted codes).
The numbers
- Module size ≥ 2 mm. With a 0.4 mm nozzle that is five extrusion widths per module — enough for clean square corners. Below 2 mm, corners round and edges wander. A version 3 code (29 modules) at 2 mm modules is ~58 mm wide plus quiet zone — size your plaque accordingly, and keep the payload short to keep the version down.
- Module height 0.6–1.2 mm raised (3–6 layers at 0.2 mm). Enough to be robust, shallow enough not to shadow itself.
- Matt filament. Matte PLA or similar; silk and glossy filaments produce specular highlights that read as false light modules. Avoid translucents entirely — light bleeds through thin dark layers, so give dark modules at least 3 layers.
- Print the code face up on the bed's XY plane — the top surface carries the detail. Printing face-down onto textured build plates also works and gives a flat flush finish; smooth PEI yields the cleanest face-down result.
From code to geometry
Export the SVG and extrude it. In OpenSCAD it is one line:
linear_extrude(height = 1.0) import("qr.svg");
Union that onto a base plate and you have the two-body model for a colour change. Tinkercad and Fusion 360 import SVG the same way (the code is plain filled paths — see SVG path structure). Alternatively, skip CAD: several slicers can emboss an imported SVG directly onto a solid.
Good payloads for a printed object
A 3D-printed code is permanent hardware, so encode things that stay true: a WiFi code for a guest-network plaque, a short URL on a domain you control for equipment or 3D-printed signage, a plain-text label for an asset tag. Skip anything you might need to change next quarter — reprinting plastic is cheap, but re-installing fifty mounted plaques is not.
Test before you print ten
Print one at draft settings, then scan it with the scanner in diffuse room light, low light and sunlight, square-on and at 30°. If it only scans with a torch raking across it, your contrast is shadow-based — go two-colour or increase the module height difference. The general routine is in testing before printing.
FAQ
Can you 3D print a working QR code?
Yes, reliably, if it is two colours — dark modules on a light base via a filament swap or multi-material print. Single-colour relief codes depend on shadows and fail in ordinary lighting.
What is the minimum module size for a 3D printed QR code?
About 2 mm square — five extrusion widths with a 0.4 mm nozzle. Combined with a short payload, that keeps a version 3 code around 6 cm wide, a sensible plaque size.
How do I turn a QR code into an STL?
Download the SVG and extrude it in CAD — OpenSCAD's linear_extrude on the imported SVG is one line — then union it onto a base plate. Slicers with SVG embossing can skip CAD entirely.
Which filament works best for QR codes?
Matt, opaque filaments in high-contrast pairs — matte black modules on white or natural base. Silk and glossy filaments create glare that reads as false modules, and translucents let light bleed through.
Try it — free, no signup
Related
- How to engrave a QR code — Engraving has no ink — contrast comes from oxide, dye removal or shadow. Pick the right process per material, invert artwork on dark anodise, test one first.
- How to make a QR code as an SVG — Choose SVG at download or add format=svg to the API URL. A vector QR code scales to any size with perfectly sharp modules and weighs a few kilobytes.
- QR code SVG path structure — How a module matrix becomes SVG — one merged path versus thousands of rects, crisp-edges rendering, integer coordinates, and why seams appear.
- How to test a QR code before printing — Verify it decodes, check the payload character by character, print at final size, scan with old phones in bad light, and probe the damage margin. A checklist.