A 3D printed QR code is a physical object you can hold in your hand, mount on a wall, or attach to a keychain. Unlike a printed sticker that fades or peels, a 3D printed code is solid plastic (or resin) that lasts for years. The modules -- the small dark squares that form the QR pattern -- are either raised above or recessed into a flat base, creating enough contrast for a phone camera to read them reliably.
People 3D print QR codes for all kinds of reasons: custom keychains, fridge magnets, desk nameplates, permanent business signage, product prototypes, art installations, unique gifts, and trade show displays. If you own a 3D printer, this is one of those projects that is genuinely useful and takes less than an hour from start to finish.
Two Approaches: Raised vs. Recessed
There are two ways to model a QR code for 3D printing, and the one you pick affects how you handle contrast and color.
Raised QR (Modules Extruded Up)
This is the more common approach. You start with a flat rectangular base, and the QR modules stick up from the surface by 1-2mm. Think of it like Braille, but with square dots. The height difference between the base and the modules creates a shadow that helps with scanning, and if you print the base and modules in different colors, you get crisp contrast without any post-processing. Most 3D printed QR codes you see online use this method.
Recessed QR (Modules Cut Into Surface)
The opposite approach: the modules are indented into a flat surface. The base is the full height, and the QR pattern is carved down into it. This gives you a smooth top surface with the pattern visible as shallow grooves. To make the code scannable, you need contrast -- either fill the recessed areas with paint, epoxy, or a contrasting material, or print the entire piece in a dark color and paint the raised surface white. Recessed codes look clean and professional, but they require more post-processing work. They are a good choice for QR code stencils where you want to paint through the openings.
Step-by-Step: 3D Print a Raised QR Code
Here is the full workflow from generating the QR code to pulling the finished print off the bed.
Step 1: Generate Your QR Code
Open the free URL QR code generator or the text QR code generator depending on what you want to encode. The single most important rule for 3D printing: keep the data short. Every character you add increases the number of modules in the QR pattern, and more modules means each one gets smaller. A 150-character URL produces a code with tiny modules that are nearly impossible to print on an FDM printer.
Use a URL shortener if your link is long. A 30-character shortened URL produces a manageable QR code with modules large enough to print cleanly. Set the error correction level to High (H) -- this makes the code more tolerant of the slight imperfections that are inevitable in 3D printing. Download the QR code as SVG. You need the vector format for importing into CAD software.
Step 2: Import SVG into Tinkercad
Tinkercad is free, runs entirely in your browser, and handles SVG imports well. It is the fastest path from QR code to printable STL.
- Open Tinkercad, create a new design, and click Import in the top right.
- Upload your SVG file. Tinkercad automatically extrudes it into a 3D shape -- the modules become solid blocks.
- Set the height (Z dimension) of the extruded QR code to 1-2mm. This is just the module height, not the total piece.
- Create a separate rectangular base using the Box tool. Make it slightly larger than the QR code footprint (1-2mm border on each side). Set the base height to 2-3mm.
- Align the QR code on top of the base using Tinkercad's Align tool (select both objects, then click Align).
- Group everything together (select all, then click Group or press Ctrl+G).
- Export as STL.
Step 3: Alternative CAD Tools
Tinkercad is the quick option, but if you want more control over dimensions, fillets, or mounting holes, use Fusion 360 (free for personal use) or OpenSCAD (free, open source, script-based). OpenSCAD is particularly good for parametric QR code models where you want to adjust size, height, and border programmatically. There are also OpenSCAD libraries specifically for generating QR codes from text input, which skip the SVG step entirely.
Step 4: Slice and Print
Open your STL in your slicer (PrusaSlicer, Cura, Bambu Studio, OrcaSlicer). Orient the model flat on the bed -- QR modules facing up. Use the print settings covered in the sections below. Export the G-code and print.
Two-Color Printing for Better Contrast
A single-color 3D printed QR code can work if the lighting is right, but two-color prints are far more reliable. The scanner needs a clear difference between the modules and the background, and color is the most dependable way to achieve that.
You have two options for two-color printing:
Filament Swap at Layer Change
This is the simplest method and works on any single-extruder printer. Print the base in white filament. When the base layers are done and the QR modules are about to start, pause the print and swap to black filament. In PrusaSlicer, use the layer slider on the right side of the preview to add a color change at the exact layer. In Cura, use the "Pause at Height" or "Filament Change" post-processing script. The printer pauses, you pull out the white filament, load black, and resume. The result is a white base with black QR modules -- perfect contrast.
Multi-Material Printing
If you have a multi-material setup -- Bambu Lab AMS, Prusa MMU3, or a dual-extruder machine -- you can assign different colors to the base and the QR modules in the slicer without any manual intervention. Paint the QR module faces in the slicer's multi-material view, assign white to the base body and black to the modules, and print. No pausing, no babysitting.
Sizing and Module Dimensions
Size is where most first attempts fail. If the QR code is too small, the modules blur together and the code will not scan.
- Minimum total size for FDM: 40mm x 40mm. You can go smaller, but scanning reliability drops sharply below this.
- Minimum module width for FDM: 1.5mm. A standard 0.4mm nozzle needs at least 3-4 perimeter lines to form a clean square module. Below 1.5mm, modules start merging or missing entirely.
- Resin printers (SLA/MSLA): Can print much finer detail. Module widths down to 0.5mm are feasible, meaning you can make QR codes as small as 15-20mm and still have them scan.
- Module height: 1-2mm above the base. Taller modules create deeper shadows, which can actually interfere with scanning under certain lighting. Keep it subtle.
To figure out your module size before printing: count the modules across one row of your QR code (including the quiet zone), then divide your intended print width by that number. If the result is below 1.5mm for FDM, either make the print larger or shorten your data to reduce the module count.
Material Recommendations
- PLA: The default choice. Easy to print, good surface quality, holds fine detail well. Fine for indoor use -- desk signs, keychains you keep in a pocket, fridge magnets, gifts. PLA degrades in direct sunlight and softens above 60C, so do not use it for outdoor signage.
- PETG: Stronger and more heat-resistant than PLA. Good for items that might sit in a hot car or near a window. Slightly stringier to print, which can affect module edges, but manageable with proper retraction settings.
- ASA: UV-resistant and weather-resistant. The right choice for permanent outdoor signage -- laser-engraved materials aside, ASA is the best plastic option for QR codes exposed to the elements. Needs an enclosure to print well (warps in drafts).
- Resin (SLA): Produces the sharpest module edges and finest detail. Ideal for small QR codes (keychains, jewelry, miniature signs). Standard resin is brittle, so use tough or flexible resin for items that need to survive drops.
Print Settings That Matter
You do not need exotic settings to 3D print a QR code, but a few tweaks make a noticeable difference in scannability.
- Layer height: 0.12-0.16mm. Lower layer heights produce cleaner vertical edges on the modules. The sharp transition between base and module is what the scanner reads. Standard 0.2mm layers work but produce visibly stepped edges that scatter light differently. If you are in a hurry, 0.2mm is fine -- just test the code before committing to a batch.
- Infill: 100% for thin pieces. A 2-3mm base with 1-2mm modules is thin enough that infill patterns can telegraph through the top surface, creating visual noise. Use 100% infill or at least 6-8 top layers to ensure a perfectly flat surface.
- Speed: moderate. Printing too fast causes ringing artifacts on the sharp corners of QR modules. Stick to your printer's recommended detail/quality speed profile.
- First layer: dial it in. A warped or uneven first layer tilts the entire QR code, which can throw off scanning at oblique angles. Make sure your bed is level and your first layer squish is correct.
Contrast Is Everything
A QR scanner is essentially a camera looking for a pattern of dark and light squares. If the contrast between modules and background is weak, the scan fails. This matters more for 3D printed codes than for paper ones because plastic surfaces reflect light differently depending on angle and finish.
- Best combination: white base + black modules. This matches what QR scanners are optimized for.
- Also works: any light base + any dark modules. Light blue + navy, light gray + dark gray, beige + dark brown. Just avoid low-contrast pairings like light gray + white or dark blue + black.
- Avoid glossy filament. Silk PLA and glossy finishes create specular reflections that wash out the pattern under direct light. Matte or satin finishes scan more reliably across different lighting conditions.
- Post-print painting: if you printed in a single color, you can paint either the modules or the base to add contrast. Use a fine brush or a small roller. For recessed QR codes, fill the recesses with acrylic paint, let it dry, then sand the top surface flush. The paint stays in the grooves, the base surface stays clean.
Testing Your 3D Printed QR Code
Always scan your 3D printed QR code before you give it away, install it, or print a batch of them.
- Test with at least two phones. Use both an iPhone and an Android device. Camera apps and QR scanning algorithms vary between manufacturers.
- Test under different lighting. A code that scans perfectly under your desk lamp might fail in bright sunlight due to glare, or in dim indoor lighting due to low contrast. Tilt the printed code at different angles while scanning to see how it behaves.
- Test at the intended distance. If this is a sign that people will scan from a meter away, step back a meter and try it. Codes that scan at 10cm might not resolve at 100cm, especially if the modules are small.
Common Pitfalls and How to Avoid Them
- Data too long. This is the number one mistake. Long URLs, full vCard data, or large text blocks produce QR codes with dozens of modules per row. Those modules become too small to print cleanly on an FDM printer. Solution: use a URL shortener, link to a webpage instead of encoding raw data, or generate a URL QR code pointing to a hosted page with all the details.
- Warping on edges. If the corners of your base lift off the bed, the finder patterns (the three large squares in the corners of every QR code) get distorted. Finder patterns are the first thing a scanner looks for -- if they are warped, the scan fails before it even reads the data modules. Use a brim, increase bed temperature slightly, or print with an enclosure.
- Modules fused together. When modules are too small or layer height is too coarse, adjacent modules merge into blobs. The scanner cannot distinguish individual modules and the code becomes unreadable. Scale up or shorten your data.
- Wrong orientation. QR codes do not have a strict "up" direction for scanning, but if you mount the printed code at an extreme angle (nearly parallel to the wall, for example), the phone camera picks up foreshortening that can prevent scanning. Mount it roughly perpendicular to where people will stand when scanning.
- Forgetting the quiet zone. The border of empty space around a QR code (called the quiet zone) is required for reliable scanning. Make sure your base extends at least 2-3mm beyond the QR pattern on all sides. Do not let the modules run right to the edge.
Start Your 3D Printed QR Code
The workflow is simple once you have done it once:
- Generate a QR code with short data and High error correction using the free QR code generator. Download as SVG.
- Import the SVG into Tinkercad, set module height to 1-2mm, add a 2-3mm base, export STL.
- Slice with a 0.12-0.16mm layer height. Add a filament swap at the base-to-module transition for two-color printing.
- Print, test with two phones, and you are done.
The entire process -- QR generation, CAD modeling, slicing, and printing -- takes under an hour for a standard-sized code. The result is a physical QR code that won't fade, peel, or smudge, and looks far more intentional than a paper printout taped to a surface.
If you need your QR code to be updatable after printing -- changing the destination URL without reprinting the physical piece -- you need a dynamic QR code. ElkQR's dynamic QR codes use a redirect URL that you can change anytime. Print the 3D code once, update where it points as often as you want. That is especially valuable for 3D printed signage where reprinting means another hour of machine time and filament.