AutoCAD Drawing Interchange Format

.dxf · CAD

DXF (Drawing Interchange Format, often also called Drawing Exchange Format) is the open counterpart of DWG. Autodesk publishes its description, so practically every CAD, CAM, GIS and vector program reads it. That makes DXF the language of the workshop: laser, waterjet and plasma cutting, CNC routers, vinyl and cutting plotters. When a cutting shop says “send us the DXF”, it means a clean 2D outline at 1:1.

History and versions

DXF arrived with AutoCAD 1.0 in December 1982, and Autodesk has updated the DXF Reference with almost every release since. A DXF uses the same version codes as DWG, stored in the header variable $ACADVER: AC1009 is R12, AC1015 AutoCAD 2000, AC1032 AutoCAD 2018 and later. R12 is still the safe lowest common denominator. Many machines and older CAM programs accept nothing newer, because R12 knows only simple entities. Splines (R13) and lightweight polylines (LWPOLYLINE, R14) came later.

How a DXF file works

An ASCII DXF is plain text made of pairs of lines. The first line is a group code (a number), the second its value. Code 0 starts an entity, 8 is the layer, 10/20 the X/Y of the start point, 11/21 the end point. A single line on the layer CUT looks like this:

0
SECTION
2
ENTITIES
0
LINE
8
CUT
10
0.0
20
0.0
11
120.0
21
40.0
0
ENDSEC

The file has sections HEADER, CLASSES, TABLES (layers, line types, text styles), BLOCKS, ENTITIES and OBJECTS, and ends with EOF. Because it is text, a DXF is several times larger than the same DWG, but you can open it in Notepad and check the version, the layers or the units yourself.

Since Release 10 there is also a binary DXF. It starts with the 22-byte sentinel AutoCAD Binary DXF, according to Autodesk takes about 25 % less space and keeps full floating-point precision. Few CAM programs read it. If a DXF looks like gibberish in Notepad and starts with that sentence, it is binary.

What DXF does not store: units in a binding way, embedded images and fonts, or reliable 3D solids (they travel as ACIS data that most programs ignore).

How to open DXF

  • LibreCAD and QCAD Community Edition (Windows, macOS, Linux, free): view, edit and save DXF, including R12.
  • FreeCAD for 2D and 3D work, Inkscape for importing an outline into a vector graphic.
  • DWG TrueView (Windows) or Autodesk Viewer in the browser.

Common problems

DXF has the wrong scale (laser cut 25.4 times smaller)

Coordinates in DXF are just numbers. The header variable $INSUNITS may say “millimetres”, but many CAM programs ignore it and assume inches or millimetres on their own. Agree on the unit and check one known dimension after import. A factor of 25.4 means an inch/millimetre mix-up, 1000 metres versus millimetres.

DXF won’t open in CAM or “unsupported version”

Save it as R12 or 2000 in LibreCAD or QCAD. Check it is not a binary DXF.

Curves are jagged or not cut at all

The machine does not understand splines or ellipses. Convert them to polylines or arcs before export, or export as R12, which approximates them with short segments. Also remove duplicate lines: the laser cuts each one twice.

Garbled accents in text

Up to R2004 the text encoding follows the code page in $DWGCODEPAGE; since R2007 a DXF is UTF-8. A program that guesses wrong shows broken accented letters.

DXF opens empty

The drawing is usually far from the origin, typical for surveys in national coordinate systems. Use “zoom extents”.

Converting DXF

DXF to PDF, SVG, PNG or JPG gives a quick preview for someone without CAD. Our converter renders model space at 200 dpi on a white background. Layouts are not drawn and the result is not to exact scale. DXF to DWG always produces AutoCAD 2018 format (AC1032).

The other way: a logo or sign in SVG, PDF, EPS or AI can be converted to DXF for cutting (from PDF only the first page). Convert text to paths in the source first and check the size after import. Raster images such as JPG contain no outlines and cannot become a usable DXF this way. A DXF from a surveyor can also be converted to GIS formats such as Shapefile or GeoPackage; DXF carries no coordinate system, so it has to be assigned in the GIS. If you have a DWG, see DWG to DXF.

DXF at a glance

DeveloperAutodesk
First releaseDecember 1982, AutoCAD 1.0
Current versionAC1032 (AutoCAD 2018 and later)
Specificationpublic, Autodesk DXF Reference
Typetext (ASCII, UTF-8 since R2007) or binary, 2D and 3D vector
Compressionnone
Typical useexchange between CAD programs, laser and CNC cutting, GIS

More: Library of Congress format description.

We can convert DXF into

Documents

PDFPDF/A

Spreadsheets

XLSX XLSODSDBFDIFFODSOTSSLKUOSXLSMXLTXLTXGNUMERIC

Images

JPG PNGWEBP GIF TIFFHEICAVIFJXLPSDICOAAIAPNGARTAVS BMP CINCURDCXDDSDPXFF FITSFL32 HDRHRZJP2JBIGJNGJPCMNGMTVOTBPALMPAM PBMPCD PCXPFMPGMPGXPHMPICTPPMPSBPTIFQOIRASRGFSGISIXELSUN TGAVICARVIFFVIPS WBMPXBMXPMXWDDCM

Vector images

SVG EPSEMFFXGHPGLPOV PSSIFSVGZWMFXAML

eBooks

EPUB MOBI AZW3 FB2CBZHTMLZ LIT LRF OEB PDB TCRTXTZCB7CBTDJVU

GPS

GPXKML

CAD

DWG

Data

CSVJSONXMLYAMLSQLTSVJSONL

GIS and maps

GEOJSONSHPGPKGGMLFGBGEOJSONLGMTJMLMIFSQLITETAB