What is the DWG file format?
Files with the .dwg extension contain 2D or 3D drawings and their metadata, stored in a proprietary binary format. The name originates from the English word for a DraWinG. It is the native format for AutoCAD and several other CAD applications.
The format derives from Mike Riddle's Interact CAD software, developed in the late 1970s; Autodesk licensed and adopted it in 1982 as the foundation for AutoCAD 1.0. Since then, more than 20 distinct format versions have been released, each identified by a 6-character ASCII string at the very start of the file - for example, AC1032 for AutoCAD 2018 through 2026, or AC1027 for 2013-2017.
Related file types often appear alongside .dwg:
.bak- automatic backup copy of a DWG file.dws- drawing standards file.dwt- drawing template file.sv$- temporary autosave file
Numerous open-source libraries have been created to read .dwg files, but none has reached 100% compatibility with the proprietary format. Beyond native Autodesk tools, the format is supported by many other CAD programs and can be viewed in DWG viewers available online. For interoperability, drawings are often exported to the open .dxf format. Autodesk has long contested competing uses of the DWG brand name, and the registered MIME type for the format is image/vnd.dwg.
Security & safety
RISK: MEDIUMDWG files can carry executable automation: AutoLISP/VBA code can be loaded alongside drawings (acad.lsp auto-load), and "drawing-borne" malware such as the ACAD/Medre.A worm (2012, stole drawings via infected LSP) and dropper campaigns abusing DWG bundles are documented. AutoCAD mitigates with Trusted Locations and SECURELOAD. Pure viewers (DWG TrueView, ODA, web viewers) do not execute embedded code and are the safe way to inspect files from unknown sources. Also note: DWG attachments are a known industrial-espionage target - the drawings themselves are often the asset being stolen.
Format details
in a nutshellPrograms that open DWG files
Technical details
deep spec| File signature | ASCII "AC10" at offset 0, followed by 2 digits identifying the format release (e.g., AC1032) |
| Encoding | Proprietary binary; not human-readable |
| MIME type | image/vnd.dwg |
| Current format version | AC1032 - covers AutoCAD 2018 through 2026 |
| Geometry support | 2D and 3D entities: lines, arcs, polylines, splines, 3D solids, meshes and surfaces |
| Layer system | Named layers with individually assignable color, linetype, lineweight and visibility |
| Block definitions | Reusable named symbol blocks with insertable attributes and support for nested blocks |
| External references (XREFs) | External .dwg files linked by path and overlaid or attached at runtime |
| Unicode text support | Full Unicode introduced in AC1021 (AutoCAD 2007); earlier versions used codepage-encoded text |
| Compression | LZ-based section compression introduced in AC1021 (AutoCAD 2007 format) |
| Data integrity | Per-section CRC-32 checksums embedded throughout the file |
| File structure | Header → Class section → Object Map → Object Data sections; page-based allocation from AC1021 onward |
| Object model | Database of typed objects: entities, symbol tables, dictionaries and extension dictionaries |
| Metadata storage | Drawing summary info and custom properties stored in a dedicated header section |
| Released | 1982 (AutoCAD 1.0; format itself derives from Mike Riddle's Interact, late 1970s) |
| Specification | www.opendesign.com |
DWG conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about DWG files.