DXF is the CAD exchange format (AutoCAD), Shapefile is the desktop GIS standard (ArcGIS, QGIS). Both support geodata but come from different worlds.
| Criteria | DXF | Shapefile |
|---|---|---|
| CAD software | ✓ | ✗ |
| GIS software | ✗ | ✓ |
| Attributes | ✗ | ✓ |
| Geometric precision | ✓ | ✓ |
| Projections (CRS) | ✗ | ✓ |
For AutoCAD, master plans, engineering drawings, land surveying.
For ArcGIS, QGIS, data analysis, government GIS systems.

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.

The shapefile was introduced by Esri in the early 1990s with ArcView GIS, and Esri published its technical description in 1998. It is not a formal standard, yet three decades of use have made it the most widely accepted exchange format in desktop GIS.
A shapefile is a set of files sharing one base name: .shp holds the geometry, .shx an index into it, .dbf the attribute table in dBASE format, .prj the coordinate system and .cpg the text encoding. Each shapefile stores exactly one geometry type — points, lines or polygons.
ArcGIS, QGIS, MapInfo, Global Mapper, GRASS GIS, GeoPandas, PostGIS (through shp2pgsql) and GDAL read and write shapefiles, and AutoCAD Map 3D and many surveying packages import them.
Support is universal and fast, the structure is simple to implement, and public agencies and contractors routinely request it. The attribute table opens even in tools that know nothing about geometry but understand dBASE.
Field names are capped at ten characters, text fields at 254 characters and each component file at 2 GB. One geometry type per file means a map becomes several shapefiles, and losing a companion file breaks the dataset.
osm2cdr delivers a ZIP in which every layer — roads, buildings, water, greenery, points of interest — sits in its own folder as a complete .shp, .shx, .dbf and .prj set, with a README describing the contents. OpenStreetMap attributes are written in UTF-8, and coordinates are WGS 84.
At the most basic level, DXF is an openly documented CAD drawing exchange format, while Shapefile is a multi-file vector format created by Esri. On disk, DXF is usually plain ASCII text, which makes files large but readable; Shapefile is binary geometry files plus a dBASE attribute table.
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 Shapefile when the data goes into a desktop GIS workflow or to an agency that asks for shapefiles.
A surveyor needs a base drawing for a topographic plan in CAD. DXF gives named layers and metric coordinates that fit drafting habits and title blocks.
A GIS analyst wants to join building footprints with census or cadastre data. Shapefile carries OSM attributes in a table, which DXF cannot hold in a usable form.
You import data into a CAD-GIS hybrid such as AutoCAD Map 3D or QGIS. Both formats work there; choose by whether attributes or drawing structure matter more for the task.
Converting a shapefile to DXF drops the attribute table, so building type or name survives only as layer names or text at best. Converting DXF to shapefile requires splitting entities by geometry type, and blocks, hatches and text do not become meaningful features. Coordinates differ as well: osm2cdr's shapefile is in WGS 84 degrees, while its DXF is in metres in a UTM zone or a national grid, so overlaying them needs reprojection.
Many teams need both: the CAD department works on the DXF while the GIS department keeps the shapefile with attributes as the reference dataset. Exporting both for the same area from osm2cdr gives each team a native file without a lossy conversion between them.
On osm2cdr, pick DXF for drafting and CAD-based design. Pick Shapefile when you need attributes, spatial analysis or delivery into a GIS department.
osm2cdr builds DXF and Shapefile 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 Shapefile explain each route in more detail:
DXF is an openly documented CAD drawing exchange format, whereas Shapefile is a multi-file vector format created by Esri. In the comparison table, DXF is ahead on CAD software; Shapefile is ahead on GIS software, attributes and projections (CRS).
DXF. Reach is its main strength: when you do not know which program the recipient uses, DXF is the safest bet.
When GIS software, attributes and projections (CRS) matter most. Support is universal and fast, the structure is simple to implement, and public agencies and contractors routinely request it.
Yes. osm2cdr has a dedicated DXF to Shapefile converter page for existing files. If you are starting from OpenStreetMap, export the area straight to Shapefile instead.
DXF files open in AutoCAD, BricsCAD, NanoCAD, KOMPAS-3D, FreeCAD, LibreCAD and QGIS. Shapefile files open in ArcGIS, QGIS, MapInfo, Global Mapper, GRASS GIS and PostGIS.
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. Shapefile keeps its coordinate system in the .prj companion file; osm2cdr writes WGS 84 (EPSG:4326) with a matching .prj for every layer.