How to create a QR code to 3D print
From the link to the file ready for your slicer, with the mistakes that keep a printed QR code from scanning.
2026-09-01 · 8 min read
Creating a QR code for a screen is trivial. Creating one that works printed in plastic, under a store's lighting, and read by whatever phone camera happens to be around, requires paying attention to four things no conventional generator tells you about. This guide covers them in order.
1. Start with the content, not the design
The length of the text you store determines the code's module count, and that count determines the piece's minimum physical size. A 25-character link generates a 25x25-module code; a 120-character one with tracking parameters can climb to 45x45. At the same piece size, the second code's modules are half as big, and the code goes from always reading to reading only sometimes.
- Strip campaign and tracking parameters from the link.
- Prefer
yoursite.com/menuoveryoursite.com/en/restaurant/digital-menu-2026?utm_source=qr. - If you can't shorten it yourself, use a link shortener, but check the service won't expire.
- For WiFi, a reasonable network name and password keep the code small.
2. Pick the error-correction level deliberately
The error-correction level determines how much of the code can be damaged or covered without it failing to read. There are four levels: L (7%), M (15%), Q (25%) and H (30%). Each step up adds modules, and more modules means smaller modules.
| Level | Tolerance | When to use it |
|---|---|---|
| L | 7% | Almost never for printing |
| M | 15% | Default, with no logo |
| Q | 25% | Dirty or worn environments |
| H | 30% | Mandatory if there's a logo or emoji in the center |
The practical rule: no logo, use M. With a logo, use H (this tool switches to it automatically once you add one).
3. Contrast is about color, not relief
This is the point that trips up most of the 3D-printed QR codes floating around online. A single-color piece with the code in relief depends entirely on shadow, and shadow depends on where the light is. Under a diffuse ceiling light or evening light, that code simply disappears for the camera.
What makes a printed code reliable is printing it in a color different from the base, with a contrast ratio of at least 3:1 (ideally 5:1 or more). You can get there with a multi-material printer or, much cheaper, with a filament-change pause at the base's height.
4. Module size rules everything
With a standard 0.4 mm nozzle, a module needs at least 1.5 mm a side to keep its corners. Below that, the nozzle rounds them off and neighboring modules touch. The formula is simple:
module size = code side / number of modules
In other words, a 33x33-module code on a plaque whose code area measures 60 mm gives 1.8 mm modules: correct. The same code on a 35 mm keychain gives 1.06 mm: it won't read. This tool shows that figure live and warns you when it drops below the threshold.
5. Export in the right format
STL doesn't store color. If you export as STL you'll have to import two pieces and assign material by hand. 3MF does store color and piece structure, and every modern slicer opens it. Unless you're using very old software, 3MF is the right choice.
Checklist before printing
- The link is final and won't change.
- The module measures 1.5 mm or more.
- The two colors have real contrast (light / dark).
- There's free margin around the code, at least two modules.
- You've scanned the on-screen preview with your phone.
- You've printed a test unit before the full batch.
Try it now
Generate your code and its 3D object in under a minute, no sign-up required.
Open the 3D QR generator