Convert dxf to stl

Convert DXF to STL

Convert DXF outlines or 3D geometry into a validated STL for slicing and 3D printing.

Convert DXF files online

We don’t have a dedicated online converter for DXF to STL yet, but you can convert DXF files online to these and more formats:

How to convert dxf to stl file

3D printers and slicers commonly require STL, while engineering drawings are often delivered as DXF. Conversion is straightforward only when the DXF already contains suitable 3D geometry; a 2D drawing must first become a closed, thickened 3D solid.

What the DXF format is

DXF, or Drawing Exchange Format, is an Autodesk-developed text or binary CAD format for exchanging 2D and 3D drawing data. It can contain lines, arcs, circles, polylines, dimensions, layers, blocks, meshes, surfaces, and solids.

AutoCAD, BricsCAD, DraftSight, Fusion, SolidWorks, QCAD, and architectural, mechanical, surveying, laser-cutting, and CNC applications use DXF. A DXF often contains only a flat outline; it does not necessarily define thickness, extrusion direction, or a closed printable volume.

What the STL format is

STL represents an object's outer surface as a mesh of triangular facets. It is widely accepted by 3D-printing slicers and is also used for rapid prototyping, mesh inspection, and some simulation workflows.

STL does not preserve DXF layers, dimensions, colors, materials, blocks, constraints, parametric features, or manufacturing metadata. Binary STL is normally smaller than ASCII STL and is the usual choice for transfer. STL also has no unit field, so the receiving application must interpret the intended units correctly.

How to convert a 2D DXF with FreeCAD

FreeCAD is a suitable free desktop option when the DXF contains a closed profile that needs a specified thickness.

  1. Open the file with File → Import. Confirm the drawing units because DXF unit metadata may be missing or incorrect.
  2. Inspect the imported entities in the Draft or Part workbench. Remove construction geometry, duplicate lines, unwanted layers, and open or overlapping segments.
  3. Join the segments into a closed wire. Small gaps, duplicate endpoints, self-intersections, and crossing contours can prevent face creation.
  4. Select the closed wire and choose Part → Extrude. Enter the required length and direction. The profile must form a valid face for the result to be a solid.
  5. Select the solid and choose Mesh → Create mesh from shape. Use a finer deviation or angular setting for curved surfaces, but avoid unnecessarily dense meshes.
  6. Export the mesh through File → Export and select STL Mesh (*.stl). Choose binary output if FreeCAD offers ASCII and binary options.
  7. Open the STL in the target slicer or a checker such as Microsoft 3D Builder, PrusaSlicer, or MeshLab. Verify dimensions, holes, surface normals, and non-manifold edges.

How to convert with AutoCAD

In full AutoCAD, set the correct units and clean the DXF outline. Convert each closed boundary to a region with REGION, create the required thickness with EXTRUDE, then export the solid with STLOUT. Choose binary output when prompted.

For several profiles, create separate regions and extrude them individually, or combine solids with Boolean operations. AutoCAD cannot infer whether a flat outline should be 1 mm, 10 mm, or another thickness; that value must come from the design specification. AutoCAD LT does not provide the same 3D solid workflow.

Online conversion

CloudConvert and Convertio can be convenient for non-confidential DXF files that already contain valid 3D geometry. They are less reliable for 2D linework because a service cannot infer the required thickness or repair every ambiguous contour. Upload only files permitted by your data policy, then check the downloaded STL in a CAD viewer, mesh validator, or slicer before manufacturing.

Quality and compatibility limits

  • 2D versus 3D: A flat DXF requires an explicitly chosen thickness and extrusion direction. No converter can determine those reliably from an outline alone.
  • Closed geometry: Gaps, self-intersections, duplicate entities, nested contours, and overlapping profiles can produce missing faces, inverted regions, or failed extrusions.
  • Units: STL carries no unit metadata. Confirm the model's measured dimensions after importing it into the slicer or receiving CAD system.
  • Mesh resolution: Coarse tessellation makes arcs and cylinders visibly faceted; excessive tessellation enlarges the file without improving manufacturing accuracy. Tighten deviation settings for small curved parts and inspect the triangle count.
  • Printable topology: A typical printable model should be a closed shell with consistently oriented normals. Open boundaries, internal faces, zero-thickness walls, and overlapping solids can cause slicer errors.
  • Source preservation: Keep the DXF as the editable source. STL is a faceted manufacturing or visualization derivative and cannot retain the original CAD structure.

DXF vs STL: format comparison

How the DXF and STL formats compare on the properties that matter most for this conversion.

Comparison of the DXF and STL file formats
Property .DXF Drawing Exchange Format .STL Stereolithography
Open standard Partly open Partly open
Compression Uncompressed Uncompressed
Typical file size Large Small
Opens in a web browser No No
Further editing Limited Not directly editable
Metadata support Basic None
Plain-text readable Yes Yes
Best used for Data exchange Embedding in applications
Introduced 1982 1987
Developer Autodesk 3D Systems
MIME type application/dxf model/stl