SVG to OBJ converter
Choose an SVG, set a size and a thickness, and download a Wavefront OBJ: the filled shapes raised into a closed 3D model for Blender, game engines and other 3D programs.
Free, no account. The file is read by code running in your browser. It is not uploaded, and nothing about it is stored.
How to convert an SVG to OBJ
- Pick the SVG you want as a model, drop it on the box, or paste its code.
- Choose a thickness, the unit your 3D program works in and which way is up. The page starts at 3 mm thick, in millimetres, with z up, and the file can be downloaded at any point.
- Drag “Turn the view” to look at the model from every side, and read the counts under it.
- Download the OBJ and import it. In Blender that is File, Import, Wavefront (.obj).
What the 3D model is
The model is an extrusion. Each filled shape of the SVG is pushed straight out from a flat back to a flat front, the thickness apart, with walls at right angles between them. Shapes that overlap are joined into one piece before that, so the mesh never has one solid buried inside another. A hole in the drawing, such as the inside of a letter A or a ring drawn with the even-odd rule, is a hole right through the model.
Only the outline of each fill matters. Colour, opacity and gradients do not change the shape, and a white shape is raised like any other, so take a background rectangle out of the SVG before you convert it, or the model will be one flat box. Lines have no area and are skipped unless you choose “Shapes and lines”, which turns each stroke into a band as wide as the stroke is drawn, with its own corners and line ends.
What the OBJ file holds
An OBJ is a text file with one thing on each line. A line that starts v is a corner and its three coordinates. A line that starts vn is a direction a face looks in. A line that starts f is a face, naming its corners by their number in the list, counted from 1. Here every face is a triangle, with its corners in anticlockwise order seen from outside, which is how 3D programs tell the outside of a model from the inside.
Each corner is listed once and shared by all the faces that meet there, so the file itself records which faces are joined. A program does not have to weld them back together, as it must with an STL. The faces are flat (s off): the front, the back and each wall has a normal of its own, so the rim stays a sharp edge when the model is shaded.
The page tests the finished mesh and says whether it is closed, meaning that each edge belongs to exactly two faces. A circle 50 mm across at the default curve tolerance of 0.05 mm becomes a prism of 56 sides: 112 corners, 220 triangles and 58 normals, in a file of about 8 KB. A smaller tolerance gives rounder curves and more faces. At 0.5 mm the same circle has 16 sides and 60 triangles.
Units, and which way is up
The OBJ format has no way to say what its numbers measure, and no fixed idea of up. Each program makes its own assumption, so both are choices here.
Units. The numbers are millimetres unless you change the unit. Blender reads one unit as one metre, so a drawing 100 mm wide written in millimetres arrives 100 metres wide. Choose Metres here and the same width is written as 0.1, or leave the file alone and type 0.001 in the Scale box of Blender’s import window.
Up. As written, the drawing lies in x and y, and the thickness runs along z from 0 to the thickness. In a program that takes z as up, as slicers for 3D printing do, the model lies flat on the bed. Blender’s OBJ import (unless you change its Up setting), Unity and three.js take y as up, and there the same file stands upright like a sign, facing the front. Choose “Y up” and the thickness runs along y instead, with x and z equal to x and y on the SVG’s page, measured from its top left corner.
What is not in the file
- Colour and materials. There is no
.mtlfile and nousemtlline, so the model arrives in your program’s default material, whatever colours the SVG had. - Texture coordinates. No
vtlines are written. Unwrap the model in your 3D program if you want to paint or texture it. - Depth that varies. One thickness applies to the whole drawing. There are no bevels, no rounded edges and no separate depths for separate colours.
- Quads. All faces are triangles, the walls included. In Blender, Tris to Quads joins the wall triangles back into rectangles.
- Separate objects. All the pieces are written as one object named after your file. In Blender, Separate, By Loose Parts splits them.
- Text, pictures, clip paths and masks. Text has to be converted to paths before it can be raised. Embedded pictures are skipped, and a clipped or masked shape is raised as if it were whole.
Questions
Why is my model enormous in Blender?
Blender takes one unit of an OBJ as one metre, and this file is in millimetres unless you chose otherwise. Set the unit to metres before you download, or set Scale to 0.001 when you import.
Why does the model stand on its edge when I import it?
The program reads y as up and the file was written with z up. Choose “Y up” and download again, or set the import window’s Up axis to Z and its Forward axis to Y.
Does the OBJ keep the colours of my SVG?
No. It holds the shape only: corners, faces and normals. Give the model a material in your 3D program.
Can I 3D print the OBJ?
Most slicers open OBJ files, and the page tells you whether the mesh is closed, which a print needs. If your slicer or print service asks for an STL, the SVG to STL page makes the same solid in that format.
What is the difference between OBJ and STL?
Both describe a surface made of triangles. A binary STL repeats the three corners of every triangle, 50 bytes a triangle, and holds nothing else. An OBJ lists each corner once and has room for normals, texture coordinates, materials and names, which makes it the usual choice for moving a model between 3D programs.