DXF to Shapefile Converter
Converts a DXF drawing to Shapefiles with GDAL's ogr2ogr, split by geometry type.
Upload a .dxf file. GDAL reads all drawing entities into one layer called entities. Because a Shapefile holds one geometry type, the worker splits it into entities_points, entities_lines and entities_polygons (only the types that occur) and packs them into a ZIP.
Drag a file here to convert, or select file
Accepted: .dxf · max. 50 MB
What the converter does
- All entities end up in one layer entities; the worker splits it by geometry type into entities_points, entities_lines and entities_polygons.
- The CAD layer name is kept in the field Layer; texts become points with the text in the field Text.
- Closed polylines and circles become lines, not polygons (GDAL's default).
- DXF has no coordinate system, so the Shapefiles have no .prj. Assign the coordinate system in your GIS.
- Coordinates are 3D (Z = 0 for a flat drawing). The field EntityHandle is shortened to EntityHand.
- The report below the upload shows layers and features read and written, skipped layers with the reason, GDAL's warnings and the exact commands.
GDAL command the worker runs
One command per geometry type that occurs. For lines the WHERE clause lists LINESTRING, MULTILINESTRING, CIRCULARSTRING, COMPOUNDCURVE and MULTICURVE, and the layer is called entities_lines. Locally, --config DXF_CLOSED_LINE_AS_POLYGON TRUE turns closed polylines into polygons (tested; circles stay lines).
Tested with
| Test file | Result |
|---|---|
| DXF with a point, a line, a closed polyline, a circle and a text on 5 CAD layers | entities_points.shp (2: point and text), entities_lines.shp (3: line, closed polyline, circle); 5 of 5 features; no .prj |
Tested on 24 Sep 2026 with the worker code of this site and GDAL 3.10.3 (conda-forge build on Windows). The worker image runs the Debian build of the same GDAL version; the live worker was not part of these tests.
Limits
- Upload limit: 50 MB per file.
- Tested with points, lines, polylines, circles and text. Blocks, hatches and dimensions were not part of the test.
- No coordinate system in the output (DXF has none).
- Each GDAL step may run for up to 240 seconds; a longer run is stopped with an error message.
Frequently Asked Questions
Why are my closed polylines lines and not polygons?
GDAL's DXF reader returns closed polylines as lines unless DXF_CLOSED_LINE_AS_POLYGON is set. The worker uses the default. Locally you can run the command with --config DXF_CLOSED_LINE_AS_POLYGON TRUE.
Where are my CAD layers?
GDAL does not create one Shapefile per CAD layer. The CAD layer name of every entity is in the field Layer, so you can filter by it in your GIS.
What happens to my file?
Your browser uploads it directly to the GDAL worker on Fly.io (region Frankfurt). The worker converts it in a temporary folder and deletes the folder after sending the result, or immediately if the conversion fails. Files are not stored permanently.