The DXF file format
DXF is Autodesk's documented exchange format for CAD drawings — the common language between AutoCAD and the many CAD, CAM and graphics programs that do not read DWG.
Open a DXF file nowWhat is a DXF file?
A DXF file holds the same kind of content as a DWG — geometry such as lines, arcs and polylines, plus text, dimensions, hatches and block references, all organized on layers — in a form that other software can read without Autodesk's own code. Autodesk publishes the specification, which is why nearly every CAD program, CAM system, laser-cutter driver and vector graphics editor can import and export it.
The price of that openness is size and fidelity. A DXF is considerably larger than the equivalent DWG, and objects that are specific to AutoCAD or to an add-on product may arrive simplified, or not at all, in another program. For plain 2D geometry, which is what most exchanged files contain, the format does its job well.
How a DXF is structured
An ASCII DXF is a long list of pairs: a numeric group code on one line and its value on the next. The code says what the value means — 0 starts a new object and names its type, 8 gives the layer, and 10, 20 and 30 are the X, Y and Z of a point. The pairs are grouped into sections, among them HEADER with drawing settings such as the version and the units, TABLES with layers, linetypes and styles, BLOCKS with block definitions, ENTITIES with the geometry itself and OBJECTS with non-graphical data. The file ends with EOF.
Binary DXF stores the same pairs in a compact binary encoding and starts with the signature AutoCAD Binary DXF. It is smaller and faster to load but far less common, and some importers accept only the text form.
DXF versions
DXF has grown with AutoCAD, and a file normally states its version in the $ACADVER header variable, using the same codes as DWG: AC1009 for R11 and R12, AC1012 for R13, AC1014 for R14, AC1015 for the 2000 format, AC1018 for 2004, AC1021 for 2007, AC1024 for 2010, AC1027 for 2013 and AC1032 for 2018. Minimal R12-style files may omit the header altogether.
Two generations matter most in practice. R12 is the lowest common denominator that old machine controllers and simple importers understand; it predates splines, ellipses and multi-line text as object types, so programs that export to R12 approximate such objects with simpler ones. The 2000 format and its successors keep them intact and, from 2007 on, store text as UTF-8. When a recipient cannot say which version they need, the 2000 or the 2010 format is a sensible choice.
How to open and convert a DXF
Nearly every CAD program opens DXF, and so does the DXF viewer on this site: drop the file and it is displayed in the browser with its layers, ready to be measured, without being uploaded. ASCII and binary files from R12 to the 2018 format are read. Because an ASCII DXF is plain text, you can even look inside with a text editor, though only short files are pleasant to read that way.
To pass a DXF on to someone without CAD software, convert it: PDF for printing and approval, SVG for web pages, vector editors and cutting software, PNG for a quick picture. When the recipient works in AutoCAD and asks for a DWG, the DXF to DWG converter produces one in the AutoCAD 2000 format, the DWG version that all releases from AutoCAD 2000 onward can open. To find out what a file contains before you import it, the DWG & DXF inspector lists its layers, blocks, object counts and units.
Frequently asked questions
What is the difference between DXF and DWG?
DWG is the native, undocumented binary format that AutoCAD works in; DXF is the published exchange format derived from it. Use DWG between AutoCAD users and DXF whenever another program — especially CAM or cutting software — has to read the drawing.
Is DXF a 2D or a 3D format?
Both. Most DXF files in circulation are flat 2D drawings, but the format has Z coordinates throughout and can carry 3D lines, faces and meshes. Solid models are embedded as ACIS data that few programs other than AutoCAD interpret.
What units does a DXF use?
Coordinates are unitless numbers. Newer files state the intended unit in the $INSUNITS header variable — 1 for inches, 4 for millimeters, 6 for meters — but older files and many exports leave it unset, so it is worth measuring a known dimension after import.
Why does my DXF look wrong in another program?
Usually because of version or font differences. An importer that expects R12 may skip splines or hatches from a newer file, and text is redrawn with whatever font the receiving program substitutes. Exporting to an older DXF version solves many cases.
Can I convert a DXF to PDF, SVG or DWG for free?
Yes. The DXF to PDF, DXF to SVG and DXF to DWG converters run in the browser, and three conversions a day are free across them; PNG images up to 2048 pixels are free without a daily limit.
Free tools for DXF files
DXF Viewer
View ASCII and binary DXF files, check layers and measure. No upload.
DXF to PDF
Turn DXF files into printable PDFs on the sheet and at the scale you choose.
DXF to DWG
DWG files from DXF drawings, written in the AutoCAD 2000 format.
DXF to SVG
True-to-size SVG from DXF files for cutters, editors and the web.
DXF to PNG
Preview images of DXF files — PNG, free up to 2048 px.
DWG to DXF
DXF from DWG, in the 2000 to 2018 format of your choice.
DWG & DXF Inspector
List the layers, blocks, object counts, units and extents of a drawing.