Skip to content
3DToolBench

Convert DXF to STL

A DXF is a flat drawing. An STL is a solid. Turning one into the other means choosing how thick the flat shape should be, and this page does that with the model on screen while you set it. The drawing never leaves your computer.

Drag a 3D file here, or.

This page is set up for DXF files. Other formats we can read work here too.

The file is read on your own computer. It is never uploaded.

Add a file to switch this on.

Your file is read by your own browser and never sent to a server. There is no upload, no account and no copy of your model anywhere but on your computer.

The part most DXF converters get wrong

A DXF almost never contains outlines. It contains loose pieces. A rectangle with rounded corners saved out of AutoCAD is four separate LINE entities and four separate ARC entities, stored in no particular order, none of them knowing about the others. On screen it looks like one closed shape. In the file there is no shape at all.

Nothing can be given a thickness until those pieces are joined back up. This converter does that: it walks the ends of every line and arc, finds the ones that meet, and rebuilds the loops. The message under the 3D view tells you how many outlines had to be rebuilt that way, which on a normal CAD drawing is all of them.

This is why so many free DXF converters hand back an empty model. They read the entities, find nothing that is already a closed path, and give up. If another tool has told you your drawing is empty, it almost certainly is not.

Units, and the mistake that costs a sheet of material

A DXF can state what one drawing unit means, in a header field called $INSUNITS. Many do. Many do not, and a drawing from an American shop is very often in inches whether it says so or not.

When the file states its unit, this page reads it and says so under the 3D view: "the drawing states its unit as inches", and the millimetre sizes beside the model are that statement converted. When the file says nothing, the numbers are read as millimetres and you are told that too.

So there is one thing to check before you download anything: the width and depth figures next to the 3D view. If your 300 mm panel is showing as 11.8 mm, the drawing was in inches and said nothing about it. Set the scale box to 2540 and it is right. If it shows as 7620 mm, the opposite happened; use 3.94.

Arcs, bulges and splines all survive

A rounded corner in a polyline is stored as a single number called a bulge, attached to the vertex before it. It is easy to ignore, and ignoring it turns every rounded corner in the drawing into a straight chamfer — a part that looks almost right and does not fit whatever it was drawn to fit. Bulges are read here and turned back into arcs.

Splines are read properly too, using the knot vector the file provides rather than the shortcut of joining up the control points. Anything traced, anything drawn freehand, and everything Illustrator writes arrives as a spline, and the shortcut visibly cuts the corners off all of it.

Curves are flattened into straight segments finely enough that the edge is smooth to a laser cutter and to the eye, and coarsely enough that a traced logo does not become a model with a hundred thousand triangles in it.

Blocks: the reason a drawing looks like it has no holes

A drawing with twenty identical mounting holes is usually not twenty circles. It is one block, defined once, placed twenty times with an INSERT entity. A reader that walks only the main entity list sees a plate with no holes in it.

Blocks are expanded here, with their position, rotation and scale, and nested blocks — a block that places another block — are followed too. So are the row and column grids that an INSERT can carry, which is how a perforated sheet is usually stored.

What is left out, and why

Text is left out. A TEXT entity is a request to draw letters in a particular font, not an outline, and the font is not in the file. If you want the lettering as part of the part, explode the text to lines in your CAD program first, or use the text to STL tool on this site.

Dimensions, leaders and hatching are left out. A dimension describes the part rather than being part of it, and a hatch is a fill pattern drawn inside a boundary — the boundary is what becomes the shape.

Any outline whose ends do not meet is left out, and you are told how many. A gap of a thousandth of a millimetre still leaves a shape open, and an open shape encloses no area to give a thickness to. In LibreCAD or QCAD, Modify → Trim closes them; in AutoCAD, the PEDIT command with the Join option.

What survives, and what does not

Kept in the STL file

  • Every closed outline, including holes, which are cut through the solid
  • Arcs, rounded polyline corners and splines, as real curves
  • Blocks placed with INSERT, expanded where they sit
  • The drawing’s stated unit, converted to millimetres

Lost on the way

  • Text, dimensions, leaders and hatching — none of them are outlines
  • Layers, colours and line types — STL stores none of them
  • Outlines whose ends do not meet, which are counted and reported

How to convert DXF to STL

  1. Drop the .dxf file in

    Only the one file is needed. A DXF carries everything inside it, including its blocks, so there is nothing to include alongside.

  2. Read the message under the 3D view

    It says what unit the drawing declared, how many outlines had to be rebuilt from loose lines, and what was left out. That message is the fastest way to spot a drawing with a gap in it.

  3. Check the width and depth against the real part

    This is the step that saves material. A drawing that is 25.4 times too small was in inches and did not say so — put 2540 in the scale box.

  4. Set the thickness in millimetres

    This is the one number the drawing cannot tell you. 3 mm makes a sign or a stencil; 1 mm an inlay; 10 mm something that stands up on its own.

  5. Download the STL

    Binary STL unless something has specifically asked for text. Then check the height figure beside the model matches the thickness you set.

DXF and STL compared

DXF and STL compared, row by row
PropertyDXF.dxfSTL.stl
File contentsPlain text in numbered group codes, with a binary variant nobody uses.Binary or plain text. Binary is an 80-byte header, a triangle count, then 50 bytes per triangle.
GeometryLines, arcs, circles, polylines and splines, in 2D and limited 3D.Triangles only. Curves are approximated when the file is made, and cannot be recovered.
UnitsRecorded in a header variable, as one of twenty-odd unit codes.None. The file stores bare numbers, and every reader has to guess what they mean.
Colour and textureA colour number per entity, and colour by layer.None. There is no place in the format for a colour, a material or a texture.
Separate objectsNamed layers, plus blocks for repeated geometry.One body. Several parts written into one STL become one undivided lump of triangles.
Published byAutodesk, 1982, as the published counterpart to the closed DWG.3D Systems, 1987, for the first stereolithography machines.
Written byAutoCAD, LibreCAD, QCAD, Fusion 360 and every laser cutter’s software.Every CAD program and every slicer, as the common denominator.

Questions

My drawing came out empty. What happened?
Almost always a gap. A shape whose two ends are a thousandth of a millimetre apart is an open shape, and an open shape has no area to give a thickness to. The message under the 3D view says how many outlines were left out for that reason. Trim and join them in your CAD program and try again.
Can I convert a 3D DXF — one with solids or 3D faces in it?
Flat faces in a DXF are read, but a DXF is fundamentally a 2D drawing format and almost nothing writes real 3D geometry into one. If your model is 3D, export it as STEP or STL from the program that made it. This site reads both.
Why does the file say inches when my CAD program shows millimetres?
The $INSUNITS field is often left at whatever the template had rather than being set to match the drawing. Trust the width and depth figures next to the 3D view over the field, and use the scale box if they disagree with the real part.
Does it read DWG as well?
No, and nothing free does. DWG is AutoCAD’s own format and reading it needs a paid membership of the Open Design Alliance. Every CAD program that opens a DWG can save it as a DXF, and that takes about five seconds.
Is my drawing uploaded anywhere?
No. It is read by your own browser and never sent to a server. There is no upload, no account and no copy of your drawing anywhere but on your computer.

Having it printed

If the part is larger than your bed, needs a material your printer cannot handle, or you do not have a printer, these will print it and post it to you. Work out what it would cost you first — the cost calculator on this site gives you a figure to compare against.

These are ordinary links, not paid referrals — we earn nothing if you use them. The converter above is the same whether you do or not.

Where to go next