NASJI

Format guide · 6 minute read

What Is a DWG File?

A DWG file is a CAD drawing in the native binary format most of the world’s technical drawings are saved in. Here is what it holds, how it is built, every version since 1992, how big it should be — and how to open one on whatever device you have.

DWG in two sentences

DWG — “drawing” — is the binary file format introduced with the industry standard CAD program in 1982 and used since then by nearly every 2D and 3D drafting application, either natively or through licensed libraries. It is a container for vector geometry (lines, arcs, polylines, splines), the annotations around it (text, dimensions, hatches, leaders), and the organising structure that makes a drawing more than a picture: layers, blocks, styles, layouts and the settings of the drawing itself.

It is not an open standard. The format has been reverse-engineered by an industry consortium and by independent developers, which is why many programs can read and write it, but the specification is controlled by one vendor and changes with its releases. That is the single most important thing to know about a .dwg file: it has a version, and the version decides who can open it.

What is inside a DWG file

Open a DWG in a hex editor and the first six bytes are its version word — AC1032 for the 2018 format, AC1015 for 2000. After that comes a file header, a set of sections, and in every format since 2004, compression and a checksum over each section. Inside the sections, the drawing is a set of objects, each with a unique handle, each pointing to others by handle:

  • Entities — the things you see. LINE, LWPOLYLINE, CIRCLE, ARC, ELLIPSE, SPLINE, TEXT, MTEXT, HATCH, DIMENSION, INSERT (a placed block), and some thirty rarer kinds.
  • Tables — layers with their colour, linetype and on/off state; linetypes; text styles; dimension styles; the named views and viewport configurations.
  • Blocks — reusable groups of entities defined once and inserted many times: a door, a chair, a bolt. Model space and each paper-space layout are technically blocks too.
  • Objects — everything that is not drawn: dictionaries, groups, layouts, plot settings, table and multileader styles, and the “proxy” data that add-on applications store.
  • The header — hundreds of drawing variables: units, extents, current layer, dimension defaults, the linetype scale, the last save time.

Because every entity carries a layer and every layer carries a colour and a linetype, a DWG describes not only what is drawn but how it should look and plot. That is why converting a DWG to a picture is a rendering job, and why a converter that decodes the file properly — rather than screenshotting a viewer — gives you a PDF or SVG with the right colours, dashes and text.

DWG versions, from R12 to 2018

The format has changed nine times in a way that matters. Each change is named after the release that introduced it and stamped into the file as its version word. A program can open its own version and every earlier one; it cannot open a later one.

DWG file format versions
Version wordReleaseYearWhat changed
AC1009R11 / R121990 – 1992The oldest release still in circulation; the format every reader supports.
AC1012R131994First object-based format: dictionaries, handles for every object.
AC1014R141997Lightweight polylines (LWPOLYLINE), hatch boundaries stored with the hatch.
AC10152000, 2000i, 20021999Multiple layouts, lineweights, the DXF that most exporters still write.
AC10182004, 2005, 20062003Compressed, encrypted section map; tables, fields, true colour.
AC10212007, 2008, 20092006Reed–Solomon coding of the whole file, Unicode text, multileaders.
AC10242010, 2011, 20122009Parametric constraints, per-object handle streams.
AC10272013, 2014 – 20172012Solid-modelling data moved into its own section (AcDs).
AC10322018 – today2017The current format; 2019 to 2026 releases still save it unchanged.

Two practical consequences. First, “which version is this?” is answered by the first six bytes — the viewer on this page reads it and tells you. Second, when a colleague cannot open your file, the answer is almost always to save it down: the DWG to DXF converter writes an R2000-era file anyone can read, and the DWG converter on that page family writes 2013, 2010, 2004, 2000 and R14 encodings directly.

Binary, and why that matters

DWG is a tightly packed binary format: coordinates are stored as raw doubles, flags as single bits, and since 2004 whole sections are compressed. The upside is size and speed — a DWG is typically a quarter to a fifth the size of the same drawing as DXF, and a CAD program opens it without parsing text. The downside is opacity: you cannot read it, diff it, or fix it by hand, and a damaged byte in the wrong place makes a file unreadable rather than slightly wrong. Its text twin, the DXF file, exists precisely to trade the first set of properties for the second.

How big is a DWG file?

A residential floor plan: 200 KB to 2 MB. A mechanical assembly drawing: 1 to 5 MB. A site survey with contours: 5 to 30 MB. A drawing that is 80 MB is almost never 80 MB of drawing — it is unpurged block definitions, an embedded raster image, thousands of hatch loops, or data left behind by a vertical application. Any CAD’s purge command, followed by a save, is the fix, and it is worth doing before you send a file to anyone.

What programs read DWG files

Every mainstream CAD program, native or through a licensed reader. Browser viewers like the one below. 3D modellers and BIM tools import it. Open-source 2D CAD generally prefers DXF — convert once and you are through. What does not read DWG: office suites, image viewers, phones out of the box. For those, a PDF, a PNG or a browser viewer is the way.

How to open a DWG file

On Windows or a Mac: drop the file on the viewer below. It opens in your browser, on your machine, with nothing uploaded and nothing installed, and because it is a full CAD you can measure, print and edit. For offline work, the same program is a free desktop app.

On an iPhone, iPad or Android device: the same page. Tap Open a file, choose the DWG from Files, Drive or an e-mail attachment, and it opens in touch mode. Add the page to the home screen and it becomes an app.

To send it to someone without CAD: convert it to PDF first. The step-by-step guide covers every route.

Try it: open a DWG in your browser

Go to the DWG viewer Zoom, measure, layers, print, edit, save — free.

DWG files — frequently asked questions

What does DWG stand for?

Drawing. It is not an acronym — the extension is simply the word shortened to three letters, as file names required in the early 1980s when the format appeared. A .dwg file is “a drawing”, in the same way a .doc was “a document”.

Which program opens DWG files?

Every serious CAD program reads DWG natively, and so does a growing list of viewers and web tools. You do not need the program that created it: the free viewer on this page opens DWG R12 to 2018 in a browser, and the NASJI desktop app does the same offline on Windows and macOS. Open-source 2D CAD (LibreCAD, QCAD) reads DWG through converters or plug-ins; a DWG to DXF conversion removes that step.

Is DWG the same as DXF?

No. DWG is the compact binary file a CAD program works in; DXF is the same drawing written out as text so other programs can read it without decoding the binary. They hold the same 2D content. DWG is smaller and faster to open; DXF is universal. The DWG vs DXF guide goes through when to use which.

Why won't an old program open a new DWG?

Because DWG is versioned and only backward compatible: a 2018-format file is unreadable to a program that predates 2017, while that program's own files open fine in anything newer. The fix is to save the drawing in the older version — 2013, 2010, 2004, 2000 or R14 — which this site's DWG converter does in one step.

How big is a typical DWG file?

A floor plan or a mechanical part is usually 100 KB to 5 MB. Files balloon when they carry unused block definitions, dense hatching, embedded images or leftover data from add-ons — a 60 MB DWG is almost always a 6 MB drawing with baggage. Purging unused items in any CAD brings it back down.