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.
How to convert DWG to GDSII
- Drop your
.dwgfile onto the converter on this page. Containers from R14 through R2018 are recognised from the file's own magic bytes. - Confirm the drawing unit. The DWG's
$INSUNITSis 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. Switch on close open contours if your drawing is line art rather than filled regions. - Download the
.gdsfile. 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 and MTEXT. |
| 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 | Not decoded. Export DXF from your CAD tool if a drawing is only dimensions. |
| 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. Every shape lands on datatype 0, because the DWG/DXF entity model has no datatype. |
| 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 option chains touching segments into closed rings, per (layer, datatype) pair and never across layers, with a default join tolerance of 100 nm. 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.
Nothing is ever deleted: chains that stay open keep the paths they came from. 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.