How to convert DXF to Shapefile
- Save the drawing as ASCII DXF in your CAD software.
- Drop the .dxf file into the box above.
- If the coordinates are latitude and longitude, a ZIP downloads with the Shapefile parts.
- Extract the ZIP and add the .shp files to QGIS, ArcGIS Pro or ArcMap.
From CAD entities to GIS features
A DXF mixes every kind of entity in one file. A Shapefile holds one geometry type, so the converter sorts the drawing into up to three shapefiles, named POINT, POLYLINE and POLYGON.
| DXF entity | Shapefile |
|---|---|
| LWPOLYLINE, POLYLINE (closed) | POLYGON |
| LWPOLYLINE, POLYLINE (open), LINE | POLYLINE |
| CIRCLE | POLYGON, drawn with 48 sides |
| ARC | POLYLINE, as short straight segments |
| SPLINE | POLYLINE, through the fit points or the control points |
| HATCH | POLYGON, one for each boundary made of straight edges |
| POINT | POINT |
| TEXT, MTEXT | POINT, with the text in the attribute table |
| INSERT (block reference) | the entities inside the block, placed with the insert's position, scale and rotation |
Whether a polyline becomes a polygon depends on its closed flag in the drawing. A boundary that only looks closed, because the last vertex sits on the first, is still written as a line. Close it in CAD first if you need a polygon.
Other entity types, such as DIMENSION and ELLIPSE, are skipped and listed after the conversion.
The attribute table
CAD drawings organise things by layer. That is the one piece of information that carries over well, so it goes into the attribute table of every feature:
- Layer: the CAD layer of the entity. Use it to filter or style the data in your GIS, or to split one shapefile into several.
- DxfType: the original entity type, such as LWPOLYLINE or CIRCLE.
- Text: the content of a TEXT or MTEXT entity, up to 250 characters. The field is there only when the drawing has text.
- Block: the block name, for features that came from a block reference. These features take the layer of the block reference. The field is there only when the drawing has block references.
All values are written as text. Colours, line types, line weights and elevation are not carried over; the shapefiles are 2D.
The ZIP also has a .prj for each shapefile (WGS 84, EPSG:4326) and a .cpg that marks the text as UTF-8.
Coordinates: what the free page converts
The page writes the X and Y values from the DXF straight into the Shapefile and labels them as WGS 84. That is only correct when X is longitude and Y is latitude, in decimal degrees. So it checks the extent of the drawing first:
- Inside -180 to 180 and -90 to 90: treated as latitude/longitude and converted.
- Larger numbers: a projected grid in meters or feet, such as a UTM zone, a US State Plane zone or a national grid. The page stops and tells you. GaleriGIS Toolbox converts these drawings once you pick the UTM zone or enter the EPSG code.
- Everything within 15 units of 0,0, or spanning more than 20 degrees: treated as local drawing coordinates. The drawing has no real-world position yet and has to be georeferenced in CAD or GIS software.
If you know the drawing's coordinate system and already use desktop GIS, you can also load the DXF there, assign that system and export to Shapefile.
Common problems
"This is a binary DXF"
Only ASCII DXF is read. Save the drawing again and choose the ASCII DXF option.
Parcels or buildings come out as lines
They were drawn as open polylines or as separate LINE entities. Join and close them in CAD, or build polygons from the lines in your GIS software.
Curves look angular
Arc segments inside a polyline (bulges) are written as straight lines between vertices. Circles and arcs are approximated with short segments.
The file is too large
The free page handles files up to 3 MB. Larger files need GaleriGIS Toolbox.
GaleriGIS Toolbox
$15 per month
- No conversion limit on every GaleriGIS online converter
- Several files at once, and larger files
- DWG and DXF in any UTM zone or EPSG code, KML/KMZ, Shapefile, GeoJSON, Excel and coordinates
- Files stay in your browser. Billed monthly, cancel any time
Payments are processed by Creem, our merchant of record. See our refund policy and terms.
Frequently asked questions
Is my drawing uploaded?
No. The DXF is read and converted inside your browser. Only the converter code is downloaded from our server.
My file is a DWG. Do I have to save it as DXF?
No. The DWG to SHP converter reads DWG files directly.
How many files are free?
Three. After the third file the free quota fills up again over the next one to three days. GaleriGIS Toolbox has no limit.
I only want to see the drawing on a map. Do I need a Shapefile?
No. The DXF to KML converter gives you a file for Google Earth instead.
Does GaleriGIS Pro open DXF files?
No. GaleriGIS Pro does not open DXF or DWG files. It opens the Shapefile from this page: in GaleriGIS Pro, our Windows app, you can put it on satellite imagery, style it and print a map layout.
More GaleriGIS tools
- KML to SHP converter
- SHP to KML converter
- KMZ to SHP converter
- SHP to KMZ converter
- KML to Excel converter
- KMZ to Excel converter
- Excel to KML converter
- GeoJSON to SHP converter
- SHP to GeoJSON converter
- DWG to KML converter
- DWG to SHP converter
- DXF to KML converter
- UTM zone detector
- KML and KMZ viewer