Converting an SVG to STL for 3D Printing
Convert 2D SVG to 3D STL by extruding closed paths. Prepare the SVG: convert text to paths, close all paths, simplify nodes, merge overlapping shapes. Use Blender for control, Tinkercad for speed, OpenSCAD for batch processing. Check STL in slicer for non-manifold errors before printing.
November 5, 2026 · 7 min read
Converting a 2D SVG logo or design into a 3D printable STL mesh requires extrusion — pulling the flat vector paths into the third dimension by a specified height. The process is conceptually simple, but the execution depends on which tool you use, whether your SVG has open paths or overlapping shapes, and how you intend to handle details smaller than your printer's nozzle diameter. A conversion that works perfectly in Blender may fail in OpenSCAD, and a file that previews correctly in Tinkercad may slice with errors in PrusaSlicer.
This guide explains the SVG-to-STL pipeline, shows how to prepare SVG files for clean extrusion, and compares the three most reliable tools: Blender, Tinkercad, and OpenSCAD.
Understanding the Conversion Process
SVG describes 2D vector paths — Bézier curves, lines, arcs — with no concept of depth. STL describes 3D triangle meshes with vertices, edges, and faces. To convert between them, a tool must:
- Parse the SVG and extract closed paths (open paths cannot become solid meshes).
- Triangulate each closed path into a 2D face.
- Extrude the face along the Z-axis by a user-specified height.
- Generate side walls connecting the top and bottom faces.
- Export the resulting mesh as STL.
Each tool handles step 1 differently. Blender imports SVG directly as curve objects. Tinkercad rasterizes the SVG first, then traces it. OpenSCAD requires you to convert SVG to a specific path format manually. The tool you choose depends on how clean your SVG is and how much control you need over the output.
Preparing the SVG for Extrusion
Before converting, clean the SVG to remove features that break extrusion: open paths, text, raster images, and overlapping shapes with ambiguous boolean intent.
Convert Text to Paths
Text in SVG is stored as <text> elements with font references, not outlines. Most 3D tools cannot extrude text directly. In Inkscape or Illustrator, select all text and choose Path → Object to Path (Inkscape) or Type → Create Outlines (Illustrator). This converts each character into vector outlines.
Close All Paths
Open paths (lines, arcs that do not form closed loops) cannot extrude into solid meshes. In Inkscape, select all paths and choose Path → Close Path. Open the XML editor (Edit → XML Editor) and check that every <path> element ends with a Z or z command (which closes the path). If not, manually close the path by connecting endpoints or delete the open path if it is decorative.
Simplify Complex Paths
SVG paths with thousands of nodes produce STL meshes with millions of triangles, which slow slicing and increase file size. Simplify paths before conversion: select all, choose Path → Simplify (Ctrl+L in Inkscape), and run it twice. This reduces node count by 30–50% with minimal visual change. For logos and icons, set a low smoothing threshold to preserve sharp corners.
Merge Overlapping Shapes
If your SVG has overlapping shapes (e.g., a logo with a letter inside a circle), decide whether the overlap is a union (merge) or a subtraction (cut). In Inkscape, select the shapes and use Path → Union, Difference, or Exclusion to resolve ambiguity. This prevents the 3D tool from extruding both shapes independently, which creates non-manifold geometry that slicers cannot handle.
| SVG Feature | Effect on STL Conversion | Fix |
|---|---|---|
| Text elements | Ignored or rasterized | Convert to paths (Object to Path / Create Outlines) |
| Open paths | Fail to extrude or produce gaps | Close Path in Inkscape, verify Z command in XML |
| Overlapping shapes | Non-manifold mesh, slicer errors | Use Union, Difference, or Exclusion to resolve |
| Excessive nodes | Bloated STL, slow slicing | Path → Simplify (Ctrl+L) before conversion |
| Raster images | Ignored | Remove or trace with Trace Bitmap first |
Method 1: Blender (Best Control, Steeper Learning Curve)
Blender imports SVG as curve objects and offers precise control over extrusion depth, beveling, and mesh topology. It is the best choice for complex logos with fine details or for models where you need to adjust geometry after extrusion.
Importing SVG into Blender
Open Blender and delete the default cube (select it, press X, confirm). Go to File → Import → Scalable Vector Graphics (.svg) and select your file. Blender imports the SVG as curve objects in the 3D viewport. If the import scale is wrong, select all curves (A), press S to scale, and type a numeric factor (e.g., 0.1 for 10% size).
Extruding Curves
Select a curve object (click it in the viewport or outliner). In the Properties panel, open the Curve Properties tab (icon: Bézier curve). Under Geometry, set Extrude to the desired height (e.g., 5.0 for 5 mm). The curve becomes a 3D mesh in the viewport. Adjust the extrusion value until the depth looks correct.
For beveled edges, set Bevel → Depth to 0.1–0.5. This rounds the top edges, which improves printability by preventing sharp overhangs. Set Resolution to 3–6 for smooth bevels.
Converting Curves to Mesh and Exporting
With the curve selected, press Alt+C (or Object → Convert To → Mesh). Blender converts the curve into a triangle mesh. Repeat for all curve objects. Select all meshes (A), then Object → Join (Ctrl+J) to merge them into one object.
Export to STL: File → Export → STL. In the export dialog, enable Selection Only if you merged everything, set Scale to 1.0, and choose Binary format. Save the file. Open it in your slicer to verify the mesh is manifold and the size is correct.
Method 2: Tinkercad (Easiest, Limited Control)
Tinkercad is a browser-based CAD tool that imports SVG and extrudes it with one button click. It is the fastest method for simple logos and icons, but it rasterizes the SVG before tracing, which introduces stair-stepping on curves.
Importing SVG into Tinkercad
Open Tinkercad and sign in (free account required). Create a new design. Click Import in the top-right and select your SVG. Set the import scale (mm or inches) and height. Tinkercad traces the SVG and drops the extruded shape onto the workplane.
The trace quality depends on the SVG complexity. Simple shapes (logos, text, icons) work well. Intricate details (filigree, hairlines) may vanish or become blocky.
Adjusting and Exporting
Select the imported shape and adjust its height in the properties panel (right side). Use the Align tool to center it on the workplane if needed. Once satisfied, click Export → .STL in the top-right. Download the file and open it in your slicer.
Tinkercad STLs are typically larger (more triangles) than Blender or OpenSCAD exports because Tinkercad does not optimize mesh topology. For small prints (keychains, badges), this is acceptable. For large models, use Blender for leaner meshes.
Method 3: OpenSCAD (Scriptable, Best for Automation)
OpenSCAD reads SVG via the linear_extrude() function, but only for SVG files with clean path syntax. It is the best choice for batch processing or parametric designs where you want to extrude the same SVG at multiple heights.
Preparing SVG for OpenSCAD
OpenSCAD requires SVG paths in absolute coordinates with no transforms. Export your SVG from Inkscape as Plain SVG (not Inkscape SVG) with Path → Object to Path and Path → Simplify applied. Open the SVG in a text editor and verify that <path> elements have a d attribute with commands like M, L, C, Z. If you see transform= attributes, remove them or apply them manually.
Writing the OpenSCAD Script
Create a new OpenSCAD file (.scad) and write:
linear_extrude(height=5) import("logo.svg");
Replace 5 with your desired height in millimeters and "logo.svg" with the path to your SVG file (relative or absolute). Press F5 to preview or F6 to render. If the preview is empty, check the console for errors — usually "path not found" or "invalid SVG syntax."
Exporting STL from OpenSCAD
Once the render finishes, go to File → Export → Export as STL. OpenSCAD writes a binary STL. Open it in your slicer to verify size and geometry.
For batch processing, write a shell script that generates multiple STLs at different heights:
for h in 3 5 10; do echo "linear_extrude(height=$h) import(\"logo.svg\");" | openscad -o logo_${h}mm.stl /dev/stdin; done
Fixing Common Conversion Failures
Three problems appear frequently: non-manifold geometry, inverted normals, and incorrect scale.
Non-Manifold Geometry (Slicer Errors)
Non-manifold meshes have edges shared by more than two faces, or faces with holes. Slicers cannot process them. The cause is usually overlapping shapes in the SVG that were not merged. Open the STL in Blender, enter Edit mode (Tab), select all (A), and run Mesh → Clean Up → Merge by Distance. Set the threshold to 0.001 and click OK. Then run Mesh → Normals → Recalculate Outside. Re-export the STL.
Inverted Normals (Inside-Out Mesh)
If your model slices with walls missing or the interior filled, the normals are inverted. In Blender, select the mesh, enter Edit mode (Tab), select all (A), and choose Mesh → Normals → Recalculate Outside (Shift+N). Re-export.
Incorrect Scale
If the STL imports into the slicer at 0.1 mm or 10 meters instead of 100 mm, the units are wrong. SVG uses user units (typically pixels or points), not millimeters. In Blender, scale the object before exporting: select it, press S, type the scale factor (e.g., 0.1 or 10), and press Enter. In OpenSCAD, multiply the extrude height by the scale factor: linear_extrude(height=5*0.1).
Best Practices for SVG-to-STL
- Always convert text to paths before extrusion.
- Close all open paths and simplify complex geometry.
- Merge overlapping shapes with Union or Difference to avoid non-manifold errors.
- Set extrusion height to at least 2× your nozzle diameter (e.g., 0.8 mm for a 0.4 mm nozzle) for structural strength.
- Check the STL in a slicer before printing — preview mode shows non-manifold errors as red regions.
Frequently asked questions
Can I convert any SVG to STL for 3D printing?
Only SVG files with closed paths can extrude into solid meshes. Text, open paths, and raster images must be converted or removed first. In Inkscape, convert text to paths (Path → Object to Path) and close all paths (Path → Close Path) before converting to STL.
What is the easiest way to convert SVG to STL?
Tinkercad. Upload your SVG at tinkercad.com, set height and scale, and export as STL. It works well for simple logos and icons. For complex designs with fine details, use Blender for better control over extrusion depth and mesh topology.
Why does my STL have holes or slicer errors?
The SVG had overlapping shapes that were not merged, producing non-manifold geometry. Open the STL in Blender, enter Edit mode (Tab), select all, run Mesh → Clean Up → Merge by Distance (threshold 0.001), then Mesh → Normals → Recalculate Outside. Re-export.
How do I set the correct size when converting SVG to STL?
SVG uses user units (pixels/points), not millimeters. In Blender, scale the object before export: select it, press S, type the scale factor (e.g., 0.1 or 10). In OpenSCAD, multiply the extrude height by the scale factor. Check the size in your slicer after conversion.
Can I batch-convert multiple SVGs to STL?
Yes, with OpenSCAD. Write a script: <code>for f in *.svg; do echo "linear_extrude(height=5) import(\"$f\");" | openscad -o "${f%.svg}.stl" /dev/stdin; done</code> to extrude all SVGs in a directory at 5 mm height.
Sources
Convert files for this workflow
Try it on your own file
Drop in an image or an SVG and see the result before you pay. No signup is required to preview.