Glyph

Convert DWG to GDSII

DWG-to-GDSII conversion reads AutoCAD's native binary drawing container, decodes its entities, and re-models them as a hierarchical mask layout: closed polygons on numbered layers, blocks as cells, inserts as SREF and AREF placements, all in integer nanometres. The conversion runs entirely inside your browser — the DWG is decoded locally and there is no server to upload it to.

Can I convert DWG to GDSII without installing anything?

Yes. Drop an AutoCAD DWG (R14 to R2018) on the converter on this page and it is decoded and written as GDSII inside your browser tab, with no AutoCAD, nothing installed and nothing uploaded. The converter shows the drawing unit before you convert, preset from the file's own $INSUNITS when that can be read, and each DWG layer becomes a numbered GDS layer, usually on datatype 0: a layer named with a plain number keeps that number, a layer named in KLayout's L1D4 form keeps its layer and datatype, and the names themselves are not kept, because GDSII has no layer-name record. Outlines drawn as separate touching lines and arcs are closed into filled polygons by default, and any contour that stays open is reported in a warning that names its layers.

How to convert DWG to GDSII

  1. Drop your .dwg file onto the converter on this page. Containers from R14 through R2018 are recognised from the file's own magic bytes.
  2. Confirm the drawing unit. The DWG's $INSUNITS is offered as a preset when the header could be read with confidence, but a DWG's declared unit is routinely not what the author meant — check it, because a wrong scale on correct geometry is the most expensive kind of silent import error. Close open contours & heal geometry is checked by default if your drawing is line art rather than filled regions; untick it to convert the file exactly as drawn.
  3. Download the .gds file. Open it in the free Glyph editor to review layers, hierarchy and outlines before handing it on.

What survives and what changes

Aspect What happens
Containers R14 → R2018 (AC1014, AC1015, AC1018, AC1021, AC1024, AC1027, AC1032), including R2007's separate page and compression scheme.
Entities read LINE, CIRCLE, ARC, ELLIPSE, LWPOLYLINE, POLYLINE_2D with its VERTEX records, SPLINE, POINT, INSERT, HATCH, SOLID, TRACE, 3DFACE, TEXT, ATTRIB, ATTDEF, MTEXT and DIMENSION (via its picture block).
Shared pipeline The DWG reader emits DXF group-code pairs into the same document builder the DXF importer uses, so bulge arcs, curve flattening, INSERT resolution, layer tables and orphan-block placement behave identically on both routes.
Curves GDSII has no arc primitive, so arcs, circles, ellipses and splines are flattened to polylines within a chord-deviation budget.
Splines Both representations decode: control points, and fit points with end-derivative vectors. Nothing is dropped, but a fit-point spline's sampled curve is visually close rather than proven identical to the original CAD tool's.
Widened polylines Constant width and per-vertex widths are read onto the GDS path width, so a widened track converts as geometry that exposes rather than as a hairline centreline.
HATCH Reduced to its boundary loops — a hatch is treated as fill intent, not as pattern geometry. The even-odd rule gives island and outer semantics.
DIMENSION Drawn from its own anonymous picture block, as in DXF. One whose picture block is missing is counted and reported, never silently dropped.
Hierarchy An INSERT becomes an SREF, or an AREF when arrayed; block definitions become cells, so the drawing keeps its structure.
Units Read from $INSUNITS, offered only as a preset and confirmed by you, then applied as integer world nanometres.
Layers Named DWG layers become numbered GDS layers, allocated on first use; a numeric layer name claims that number. Shapes land on datatype 0, because the DWG/DXF entity model has no datatype, unless the layer name carries one in KLayout's L1D4 form.
Layer appearance Imported layers default to hollow (outline only), since CAD drawings are usually line art rather than filled mask regions.
Open outlines LINE and ARC entities that only trace an outline enclose no area and convert to zero-width paths. See the next section.
Undecodable data Entities the reader cannot decode are counted and reported, never silently swallowed — a rate of failures is how a decoding bug announces itself.

Why a converted DWG sometimes exposes nothing

A mask writer exposes regions — closed polygons with area. CAD outlines are frequently drawn as separate LINE, ARC and SPLINE entities that merely touch end to end, sometimes with a sub-micron gap. Converted literally, each becomes a zero-width GDS path: a centreline, geometrically correct and completely non-exposing. The file opens cleanly, the picture looks right, and the mask comes out blank.

The close open contours & heal geometry option, checked by default, chains touching segments into closed rings, per (layer, datatype) pair and never across layers, with an endpoint tolerance that scales with the drawing (0.1 % of its diagonal, kept between 100 nm and 10 µm); it also merges duplicate/overlapping segments and drops zero-length remnants. A chain that still does not close is force-closed only when it encloses real area (default 10 µm²). Keying the decision on enclosed area rather than on gap size is what lets a sloppy gap in a genuine outline close while a leader line or centreline — open by nature, enclosing nothing — stays open instead of becoming a slit of exposed resist.

Every removal is counted and reported, whether or not healing is on: chains that stay open keep the paths they came from, but exact-duplicate and overlapping segments are merged away. The same option is available in the editor under Arrange → Close open contours….

Why DWG and GDSII both exist

DWG is AutoCAD's native binary drawing container — a general drafting format with named layers, native arcs, floating-point coordinates and a rich entity set. GDSII describes photomask and IC layout: numbered (layer, datatype) pairs, closed filled polygons, integer database units, and array references. Converting between them re-models the drawing rather than re-encoding it.

Because DWG and DXF share one entity model, the trade-offs are the same in both directions — see DXF vs GDSII for the full side-by-side, and convert DXF to GDSII if your tool can export DXF instead. For the destination format's record structure, see the GDSII file format reference.

Open it in the editor

A converted DWG usually needs layer mapping, datatype assignment and an outline check before it is a mask. Open in the free Glyph editor to do that — nothing to install, and your files never leave your browser. See Layers and Cells & hierarchy, and run a design-rule check before exposure.

Glyph is made by NANYTE. For where a finished layout goes next, read NANYTE's maskless lithography overview.

Frequently asked questions

Can I convert DWG to GDSII without installing anything?

Yes. Drop an AutoCAD DWG (R14 to R2018) on the converter on this page and it is decoded and written as GDSII inside your browser tab, with no AutoCAD, nothing installed and nothing uploaded. The converter shows the drawing unit before you convert, preset from the file's own $INSUNITS when that can be read, and each DWG layer becomes a numbered GDS layer, usually on datatype 0: a layer named with a plain number keeps that number, a layer named in KLayout's L1D4 form keeps its layer and datatype, and the names themselves are not kept, because GDSII has no layer-name record. Outlines drawn as separate touching lines and arcs are closed into filled polygons by default, and any contour that stays open is reported in a warning that names its layers.

Which DWG versions can be converted?

Containers from R14 through R2018 — AC1014, AC1015, AC1018, AC1021, AC1024, AC1027 and AC1032. R2007 is included, which matters because its Reed-Solomon interleaved pages and its distinct LZ77 variant share nothing with the releases either side of it.

What units does the converted GDSII file use?

Integer world nanometres. The DWG's $INSUNITS header is read and offered as a preset, but only when the header walk proved itself against the section's end sentinel — an unproven preset that you then accept could be a 25 400x scale error on geometry that looks perfectly correct. Confirm the unit before converting.

Do DWG blocks and inserts survive the conversion?

Yes. An INSERT becomes a GDS SREF, or an AREF when the insert is arrayed, and each block definition becomes a cell. The DWG reader emits the same entity model as the DXF route, so hierarchy behaves identically on both.

Are dimensions converted?

Yes. A DIMENSION is drawn from its own anonymous picture block, the same as in DXF. One whose picture block is missing from the file is counted and reported rather than silently dropped.

Why does my converted GDSII file contain nothing that would expose?

CAD outlines are often drawn as separate LINE and ARC entities that enclose no area, and those import as zero-width GDS paths that a mask writer treats as centrelines. The close-open-contours option, on by default, chains touching segments into closed rings first; untick it only to convert the file exactly as drawn.

Is there a file size limit?

The conversion runs inside your browser tab, so your machine's memory is the real ceiling. The converter checks the file size before parsing, warns above roughly 50 MB and declines files beyond roughly 200 MB rather than risking an out-of-memory crash.

Is my DWG file uploaded anywhere?

No. The DWG is decoded in your browser by a from-scratch reader that ships with the page. There is no server to upload to, and your design data never leaves your machine.

Updated 2026-09-26

Open Glyph — free, no install Your files never leave your computer.
Open Glyph →