DXF to OBJ Converter
Get an OBJ mesh from a DXF drawing: 3D face entities are carried over, and closed 2D outlines are filled and extruded 1 drawing unit thick. Close every outline before you upload, because open linework has nothing to fill and is refused.
Download Started!
How would you rate your experience with MiConvert?
DXF drawings in Google Drive?
Drive cannot preview DXF files. Open one from Drive with MiConvert to see the drawing as pages, or convert it and save the result next to the original. MiConvert for Google Drive →
Why a DXF drawing does not open as a 3D model
DXF is AutoCAD's Drawing Exchange Format, and most DXF files are flat. They hold lines, arcs and polylines with no thickness, made for floor plans, laser and CNC cutting profiles and technical drawings. OBJ, the Wavefront format, describes polygon surfaces that nearly every 3D modeler and renderer can load. A flat drawing has no surfaces, so 3D software either refuses it or brings it in as loose curves that you still have to model.
On our servers, ezdxf 1.4.4 opens the drawing, switching to its recovery mode if the file is damaged. Face entities that are already 3D, namely 3DFACE, MESH, POLYFACE and POLYMESH, are taken as real faces, including those inside blocks. Flat linework (LINE, ARC, CIRCLE, ELLIPSE, SPLINE, LWPOLYLINE and POLYLINE) is chained into loops. Blocks are expanded up to eight levels deep, curves are flattened in steps of 0.05 drawing units, and tiny gaps between endpoints are closed. Each closed region is filled, inner loops become holes, and the region is extruded. trimesh then writes the OBJ.
Outlines are kept closely, but depth is not. Extrusions are always exactly 1 drawing unit thick. The drawing's unit setting ($INSUNITS) is never read, so the coordinates pass straight through: an inch drawing yields an OBJ whose numbers are inch values. Layers, colors and linetypes are not carried over, and the OBJ is a single file with no material. Layers for dimensions, text and title blocks, and dashed construction lines, are left out whenever the real outlines close without them.
Typical users are makers previewing a laser-cut or CNC sign in a renderer, architects who want a plan's footprint as a flat 3D shape, and developers turning a logo drawn in CAD into a game asset. To script the same job in Python, start with the same open-source libraries: ezdxf to read the DXF and trimesh to write the mesh.
How to convert DXF to OBJ
- Close every outline that should become a shape. In AutoCAD, JOIN or PEDIT with the Join option merges loose lines and arcs into closed polylines.
- If the drawing holds ACIS solids (3DSOLID, REGION, BODY or SURFACE), export STL or STEP from your CAD program instead, because those entities are refused here.
- Check which unit the drawing uses. The OBJ will be 1 unit thick in that unit, and its coordinates keep the same numbers.
- Upload the ASCII or binary DXF. Most drawings finish within a few seconds after upload.
- Download the OBJ while the link is valid, for about 4 hours.
- In your 3D app, set the import unit to match the drawing, and scale the depth if you need a different thickness.
What the DXF reader handles
- Reads real 3D face entities (3DFACE, MESH, POLYFACE, POLYMESH) and closed 2D outlines with the same reader
- Turns nested loops into holes, so washers, window frames and letters such as O and A come out open
- Expands INSERT and MINSERT blocks up to eight levels deep, so repeated parts appear wherever they are placed
- Skips layers named for dimensions, text, borders, title blocks, hatches or construction, and non-continuous linetypes, as long as the outlines close without them
- Falls back to paperspace layouts when modelspace is empty, and lays a drawing made in another plane flat
- Refuses near-empty results: if the closed shapes cover under 2 percent of the drawing, you get an error instead of a misleading fragment
Video Tutorial
Detailed guide on how to convert DXF files to OBJ quickly, for free, and without losing original quality. Perfect if you need to process file formats, reduce size, or upload files to systems that only
DXF to OBJ questions
Why does my DXF fail with 'No valid 3D geometry found'?
This is the most common failure on this page. The message is generic: its mention of metadata and textures does not apply to DXF. Usually an outline is not closed, the drawing holds ACIS solids, it contains only open lines, or the closed shapes are tiny compared with the whole drawing. Join open outlines, delete stray objects far outside the part, or export STL or STEP from CAD for solids.
Can I set the extrusion height?
No. Every filled outline is extruded exactly 1 drawing unit, and there is no thickness option. To get a 3 mm sheet from a millimeter drawing, scale the OBJ by 3 along its thickness axis after import.
Which units will the OBJ use?
OBJ has no unit field, and the converter does not read the DXF's unit setting. The coordinates are copied as they are. A drawing in millimeters gives millimeter numbers and a drawing in inches gives inch numbers. Tell your 3D app which unit to assume when importing.
Does a 3D DXF convert to OBJ?
Yes, if its 3D content is made of 3DFACE, MESH, POLYFACE or POLYMESH entities, which are read as real faces, even inside blocks. ACIS-based 3DSOLID, REGION, BODY and SURFACE entities cannot be read. For those, export STL, OBJ or STEP from the CAD program that made them.
Are text, dimensions and hatches converted?
Text entities are not turned into 3D letters. If you need lettering, convert the text to closed outlines in your CAD program first. Dimensions and annotation layers are skipped when the outlines close without them. Hatch, SOLID and TRACE fills are used only as a fallback when no closed outlines are found.
Can I convert DXF to OBJ with Python?
Yes, with the libraries this converter uses: ezdxf to read the entities and trimesh to build and export the mesh. The steps that matter are flattening curves, joining loose endpoints, filling regions so inner loops become holes, and extruding the result.
Should I choose OBJ or STL for my DXF?
Both come from the same DXF reader and contain the same shapes. STL is the usual choice for slicers and 3D printing. OBJ suits modeling, rendering and game tools, which import it as a plain mesh.
What happens to my drawing after conversion?
The conversion runs on our servers, not on your device, and transfers use HTTPS. Your uploaded DXF is deleted as soon as the conversion finishes. The OBJ stays available to download for about 4 hours and is then deleted automatically. File names and sizes are logged as part of normal operation.