DXF to STL Converter

Turn a flat DXF drawing into a 3D-printable STL, right in your browser. A DXF from a CAD, laser or sign program is usually 2D, so the converter raises every closed shape to the height you choose: closed polylines, circles, closed ellipses and splines, and lines and arcs whose ends meet. Shapes inside other shapes become holes, so a washer stays a washer; choose All solid to fill them instead. Lines whose ends do not meet are listed with their layer and where they start and end, rather than being closed by guesswork. The size comes from the units stored in the DXF ($INSUNITS), so the STL is in millimetres; you can pick the units if the file has none. Turn layers on and off, check the 3D view, size and volume, then download a binary or ASCII STL. Nothing is uploaded.

100% private — everything runs in your browser. Everything runs in your browser; your files are never uploaded.

100% private — runs in your browser
Drop a DXF file here or click to chooseASCII DXF from any CAD, laser or drawing program.

Shape

File

Runs in your browser: the DXF is read and turned into an STL by our own code, with no upload and nothing saved. You may use what you make here, including commercially, with no credit needed. The rights in your own drawings and models stay as they were. Not affiliated with Autodesk.

How to convert a DXF to STL

  1. Drop a DXF on the box, or click Try a sample.
  2. Enter the height (thickness) in millimetres.
  3. Check the 3D view, size and volume. Turn layers off, or change DXF units if the size looks wrong.
  4. If open lines are listed, close them in your CAD program or leave them out. Then download the STL.

What you can use it for

  • 3D print a part, bracket or spacer drawn as a 2D profile
  • Turn a laser-cut or CNC outline into a printable plate
  • Make a sign, badge or nameplate base from a DXF outline
  • Print a gasket, washer or shim with its holes
  • Check a DXF drawing in 3D before cutting it
  • Give a flat logo outline some thickness for a model

What becomes solid

In the DXFIn the STL
Closed polyline (LWPOLYLINE or POLYLINE, closed flag set), incl. curved segments (bulges)Raised to the height you choose
CIRCLE, a full ELLIPSE, a closed SPLINE, a filled SOLID or HATCH boundaryRaised (curves are many short straight edges, as fine as the Curves setting)
LINE, ARC and open polylines whose ends meetJoined end to end into one closed shape, then raised
A closed shape inside anotherA hole (even-odd rule), or solid with All solid
Lines whose ends do not meetLeft out and listed with layer, length and end points
TEXT, MTEXT, POINT, DIMENSION textLeft out (counted in the info line)
Blocks (INSERT)Placed, scaled and turned as in the drawing, then treated like the shapes above

The STL is watertight: every edge is shared by exactly two triangles. The converter checks that on the finished mesh, and shows the volume, so you can see at once if a hole went missing.

What the test drawings give

Drawing (height 5 mm)STL sizeVolumeSolidsHolesOpen lines
20 × 20 mm square, 5 mm high20 × 20 × 5 mm2,000 mm³100
Ring: circles of radius 10 and 5 mm20 × 20 × 5 mm1,176 mm³110
Same ring with All solid20 × 20 × 5 mm1,567 mm³100
Plate test drawing (see the note below)125 × 30 × 5 mm8,077 mm³411
1 × 1 square in a DXF set to inches25.4 × 25.4 × 5 mm3,226 mm³100
Only open lines–no STL002

The plate test drawing holds a 40 × 30 mm plate with a 12 mm hole, a separate disc, a triangle drawn as 3 lines, a slot drawn as 2 lines and 2 arcs, 1 open line and a text. Computed by the converter itself from its own test drawings. The square gives exactly 20 × 20 × 5 = 2,000 mm³. The ring is less than a full disc because the inner circle is a hole; its volume is a little under π × (10² − 5²) × 5 because circles are made of short straight edges.

DXF units and the size of the STL

DXF unitsA 10 × 10 unit square becomes
Millimetres ($INSUNITS 4)10 × 10 mm
Centimetres ($INSUNITS 5)100 × 100 mm
Inches ($INSUNITS 1)254 × 254 mm
Feet ($INSUNITS 2)3,048 × 3,048 mm
Metres ($INSUNITS 6)10,000 × 10,000 mm

DXF files store the drawing unit in the $INSUNITS header value. From the file uses it; if the value is missing or 0 (unitless), the drawing is read as millimetres and the page tells you. STL files have no unit field, and 3D printing programs read them as millimetres.

Next steps

Check the drawing first in the DXF viewer, and the STL afterwards in the STL viewer. Have an SVG instead? SVG to STL raises SVG shapes the same way. For raised lettering, try Text to STL; for the cost of a print, the 3D Print Cost Calculator.

Sources

Sources: Autodesk DXF Reference: header variables ($INSUNITS); Library of Congress: STL (STereoLithography) File Format Family; Library of Congress: STL File Format, Binary.

Not affiliated with Autodesk.

More free tools

Making parts for a 3D printer, laser or CNC?

View, convert and design parts with free maker tools that run privately in your browser, with no sign-up and no watermark.

See all free tools →

Frequently asked questions

Is this DXF to STL converter free?

Yes. There is no sign-up, no watermark and no limit on how many files you convert. The conversion runs in your browser, so your DXF never leaves your device.

Why does my DXF need a height?

Most DXF files are flat 2D drawings: they have outlines but no thickness. An STL is a 3D surface, so each closed shape is raised (extruded) straight up by the height you enter, like cutting it from a sheet of that thickness.

Are holes kept?

Yes. A closed shape inside another closed shape becomes a hole, and a shape inside that hole becomes solid again (the even-odd rule), so a ring stays a ring. Choose All solid if you want every closed shape filled.

What happens to lines that do not close?

They are left out and listed under the tool with their layer, length, and where they start and end, so you can find the gap. The converter does not close them for you, because a guessed line could change the part.

My outline is made of separate lines and arcs. Will it work?

Yes, as long as their ends meet. Lines, arcs and open polylines whose ends touch (within 0.01 mm) are joined end to end into one closed shape before it is raised.

Why is my STL the wrong size?

The size comes from the units in the DXF header ($INSUNITS). If the file has no units it is read as millimetres; if it was drawn in inches, choose Inches under DXF units and the part becomes 25.4 times larger.

Can it convert a 3D DXF or a DWG?

No. It raises 2D shapes. 3D faces and meshes inside a DXF are not converted, text is left out, and DWG files must be saved as DXF first in your CAD program.

Which STL should I download?

Binary STL is smaller and every slicer reads it. ASCII STL is plain text you can open in an editor. Both hold the same triangles in millimetres.

Is my DXF uploaded?

No. The DXF is read and converted by JavaScript in your browser, so it never leaves your device.