How to 3D Print a QR Code: Step-by-Step Guide (2026)

Published Feb 22, 2026 9 min read
3D printed QR code cross-section showing light base layer and raised dark modules, with recommended print settings

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.

  1. Open Tinkercad, create a new design, and click Import in the top right.
  2. Upload your SVG file. Tinkercad automatically extrudes it into a 3D shape -- the modules become solid blocks.
  3. Set the height (Z dimension) of the extruded QR code to 1-2mm. This is just the module height, not the total piece.
  4. 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.
  5. Align the QR code on top of the base using Tinkercad's Align tool (select both objects, then click Align).
  6. Group everything together (select all, then click Group or press Ctrl+G).
  7. 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.

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

You do not need exotic settings to 3D print a QR code, but a few tweaks make a noticeable difference in scannability.

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.

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.

Common Pitfalls and How to Avoid Them

Start Your 3D Printed QR Code

The workflow is simple once you have done it once:

  1. Generate a QR code with short data and High error correction using the free QR code generator. Download as SVG.
  2. Import the SVG into Tinkercad, set module height to 1-2mm, add a 2-3mm base, export STL.
  3. Slice with a 0.12-0.16mm layer height. Add a filament swap at the base-to-module transition for two-color printing.
  4. 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.

Need Scan Tracking & Analytics?

Upgrade to ElkQR for dynamic QR codes with real-time scan tracking, geographic analytics, device insights, and more.

Start 7-Day Free Trial

Plans start at $19/month • 7-day free trial