DXF is optimized for CAD and engineering, KML for Google Earth visualization and web maps. These formats solve fundamentally different problems.
| Criteria | DXF | KML |
|---|---|---|
| CAD compatibility | ✓ | ✗ |
| Google Earth | ✗ | ✓ |
| Coordinate precision | ✓ | ✓ |
| Visual styling | ✗ | ✓ |
| True scale 1:1 | ✓ | ✗ |
For engineering projects, master plans, CAD work.
For map visualization, presentations, Google Earth.

DXF (Drawing Exchange Format) was published by Autodesk in 1982 together with early AutoCAD as an openly documented way to move drawings between programs. Autodesk still publishes a reference for each release, so almost every CAD, CAM and GIS package reads it.
A DXF file is organised into sections: a header, tables for layers, line types and text styles, a blocks section and an entities section with lines, polylines, hatches and text. Geometry is stored as raw X, Y and Z values in drawing units, and recent versions can add a GEODATA object that ties the drawing to a coordinate system.
AutoCAD and AutoCAD LT, BricsCAD, NanoCAD, KOMPAS-3D, FreeCAD and LibreCAD open DXF directly, and so do QGIS, Global Mapper and most laser-cutter and CNC software.
Reach is its main strength: when you do not know which program the recipient uses, DXF is the safest bet. Because it is text, it can be inspected or generated by scripts, and layers, colours, line types and blocks survive the trip between applications.
Text encoding makes files several times larger than the equivalent DWG, so big drawings load slowly. Newer AutoCAD-only objects may be simplified by other programs, and many programs ignore the GEODATA object, so the receiver may still need to be told which coordinate system was used.
osm2cdr writes a text DXF (version R2007) with the map split into named layers — roads, buildings, water, green areas, boundaries and points of interest — keeping colours and line types. By default the drawing is in metres in the UTM zone of the area, or in the national grid where one exists, so it can be measured right after opening; a GEODATA object records the system, and an explicitly chosen one adds a .prj in a ZIP.

KML (Keyhole Markup Language) was developed by Keyhole, the company behind Google Earth, which Google acquired in 2004. Google later handed it to the Open Geospatial Consortium, and KML 2.2 became an OGC standard in 2008.
A KML document is XML: placemarks with points, lines and polygons are organised in folders, each with a name, a description and optional ExtendedData attributes. Styles define icons, line widths and fill colours; altitude modes and extrusion let features rise above the ground; network links and ground overlays pull in external content.
Google Earth Pro and Google Earth on the web open KML with a double click or a drag; Google My Maps, QGIS, ArcGIS, Global Mapper, Marble and many mobile apps import it.
KML is built for presentation: a client can explore the data on a globe without GIS skills, click a feature to see its attributes and switch folders on and off. As text it is easy to generate, inspect and edit.
It supports only WGS 84, files grow quickly because XML is verbose, and styling is limited to what Google Earth understands. It is a poor fit for analysis: attribute schemas are loose, and large datasets slow the viewer down.
osm2cdr places each layer in its own folder, keeps the OSM tags of every feature in ExtendedData and gives lines and fills a colour and width. Roads, water and greenery lie on the ground, while buildings are extruded to the height from their tags, so Google Earth shows a three-dimensional city straight away.
At the most basic level, DXF is an openly documented CAD drawing exchange format, while KML is an XML format for showing geographic data on a virtual globe. On disk, DXF is usually plain ASCII text, which makes files large but readable; KML is plain XML text.
Here is what the comparison table above means in practice, point by point:

In short: choose DXF when the drawing has to open in any CAD, CAM or GIS program, including ones you do not know in advance. Choose KML when the result is shown on a globe to a client, colleagues or students.
An engineer needs the surroundings of a construction site as a drawing base. DXF provides metres in a projected grid, so offsets, distances and areas can be measured right away.
A project manager wants to show the same site to a client in Google Earth. KML lands on the globe with a folder per layer and extruded buildings, and the client needs nothing beyond Google Earth.
You are checking an alignment drawn in CAD against satellite imagery. Exporting the OSM context as KML for Google Earth gives a quick visual check, while the design work itself stays in DXF.
KML stores longitude and latitude in degrees, so importing it into CAD without reprojection produces a tiny, distorted drawing. Converting DXF to KML requires a known coordinate system, otherwise the drawing lands in the wrong place on the globe — the GEODATA object in the osm2cdr DXF and the optional .prj help converters get that right. Styling does not translate well in either direction: CAD colours and line types become plain lines, and KML icons have no CAD equivalent.
For a coordination meeting, sending both files is common practice: the engineer keeps the DXF, everyone else opens the KML on a laptop or a tablet.
On osm2cdr, pick DXF when you will measure and draw. Pick KML when you will show and discuss the site, especially with people who do not use CAD software.
osm2cdr builds DXF and KML directly from OpenStreetMap data — there is no need to download raw OSM extracts or install conversion tools. The steps:
Converter pages related to DXF and KML explain each route in more detail:
DXF is an openly documented CAD drawing exchange format, whereas KML is an XML format for showing geographic data on a virtual globe. In the comparison table, DXF is ahead on CAD compatibility and true scale 1:1; KML is ahead on google Earth and visual styling.
DXF. Reach is its main strength: when you do not know which program the recipient uses, DXF is the safest bet.
When google Earth and visual styling matter most. KML is built for presentation: a client can explore the data on a globe without GIS skills, click a feature to see its attributes and switch folders on and off.
Yes. osm2cdr has a dedicated DXF to KML converter page for existing files. If you are starting from OpenStreetMap, export the area straight to KML instead.
DXF files open in AutoCAD, BricsCAD, NanoCAD, KOMPAS-3D, FreeCAD, LibreCAD and QGIS. KML files open in Google Earth, Google My Maps, QGIS, ArcGIS and Global Mapper.
DXF can carry its coordinate system: osm2cdr writes a GEODATA object into the drawing and by default uses metres in the UTM zone of the area or a national grid; if you pick a system explicitly, a .prj file comes with the drawing in a ZIP. KML always uses WGS 84 longitude, latitude and optional altitude, so features land in the right place in Google Earth without any setup.