DWG — AutoCAD's Native Format: What It Is, History Since 1982, How to Open and Export from OpenStreetMap

2026-03-289 min read
DWGCADAutoCADAutodeskbinary

DWG is the native binary drawing format of AutoCAD, alive since December 1982. Unlike text-based DXF, a DWG file is three to five times more compact and preserves everything AutoCAD knows how to store: external reference (xref) links, OLE objects, custom entities from vertical applications like Civil 3D and Architecture. Over forty-plus years the format has lived through eighteen incompatible binary dialects, each major AutoCAD release shipping a new magic number — from AC1009 in AutoCAD 12 to AC1032 in AutoCAD 2018. On osm2cdr.ru DWG export runs in Beta: if ODA File Converter is available on the worker, the output is genuine binary DWG; otherwise you get an equivalent DXF with an honest X-Actual-Format header. This guide covers how DWG is built, its history from Mike Riddle through today's Autodesk, AutoCAD alternatives, and the concrete workflow for getting an OpenStreetMap area into CAD.

Map generation of Amsterdam city center
Nevsky Prospect, 200×200 m fragment, DWG export from osm2cdr.ru, opened in BricsCAD — a free AutoCAD alternative.

History: from Interact CAD to industry standard

A common misconception is that Autodesk invented DWG. In reality the format was born in a tiny company called Interact CAD, founded by American engineer Mike Riddle between 1977 and 1979. Riddle wrote one of the first CAD programs for S-100 bus microcomputers and stored drawings in his own binary format with a .dwg extension. When in 1982 a young Autodesk team was looking for a ready CAD engine to launch AutoCAD 1.0, the Interact CAD license became the product's foundation. Riddle took royalty shares, the format got global distribution.

The first public AutoCAD shipped in December 1982 writing DWG with marker AC1.40. Major upgrades followed: AC1.50 in 1983, AC2.10 in 1986, AC1004 in AutoCAD 9 (1987), AC1009 in AutoCAD 12 (1992) — the last legacy dialect modern readers can still open without conversion. Then came the "modern" dialects: AC1012 (R13, 1994), AC1014 (R14, 1997), AC1015 (AutoCAD 2000), AC1018 (2004), AC1021 (2007 — the first UTF-8 version), AC1024 (2010), AC1027 (2013), AC1032 (2018, unchanged through 2025).

A key point: Autodesk has never published a DWG specification. This is a commercial decision separating AutoCAD from competitors. To write a DWG reader you either pay for the Autodesk RealDWG SDK or reverse-engineer the format. In 1998 a group of competing companies founded the Open Design Alliance (ODA) to jointly fund the reverse engineering effort. Modern BricsCAD, NanoCAD, DraftSight, libdwg, dwg2dxf all use ODA Teigha (or a fork) as their lower layer.

What's inside a binary DWG

A DWG file starts with a six-byte ASCII magic word: AC1027 for AutoCAD 2013, AC1032 for AutoCAD 2018+. Any program identifies the dialect from this field instantly and decides whether to even try reading. Next comes an offset to the locator section — a table of pointers to the rest of the file's blocks. Then header variables (AcDbHeaderVariables: dimstyle, units, layer count), the class table (new entities unknown to the base schema), object dictionary, block table, and finally the entities — lines, circles, polylines, text, and complex Civil 3D objects.

Unlike ASCII DXF, DWG uses bit packing: integers shrink to the minimum sufficient bits, floats encode as 64-bit IEEE-754, strings store as UTF-16 with length prefixes. The typical compression versus DXF for the same scene runs 60–80%. For a large district map (tens of thousands of buildings), that's the difference between 25 MB DWG and 80 MB DXF — abstract until you're working over a slow shared drive.

DWG files are read backward-only: AutoCAD 2024 opens any version from R12 (1992) onward, converting to the current format on first save. The reverse does not work — AutoCAD 2018 cannot read a DWG from AutoCAD 2025 without explicit conversion. ODA File Converter is the only free tool that handles all 18 dialects bidirectionally.

Who needs DWG

Architects in the AutoCAD ecosystem are the primary audience. If a whole studio works in AutoCAD Architecture and basemaps arrive as DXF, an engineer spends manual hours cleaning up: rename layers, drop spurious blocks, attach coordinate systems. DWG instead lands in the project unchanged and preserves the layer hierarchy the team is used to.

BIM engineers use DWG as a 2D underlay under Revit 3D models. Revit links DWG as an external reference (Linked CAD) — layers slide under floor plans, and when the basemap changes Revit pulls the fresh version automatically. For this workflow the DWG needs correct units (meters or millimeters) and a north reference.

Urban planners work with AutoCAD Civil 3D, an Autodesk product layered on top of AutoCAD for road and territorial design. Civil 3D stores road profiles, surfaces, parcels as custom objects inside DWG. Without support for these custom entities other programs only see "proxy graphics" — simplified renderings without edit capability. If you need OSM context inside a Civil 3D project, our DWG export handles the base geometry, but Civil-specific objects need Civil 3D itself.

DWG-reading software

AutoCAD. Paid, subscription from 1690 USD/year for full, or AutoCAD LT for 600 USD/year without 3D and LISP. Windows and macOS. The reference for the format. autodesk.com/autocad

BricsCAD. Paid, perpetual license around 360 USD/year (Pro), Linux/Windows/macOS. Belgian product by Bricsys (Hexagon Group since 2018). Full DWG compatibility including custom entities; in benchmarks opens large files faster than AutoCAD itself. bricsys.com

NanoCAD. Paid (NanoCAD Plus around 200 USD/year) and free (NanoCAD Free), Windows. Russian "Nanosoft" product based on IntelliCAD/ODA. Important option for government and defense projects in Russia. nanocad.ru

DraftSight. Paid, around 99 USD/year for Premium, Windows/macOS/Linux. From Dassault Systèmes, the same company that makes SolidWorks. Good choice for SolidWorks users wanting a DWG companion with consistent UI.

LibreCAD and FreeCAD. Free. LibreCAD reads DWG via ODA-fork libdwg, FreeCAD via the same backend. Limited support: simple 2D geometry opens, complex DWG with proxy objects may glitch. Fine for viewing and basic edits.

Autodesk DWG TrueView. Free official viewer from Autodesk, Windows. Doesn't edit but opens any DWG and converts between versions. Best choice if you just need to view.

Pros and cons

Pros. Compactness — three to five times smaller than DXF for identical content. Full native fit for the AutoCAD ecosystem: nothing is lost on import. Support for xref, OLE, custom Civil 3D and Architecture entities. The file holds geometry, layer metadata, and user print setups. Universal distribution: dozens of CAD programs read DWG, and professional engineers expect DWG as a hassle-free import "vaccine".

Cons. Proprietary closed format — all open-source implementations depend on ODA reverse engineering. Eighteen incompatible binary dialects: AutoCAD 2024 won't open a 1990s DWG without conversion. Cannot be opened in a text editor or diffed in git — a serious downside for CAD teams. No native support in browsers and limited support in most GIS tools: QGIS reads DWG via a GDAL plugin with caveats. On our platform — Beta status: if ODA File Converter is temporarily unavailable on the worker, you get a DXF equivalent with an honest warning.

DWG vs DXF: when to pick which

DWG when the recipient is AutoCAD or an AutoCAD-compatible environment (Civil 3D, Map 3D, Architecture). DXF when the file must open anywhere — LibreCAD, FreeCAD, QGIS, KOMPAS-3D, or a scripting pipeline through Python ezdxf. Detailed comparison in the DXF vs DWG guide. Need only AutoCAD plus compactness — pick DWG. Need portability, diffs, or scripting — pick DXF.

How to make a DWG map from OpenStreetMap

The osm2cdr.ru workflow accounts for the DWG Beta status: if ODA File Converter is active, the output is real binary DWG; if not, an equivalent DXF arrives with X-Actual-Format: dxf and a clear UI label. We don't quietly hand over garbage and we don't ignore problems.

Step 1. Open osm2cdr.ru and pick DWG from the format dropdown (CAD category). Notice the "Beta" badge — that's an honest flag.

Step 2. Draw the area on the map. For a city basemap, 1–3 km² (block to district) is optimal. For a master plan, 5–15 km². Planet-scale maps in DWG make little sense — AutoCAD doesn't smoothly handle millions of objects.

Step 3. Pick a coordinate system. For Russian projects, the appropriate MSK zone. For Europe, UTM or a national grid. For the US, State Plane.

Step 4. Style and detail. Cartographic style standard keeps familiar OSM colors mapped to AutoCAD ACI indices. Detail level 4 of 6 is the optimal balance for a city basemap.

Step 5. Click "Export". The Celery queue processes the job in 30–90 seconds for a medium bbox. Download and open in AutoCAD/BricsCAD/NanoCAD via File → Open.

Get a DWG Map of Nevsky in 60 Seconds

Pitfalls

Beta status. Always verify the file's magic bytes before serious work: the first six characters should be AC10xx. If they differ, it's a DXF fallback, and AutoCAD will open it via the import dialog rather than as a native DWG.

Versions. Modern AutoCAD may prompt "save as newest version" on first open — that's normal. If you need to share with an old AutoCAD 2007 team, export Save As → AutoCAD 2007 Drawing.

AutoCAD LT. The lighter version of AutoCAD doesn't support custom entities or LISP scripts. Our basemap is plain lines and polylines without custom objects, so LT opens it without trouble.

Cyrillic. Before AC1021 (AutoCAD 2007), DWG used local code pages (cp1251 in Russia). Our export writes AC1027+ with UTF-16, so Cyrillic labels render correctly.

FAQ

How is DWG different from DXF? DWG is AutoCAD's binary native format, more compact, supports xref/OLE/custom entities. DXF is a text-based exchange format, openly documented, better for integrations.

Can I open DWG without AutoCAD? Yes: BricsCAD, NanoCAD, DraftSight, LibreCAD, FreeCAD, Autodesk DWG TrueView (free official viewer).

Why is the export in Beta? A binary DWG writer requires an Autodesk RealDWG license or ODA Teigha. We use ODA File Converter on top of our DXF — if it's temporarily unavailable on the worker, we hand over honest DXF with a warning.

Which DWG version do you write? AC1027 (AutoCAD 2013) — chosen as the compromise between compatibility and UTF-8 support. AutoCAD 2013 and any newer version opens it without conversion.

Sources

← All articles