DWG vs DXF: what is the difference

Both hold the same drawing: lines, arcs, text, dimensions, layers, blocks. The difference is who can read the file and how much of it survives the trip. DWG is the file AutoCAD saves by default. DXF is the format Autodesk published in 1982 so that other programs could exchange drawings with AutoCAD. Pick by the person on the other end.

DWG: AutoCAD's own file

DWG is a compact binary file and the native format of AutoCAD and the programs built on it. It keeps everything AutoCAD knows about the drawing, including things other programs may not understand, like dynamic blocks or objects made by add-ons.

DWG has versions. AutoCAD 2018 and later save in the 2018 format by default, and an older AutoCAD can't open a newer DWG. If the other person runs an old version, save down with Save As and pick an older format, or use Autodesk's free DWG TrueView to convert it.

Most CAD programs today open DWG: BricsCAD, ZWCAD, DraftSight, progeCAD and others are built around it. Programs outside that world often don't, or do it through a converter.

DXF: the exchange format

DXF stands for Drawing Exchange Format. Its structure is published by Autodesk, and the usual flavour is plain text you can open in a text editor. That is why so much software reads it: laser, plasma and waterjet cutting programs, CNC CAM, 3D CAD like Fusion or SolidWorks, LibreCAD, even Inkscape.

The price is size and detail. A text DXF is several times bigger than the same DWG, and a program that reads DXF takes only what it understands. Simple geometry, layers and text come through almost everywhere; dimension styles, hatches, dynamic blocks and add-on objects may be simplified or dropped.

Which one to send

A short rule:

  • To an architect, an engineer or anyone who works in AutoCAD or a DWG-based program: DWG. Ask which version they run if it might be old.
  • To a laser, plasma or waterjet shop, or into CNC software: DXF, with only the cutting contours on it, at 1:1 in millimetres or inches as they ask.
  • To someone who uses a different CAD program and isn't sure: DXF opens almost everywhere; send the DWG along with it.
  • For your own archive: DWG, since it keeps the most.

Converting between them

In AutoCAD, open either file and use Save As to save it as the other; DXFOUT and DXFIN do the same from the command line. DWG TrueView converts between DWG versions but does not save to DXF. Free programs such as LibreCAD and many online converters handle DXF well and DWG less reliably.

If what you have is not a CAD file at all, but a PDF, a scan or a photo of a drawing, there is nothing to convert yet: the lines have to be drawn first. Horezmi redraws such a drawing and gives you both files, a DWG and a DXF, from the same result.

Questions

Is DXF the same as DWG?

They describe the same drawing, but DWG is AutoCAD's compact native file and DXF is the open exchange format that many more programs can read.

Can I open a DXF in AutoCAD?

Yes, with Open, choosing DXF as the file type, or with DXFIN. Save it as DWG afterwards if you keep working in AutoCAD.

Which format does a laser cutter need?

Almost always DXF, with only the outlines to cut, drawn at real size. Check the units the shop expects.

Try it on your own drawing

The first $5 are free when you sign in. No card, no subscription.