DWG & DXF: The Complete Guide to AutoCAD File Formats
If you have ever received a file with a .dwg or .dxf extension and wondered how to open it — or what the difference between the two actually is — you are not alone. These two formats sit at the heart of the computer-aided design (CAD) world and have been shaping architecture, engineering, and manufacturing drawings for more than four decades. This guide explains everything you need to know: their history, their internal structure, version compatibility, free viewers, and the best ways to convert them.
A Brief History: AutoCAD R1 to DWG 2024
DWG (short for drawing) is Autodesk's proprietary binary file format, introduced with the very first release of AutoCAD in 1982. Every major AutoCAD release has produced a new DWG version, though the format is not updated every year:
| DWG Version | AutoCAD Release | Year |
|---|---|---|
| R14 | AutoCAD R14 | 1997 |
| 2000 | AutoCAD 2000–2002 | 1999 |
| 2004 | AutoCAD 2004–2006 | 2003 |
| 2007 | AutoCAD 2007–2009 | 2006 |
| 2010 | AutoCAD 2010–2012 | 2009 |
| 2013 | AutoCAD 2013–2017 | 2012 |
| 2018 | AutoCAD 2018–2023 | 2017 |
| 2024 | AutoCAD 2024+ | 2023 |
This version fragmentation is the source of much frustration: a file saved in AutoCAD 2024 format cannot be opened by AutoCAD 2017 without first being "saved down" to the 2013 format.
DXF: The Open Interchange Standard
Also created by Autodesk in 1982, the Drawing Exchange Format (DXF) was designed from day one as a vendor-neutral way to share CAD data with other software packages. Unlike DWG, DXF is documented — Autodesk publishes the full specification — which means any developer can write a DXF reader or writer without reverse-engineering anything.
DXF comes in two flavours:
- ASCII DXF — A plain-text file you can open in any text editor. Human-readable but large.
- Binary DXF — A compact binary encoding of the same data. Faster to parse but not human-readable.
Because DXF is openly documented, virtually every CAD application — from FreeCAD to SolidWorks to Inkscape — can import and export it. This makes DXF the de-facto language of CAD interoperability.
What Is Inside a DWG File?
DWG is a binary format with a well-defined (though undocumented by Autodesk) structure:
- File header — Identifies the DWG version string (e.g.,
AC1032for 2018 format). - Sections — The file is divided into named sections:
HEADER(global variables like units and limits),CLASSES(AcDb class registry),TABLES(layers, linetypes, text styles, dimension styles, block table),BLOCKS(geometry definitions),ENTITIES(the actual drawing objects), andOBJECTS(non-graphical data). - AcDb classes — AutoCAD's internal object model; each entity (line, arc, polyline, hatch, dimension) is an instance of a registered AcDb class.
- CRC checksums — Sections are protected with cyclic redundancy checks to detect file corruption.
Because the format is proprietary, the open-source ODA File Format Alliance (formerly the OpenDWG Alliance) has spent decades reverse-engineering DWG to produce the ODA libraries, which power many third-party CAD applications.
Free Viewers and Converters
You do not need to buy AutoCAD to view or convert DWG/DXF files. Here are the best free options:
Desktop Viewers
- Autodesk DWG TrueView — Autodesk's own free viewer; also lets you batch-convert between DWG versions. Windows only.
- eDrawings Viewer (Dassault Systèmes) — Clean interface, supports DWG/DXF as well as STEP and IGES. Windows + macOS.
- LibreCAD — Fully open-source 2D CAD editor built on the ODA libraries. Runs on Windows, macOS, and Linux. Can open and export DXF natively.
- FreeCAD — Open-source parametric 3D modeller with solid DXF import/export support.
- Onshape — Browser-based CAD platform; import DWG/DXF files directly in your browser, no installation required.
Online Converters
- KaijuConverter — Upload your DWG or DXF and convert to PDF, SVG, PNG, or other formats in seconds.
- Convertio, CloudConvert — General-purpose online converters with CAD format support.
DWG vs DXF: Which Should You Use?
| Scenario | Recommended Format |
|---|---|
| Sharing with another AutoCAD user | DWG (same version) |
| Sharing with a non-AutoCAD CAD user | DXF |
| Sending to a laser cutter / CNC | DXF |
| Publishing for review (no editing) | PDF from DWG/DXF |
| Web display | SVG converted from DXF |
STEP vs DXF for 3D CAD
DXF is primarily a 2D format. Although AutoCAD has supported 3D entities in DXF for many years, the 3D data is not always round-tripped correctly by other applications. For 3D mechanical CAD exchange, STEP (ISO 10303) is the professional standard — it carries full solid geometry, assembly structure, and metadata that DXF cannot represent reliably.
Flattening 3D to 2D DXF
If you receive a 3D DWG and need a 2D DXF for a laser cutter or plotter:
- In AutoCAD, set your view to the desired orientation (Top, Front, etc.).
- Use the
FLATSHOTcommand to create a 2D block from the current view. - Export the result as DXF R2000 (2000 format is the most broadly compatible).
In FreeCAD: open the 3D file, select the face(s) you need, use Draft → Shape to 2D View, then export as DXF.
Layer Management Best Practices for DXF Exports
- Name layers descriptively (e.g.,
WALLS,DIMENSIONS,ANNOTATIONS) rather than using default numeric names. - Purge unused layers before export (
PURGEcommand in AutoCAD) to reduce file size. - Avoid layer 0 for actual geometry — layer 0 has special inheritance behaviour that can cause unexpected colour or linetype changes in receiving software.
- Embed fonts as shapes if the receiving software may not have your custom SHX or TTF fonts; otherwise, text may render as rectangles.
- Use standard linetypes (CONTINUOUS, DASHED, CENTER) rather than complex custom linetypes, which are rarely supported outside AutoCAD.
Practical Tips for Sending CAD Files to Non-AutoCAD Users
- Save down to R2000 format when sending DWG — it is the most universally readable DWG version outside AutoCAD.
- Always include a PDF alongside the DWG/DXF so recipients can at least view the drawing without any CAD software.
- Bind xrefs (
XBINDorETRANSMITin AutoCAD) so external references are embedded in the file rather than missing on the recipient's machine. - Specify units explicitly in the DXF HEADER section — ambiguous unit scales (millimetres vs inches) are the number-one cause of drawings arriving 25.4× too large or too small.
- Use DXF ASCII over binary DXF when troubleshooting — a text editor lets you inspect the file and diagnose issues.
Summary
DWG and DXF have been the backbone of digital drafting since 1982. DWG offers the richest feature set and tightest AutoCAD integration but carries version compatibility baggage. DXF sacrifices some fidelity for openness and portability, making it the format of choice for cross-application exchange, CNC/laser workflows, and archiving. Free tools like LibreCAD, FreeCAD, DWG TrueView, and online converters mean you never need to pay for AutoCAD just to view or convert these files.
Related conversions
Frequent conversions across the catalogue: