DXF vs DWG: What Is the Difference?
DWG is AutoCAD's working format; DXF is the documented format for exchange.
DWG and DXF can hold the same drawing: lines, arcs, text, blocks, layers and dimensions. The difference is who can read them and what they are for.
DWG: AutoCAD’s own format
DWG is the format AutoCAD saves by default. It is a compact binary format, and Autodesk does not publish a full description of it. Other programs read and write DWG through software that was built by studying the format, mostly the libraries of the Open Design Alliance, an industry group. That is why some free programs cannot open DWG at all, and why a DWG saved by a new AutoCAD version sometimes will not open in an older program.
DXF: the exchange format
DXF stands for Drawing Exchange Format. Autodesk introduced it with the first versions of AutoCAD in the early 1980s, so that other programs could read and write AutoCAD drawings, and it publishes a DXF reference for each release. A DXF file is usually plain text: pairs of lines, each a numeric code followed by a value. A binary variant exists but is rare.
Because DXF is documented, almost every CAD, CAM, laser cutting, CNC, vinyl cutting and vector design program can read it. That makes DXF the usual choice when a drawing leaves the program it was made in.
Side by side
| DWG | DXF | |
|---|---|---|
| Made for | Working in AutoCAD and compatible programs | Exchanging drawings between programs |
| Documented by Autodesk | No | Yes, a DXF reference for each release |
| Storage | Binary, compact | Usually text, often several times larger |
| Read by free programs | Some, through extra converters | Almost all |
| Typical use | Sharing with other AutoCAD users | Laser cutting, CNC, cutting machines, other CAD programs |
Versions
Both formats change with AutoCAD releases, but not every year. A version is named after the release that introduced it, and the same code appears in DWG headers and in the $ACADVER entry of a DXF file. The code identifies the format, not the exact program: AC1032 is the 2018 format, which AutoCAD 2018 and every later release so far still write.
| Code | Format | Used by AutoCAD releases |
|---|---|---|
| AC1009 | R12 | R11 and R12 |
| AC1014 | R14 | R14 |
| AC1015 | 2000 | 2000 to 2002 |
| AC1018 | 2004 | 2004 to 2006 |
| AC1021 | 2007 | 2007 to 2009 |
| AC1024 | 2010 | 2010 to 2012 |
| AC1027 | 2013 | 2013 to 2017 |
| AC1032 | 2018 | 2018 and later |
Older formats cannot store some newer objects. R12 DXF, for example, has no lightweight polylines, splines or ellipses, so programs convert them into older object types when saving. For machines and programs that accept only old files, R12 or 2000 is still common. For everything else, 2013 or 2018 is a safe choice.
Which one should I use?
- Sending a drawing to someone who uses AutoCAD: DWG.
- Sending a drawing to a laser cutter, CNC shop or a program other than AutoCAD: DXF. Ask which version they want; if they do not know, use 2013 or 2000.
- Looking at a drawing without CAD software: DXF opens in this viewer. A DWG has to be turned into DXF first; the guide to converting DWG to DXF shows how.
What can get lost in DXF?
Ordinary geometry, text, blocks, layers and dimensions survive the trip without loss. Objects created by add-ons and specialised versions of AutoCAD may be stored as simplified “proxy” graphics, and links to external files, such as images and other drawings, stay links: the files they point to are not included in the DXF.