Convert KML to DXF
This converter turns KML or KMZ files from Google Earth or Google My Maps into one DXF drawing for AutoCAD, BricsCAD, DraftSight or LibreCAD. The coordinates are converted from longitude and latitude to the UTM zone of the data, in metres, or to the system you enter. Each KML folder becomes a CAD layer, and placemark names can be written as text. The files are converted in your browser and not uploaded.
Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.
Key facts
- Input: KML (.kml). 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.
KML to DXF: why convert
Boundaries, routes and points of interest are often drawn in Google Earth or Google My Maps and then have to go into a CAD drawing: a site plan, a survey sketch or a road design. A KML cannot be opened in AutoCAD, and its coordinates are longitude and latitude in degrees, which a CAD program draws tiny and distorted. This page reads the KML or KMZ in your browser with GDAL, the open-source library behind QGIS, converts the coordinates to metres in the UTM zone where the data lies (or to the national grid you enter), and writes one DXF. Points become DXF points, paths become polylines, and polygons become closed polylines, holes included. Every KML folder ends up on its own CAD layer, or you choose a field whose values become the layers, and the placemark names can be written as text next to the shapes. Nothing is sent to a server.
How to convert KML to DXF
- Drop one or more .kml or .kmz files exported from Google Earth or Google My Maps. Several files go into one DXF.
- Check the output coordinate system. The UTM zone of the data is filled in; replace it with the grid your CAD drawing uses, such as EPSG:25832, EPSG:27700 or a State Plane zone.
- Choose what the CAD layers are named after and whether the placemark names are written as text, then click Convert to DXF.
What changes when you convert
Pick the coordinate system of the drawing
A KML is always in WGS84 longitude and latitude. The converter fills in the UTM zone where the data lies, so the drawing is in metres and can be measured. If the KML has to line up with an existing CAD drawing, enter that drawing's system instead, for example ETRS89 / UTM zone 32N (EPSG:25832), the British National Grid (EPSG:27700) or a State Plane zone in US feet. A DXF does not store the system, so tell the CAD user which one you chose.
Descriptions, data columns and styles are left out
A DXF has no attribute table. Only the geometry, the layer name and, if you want, the placemark name are written. Descriptions, My Maps data columns, photos, icons and the colors from Google Earth do not come along; every entity gets the color of its CAD layer (ByLayer). To keep the attributes, convert the same KML to a shapefile or CSV as well.
Google Earth heights are usually zero
Google Earth writes an altitude of 0 for shapes that are clamped to the ground. Such zeros are dropped, so the polylines are flat 2D polylines. A KML with real heights, such as a GPS track or a path drawn with an absolute altitude, gives 3D polylines and points.
The text height is a guess
Names are written about 1/250 of the drawing width high, rounded to 1, 2 or 5 metres (or another power of ten), and the status line says the height. In AutoCAD you can select all texts with QSELECT and change the height in one go.
About the formats
KML
KML (Keyhole Markup Language) is the XML format behind Google Earth and Google My Maps, and an OGC standard since 2008. Besides geometry it can hold styles, icons, folders and descriptions in HTML.
- Always WGS84 longitude, latitude and optional altitude.
- Folders group placemarks; each folder can become its own layer when converting.
- Styles (colors, line widths, icons) are specific to KML and Google Earth.
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.
Why is the drawing in UTM and not in my national grid?
UTM works everywhere, so it is filled in from where the data lies. Many countries use their own grid in CAD, such as EPSG:25832 in Germany and Denmark, EPSG:2154 (Lambert-93) in France or EPSG:27700 in Great Britain. Type its EPSG code in the output coordinate system field before converting.
Does a KMZ with photos or image overlays work?
The placemarks, paths and polygons in the KMZ are converted. Photos and image overlays are left out, because a DXF can only reference images as separate files.
Is my KML uploaded?
No. The DXF is written by your browser on your own computer, and nothing is sent to a server.