Format guide · 5 minute read
DWG vs DXF: What Is the Difference?
Same drawing, two spellings. DWG is the compact binary a CAD program works in; DXF is the same content as text that any program can read. Which one to use depends on where the file is going — here is the whole picture, with the tools to convert either way.
Two formats, one drawing
Both formats date from 1982, both come from the same program, and both describe a drawing the same way: a header of settings, tables of layers and styles, block definitions, and a list of entities each of which sits on a layer and carries a colour. DWG stores that as packed binary — coordinates as raw doubles, flags as bits, whole sections compressed. DXF stores it as text: a group code on one line, a value on the next, from the first byte to the EOF at the end. A CAD program can save the same drawing as either, and the conversion between them is lossless for 2D work.
The difference that drives every other difference is that DWG’s specification is private and DXF’s is published. Programs read DWG through reverse engineering or licensing; they read DXF from the documentation. That is why DXF is the format everything supports, and why DWG is the format that occasionally refuses to open.
Side by side
| DWG | DXF | |
|---|---|---|
| Encoding | Binary, compressed since 2004 | Text (ASCII); a rarer binary variant |
| Specification | Proprietary; reverse-engineered by others | Published |
| Size, same drawing | 1× | 3 – 5× (compresses to well under 1× with zip) |
| Opens in | CAD programs, viewers | CAD, cutters, GIS, illustration tools, scripts |
| Versioning | Nine incompatible versions; newer files refuse older programs | Readers skip what they do not know; R2000 opens everywhere |
| Holds 2D drawing content | Everything | Everything |
| Holds 3D solids | Yes | As opaque data only |
| Embedded preview image | Yes | No |
| Readable and fixable by hand | No | Yes |
| Damage tolerance | One bad byte can lose the file | Truncate it and you lose the tail, not the file |
Size and speed
A 2 MB DWG becomes a 6 to 10 MB DXF; a drawing dense with hatch loops can go higher. The DWG opens faster in a CAD program because there is nothing to parse — the bytes map straight onto the program’s structures. None of this matters much on a laptop and a modern connection, and a zipped DXF is smaller than the DWG anyway. It matters when files go by e-mail with attachment limits, and when a site survey with 200,000 contour vertices has to load on a tablet.
Compatibility and versions
DWG has nine incompatible versions between R12 and 2018, and a program opens its own and older, never newer. That is the most common reason a DWG “won’t open”: it was saved by a newer release. DXF is also versioned, but readers skip group codes they do not recognise, so an old program opens a new DXF and simply ignores the entities it never heard of. In practice, almost everything writes R2000 DXF (AC1015) for exchange, because everything reads it.
The converters on this site read every DWG version and write DXF R2000; the DWG writer can save down to 2013, 2010, 2004, 2000 or R14 when the recipient’s program is older than your file.
Fidelity
For 2D content there is no difference: layers, blocks, polylines with arcs, splines, hatches with their patterns, dimensions with their styles, MTEXT with its formatting, layouts — all of it round-trips. DXF carries 3D solids only as opaque modelling data, does not embed the preview thumbnail, and keeps the private objects of vertical applications as proxies it cannot interpret. If your drawing is flat, pick on convenience; if it is a solid model, stay in DWG or use a 3D exchange format.
Which one to use
- Working in one CAD program: DWG. Smaller, faster, keeps everything.
- Sending to a laser, plasma, router, vinyl cutter or CAM software: DXF. Check the units and closed outlines first.
- Sending to another CAD user: DWG if you know their program and version; DXF if you do not.
- Sending to someone without CAD: neither — a PDF or PNG.
- Importing into illustration, GIS or 3D software: DXF, or SVG for illustration tools.
- Generating drawings from a script: DXF — it is text you can write.
- Archiving: both; DXF if only one.
Converting between them
DWG to DXF reads any DWG release and writes an R2000 ASCII DXF with the drawing’s full structure. DXF to DWG does the reverse into a native 2018 DWG. Both are free, need no account, and take a file of up to 100 MB. To look at either format without converting anything, the viewer below opens both in your browser without an upload.