Convert Shapefile (SHP) to DXF
This converter turns one or more shapefiles into a single DXF drawing for AutoCAD, BricsCAD, DraftSight or LibreCAD, with each shapefile, or each value of a field you choose, on its own CAD layer. The shapefiles are converted in your browser and not uploaded. A DXF has no attribute table, so only geometry and layer names are kept, and coordinates should be in a projected system in metres or feet.
Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.
Key facts
- Input: Shapefile (.shp). Output: DXF (.dxf).
- 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.
Not sure which UTM zone an area falls in? Check the UTM zone map on GeoDrafter, our sister site.
Shapefile to DXF: why convert
GIS data often has to go to someone working in CAD: parcels and buildings for an architect, pipes and cables for an engineer, or a base map for a site plan. This converter writes the shapefiles to one DXF with GDAL, the library QGIS uses. Points become DXF points, lines become polylines, and polygons become closed polylines, holes included. Every shapefile ends up on a CAD layer named after it, or you choose an attribute, such as a road class or a land-use code, and each value becomes a layer, so the CAD user can switch them on and off and give them colors. The coordinates are kept in the system of the shapefile, or reprojected to the one you enter, so the drawing lines up with other CAD files in the same grid. Nothing is sent to a server.
How to convert Shapefile to DXF
- Drop a .zip with your shapefiles, or select the .shp, .shx, .dbf and .prj files together. Several shapefiles go into one DXF.
- Choose what the DXF layers should be named after, and an output coordinate system if the CAD drawing uses another one.
- Click Convert to DXF and open the file in your CAD program.
What changes when you convert
Attributes do not come along
A DXF has no attribute table. Only the geometry and the layer name are written, so choose the field that matters most as the layer name. If the CAD user needs all attributes, send the shapefile or a CSV from the SHP to CSV converter as well.
Use a projected coordinate system
CAD programs measure in drawing units, usually metres or feet. A shapefile in longitude and latitude (WGS84, EPSG:4326) gives a drawing in degrees that looks tiny and stretched and cannot be measured in. Enter a projected system such as your UTM zone, national grid or State Plane zone as the output coordinate system; the converter warns you if the result is in degrees.
The DXF does not store the coordinate system
The drawing contains only the numbers. Tell the CAD user which system they are in, for example "ETRS89 / UTM zone 32N, EPSG:25832", so the drawing can be placed correctly with other data. The drawing units are not set in the file; AutoCAD treats them as unitless, which is fine as long as everyone knows they are metres or feet.
No colors, line types or labels
All entities get the CAD default color and line type (ByLayer), so the CAD user can set colors per layer in one place. Labels are not written as text; attribute values only survive as layer names. Polygons become closed polylines, not hatches.
About the formats
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.
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.
Frequently asked questions
Which CAD programs open the DXF?
The DXF follows the AutoCAD 2004 format, which AutoCAD, AutoCAD LT, BricsCAD, DraftSight, LibreCAD, QCAD, MicroStation and QGIS all read.
Can I get a DWG instead?
Not directly. Open the DXF in AutoCAD, BricsCAD or DraftSight and use Save As DWG, or convert it with the free ODA File Converter.
Do heights (Z values) come along?
Yes. A 3D shapefile, such as contour lines with an elevation per vertex, gives 3D polylines and points in the DXF.
Is my shapefile uploaded?
No. The DXF is written by your browser on your own computer, and nothing is sent to a server.
What if the shapefile has no .prj file?
Then the coordinates are written as they are. Enter the source system only if you also want to reproject the data to another coordinate system.