Convert DXF to Shapefile (SHP)
This converter turns a DXF drawing from AutoCAD or another CAD program into shapefiles for QGIS or ArcGIS: one for points, one for lines and one for polygons, with the CAD layer and text kept as fields. The DXF is read in your browser and is not uploaded. A DXF has no coordinate system, so you enter the EPSG code; colors, line types and dimensions are not carried over, and DWG files must be saved as DXF first.
Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.
Key facts
- Input: DXF (.dxf). Output: Shapefile (.shp).
- Your files are not uploaded: the work is done in your browser, on your own device.
- File size: no fixed limit; very large files are limited by your device's memory.
- Needs a current browser (Chrome, Edge, Firefox or Safari) on a computer, tablet or phone; nothing to install.
- Free to use, with no sign-up.
Need to convert a single coordinate pair to another coordinate system? Use the coordinate converter on GeoDrafter, our sister site.
DXF to Shapefile: why convert
Survey plans, site plans and utility drawings often arrive as DXF from a surveyor, architect or engineer, while the GIS side needs shapefiles. This converter reads the DXF with GDAL, the library QGIS uses, and writes up to three shapefiles, because a shapefile holds only one geometry type: points (survey points and text positions), lines and polygons. Closed polylines and circles, such as building outlines and parcels, become polygons with an area, and hatches become polygons too. Every feature keeps its CAD layer name, the entity type, the text of labels and the entity handle, so you can filter by layer in QGIS or ArcGIS afterwards. Only model space is converted; title blocks and frames on paper-space layouts are left out. The drawing is read on your own computer.
How to convert DXF to Shapefile
- Drop your .dxf file in the box, or click to choose it. A .dwg must be saved as DXF first.
- Enter the coordinate system of the drawing as an EPSG code, such as EPSG:25832 for UTM zone 32N, or leave it empty if you do not know it.
- Keep or untick "Closed polylines and circles become polygons", then click Convert to Shapefile and unzip the download.
What changes when you convert
The DXF does not say where on Earth it is
A DXF stores coordinates as plain numbers without a coordinate system. A surveyor's drawing is usually in the national grid (for example EPSG:25832 in Denmark or Germany, EPSG:27700 in Britain or a State Plane zone in the United States), and the map preview appears once you enter its EPSG code. The shapefile then gets a .prj file. Architect drawings are often in local site units around 0,0; leave the field empty, and the shapefile has no .prj. Such a drawing must be georeferenced in QGIS or ArcGIS before it lines up with other data.
Circles and arcs become many short segments
A shapefile has no true curves. Circles, arcs, ellipses, splines and bulges in polylines are turned into straight segments, about 90 per full circle. That is close enough for maps, but the exact radius is not stored any more.
Closed lines become polygons
In CAD a building outline is usually a closed polyline, which is a line, not an area. With the box ticked, every closed polyline and circle is written to the polygon shapefile so it gets an area in GIS. Untick it if the closed lines are, for example, contour lines that should stay lines.
Blocks, text and heights
Blocks (symbols such as trees, manholes or north arrows) are exploded: each line, circle or text in the block becomes its own feature on the layer of the block insert. TEXT and MTEXT become points with the text in the Text field. Real heights, such as the elevation of contour lines, are kept as Z values in a 3D shapefile; drawings without heights give ordinary 2D shapefiles.
What is not carried over
Colors, line types and widths, text size and rotation, dimension styles and paper-space layouts are CAD presentation, and a shapefile cannot store them. 3D solids and regions (ACIS objects) and proxy objects from add-ons such as Civil 3D are not read.
DWG is a different format
DWG is AutoCAD's own binary format, and only Autodesk and licensed programs read it reliably. Save the drawing as DXF in AutoCAD, BricsCAD or DraftSight (Save As, file type DXF), or use the free ODA File Converter, then convert the DXF here.
About the formats
DXF
DXF (Drawing Exchange Format) is the open exchange format of AutoCAD, published by Autodesk since 1982. Surveyors, architects and engineers use it to pass CAD drawings between programs. A DXF holds lines, polylines, arcs, circles, text, hatches and blocks on named layers, but no attribute table and no coordinate system.
- Plain text (or binary) with drawing entities on named layers; blocks are reusable symbols inserted many times.
- There is no attribute table: besides the geometry, an entity has a layer, a color, a line type and, for text, the text itself.
- The coordinate system is not stored; coordinates are just numbers, often in a national grid or in local site units.
- DWG is AutoCAD's own binary format, not the same thing as DXF.
Shapefile
The Esri Shapefile is the most widely used GIS vector format. A single "shapefile" is really a set of files with the same name: .shp holds the geometry, .shx an index, .dbf the attribute table, and the optional .prj the coordinate system and .cpg the text encoding.
- Needs at least .shp, .shx and .dbf. Select them together or as one .zip.
- Field names are limited to 10 characters and text values to 254 characters.
- Each shapefile holds one geometry type only: points, lines or polygons.
- Without a .prj file the coordinate system is unknown.
Frequently asked questions
Which CAD layers end up in the shapefile?
Every entity in model space, on every layer. The layer name is kept in the Layer field, so in QGIS or ArcGIS you can filter or style the features by layer.
Why do I get three shapefiles?
A shapefile holds one geometry type only. Points, lines and polygons from the drawing are therefore written to name_points.shp, name_lines.shp and name_polygons.shp in one zip; types that do not occur are left out.
How do I find the EPSG code of a drawing?
Ask whoever made it, or look at the coordinates: values such as 556000, 6324000 are UTM metres, and the zone follows from the place. National grids often have their own code, for example EPSG:25832 (ETRS89 / UTM 32N), EPSG:2056 (Swiss LV95) or EPSG:27700 (British National Grid).
Is my drawing uploaded?
No. The DXF is read and converted by your browser on your own computer, and nothing is sent to a server.
Can I convert the shapefile back to DXF?
Yes, with the SHP to DXF converter. Only the geometry and the layer come back, since a DXF has no attribute table.