Glyph

DXF to GDS converter

DXF-to-GDSII conversion turns a CAD drawing into a hierarchical, integer-coordinate mask layout: polylines and flattened curves become GDS boundary polygons, BLOCK definitions become cells, and INSERT entities become SREF and AREF placements. This DXF to GDS converter runs entirely inside your browser — the file is read, converted and written locally, and there is no server to upload it to.

Can I convert DXF to GDSII without installing anything?

Yes. Drop the DXF on the converter on this page and it is read and written as GDSII inside your browser tab, with nothing installed and nothing uploaded. Units come from the file's $INSUNITS header (a file that declares none is read as 1 unit = 1 µm, and the converter says so), and each DXF 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 DXF to GDSII

  1. Drop your .dxf file onto the converter on this page. Both the ASCII and the binary DXF flavour are read; the flavour is detected from the file's own bytes.
  2. Pick GDSII as the target format. The scale is taken from the file's own $INSUNITS header automatically — a unitless or unknown file falls back to 1 drawing unit = 1 µm. This converter has no unit override, so its warnings say when it assumed 1 µm; opening the same file in the editor (File → Open…) asks which unit a unitless drawing uses, and a result that is not the size you expect can also be rescaled there. Close open contours is on by default, so line art converts to filled regions — see below.
  3. Download the .gds file. Open it in the free Glyph editor if you want to inspect layers, fix hierarchy, or run a design-rule check before handing it to a mask shop.

What survives and what changes

Aspect What happens
Entities read LINE, LWPOLYLINE (including bulge arcs), POLYLINE/VERTEX, CIRCLE, ARC, ELLIPSE, SOLID/TRACE, 3DFACE, TEXT, MTEXT, SPLINE (NURBS), INSERT, DIMENSION (via its picture block), and HATCH boundary loops.
Curves GDSII has no arc primitive, so every arc, circle, ellipse and spline is flattened to a polyline within a chord-deviation budget that keeps vertex counts bounded.
Hierarchy A BLOCK becomes a GDS cell; an INSERT becomes an SREF, or an AREF when the insert is arrayed. The drawing's structure is preserved, not flattened.
Units Every drawing unit becomes $INSUNITS-derived world nanometres (millimetres → 1 000 000 nm). Unitless or unknown files default to 1 unit = 1 µm. Coordinates are integer nanometres.
Layers Named DXF layers become numbered GDS layers, allocated on first use. A layer whose name is a plain number claims that number, so a mask DXF with layers 1, 2, … keeps them.
Datatype Imported shapes land on datatype 0 — DXF has no datatype concept — unless the layer name carries one in KLayout's L1D4 form, which keeps layer 1 datatype 4.
Layer colours The layer table's colour is carried over. An entity-level colour override (group 62) routes that entity onto a colour-variant layer, so overridden and ByLayer entities do not silently merge.
Layer appearance Imported layers default to hollow (outline only), because CAD drawings are usually line art rather than filled mask regions.
Polyline width Constant width (group 43) and the per-vertex 40/41 pair are read onto the GDS path width, so a widened track imports as geometry that exposes. A varying width collapses to a single scalar.
HATCH Reduced to its boundary loops; the pattern's own line geometry is not reproduced. The even-odd rule gives island and outer semantics.
POINT Skipped — POINT entities are construction defpoints, not exposable geometry.
Open outlines LINE and ARC entities that only trace an outline enclose no area and import as zero-width paths. See the next section.
DXF flavours ASCII and binary DXF are both read, detected from the file's bytes. .dxb is a different, opcode-based format with no group codes and is declined by name rather than mis-parsed.

Why a converted DXF sometimes exposes nothing

This is the single most common surprise in DXF-to-mask conversion, and it is not a converter bug.

A mask writer exposes regions — closed polygons with area. A CAD drawing frequently describes the same outline as a chain of separate LINE, ARC and SPLINE entities that merely touch end to end, with a sub-micron gap here and there. Converted literally, each of those becomes a zero-width GDS path: a centreline, correct as geometry and completely non-exposing. The file opens cleanly, the picture looks right, and the mask comes out blank.

The close open contours option, on by default, handles this. Touching segments are chained per (layer, datatype) pair — never across layers — with an endpoint tolerance that scales with the drawing (0.1 % of its diagonal, kept between 100 nm and 10 µm), and 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 a centreline, open by nature and enclosing nothing, stays open instead of becoming a slit of exposed resist.

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

Why DXF and GDSII both exist

DXF is a general CAD drawing-interchange format with named layers, native arcs and floating-point coordinates. GDSII is a mask-layout format with numbered (layer, datatype) pairs, no arc primitive, and integer database units chosen so coordinates never drift. Neither is a superset of the other, which is why this conversion re-models the drawing rather than re-encoding it.

For the full side-by-side — geometry model, precision, layering, hierarchy — see DXF vs GDSII. For the record structure the converter writes, see the GDSII file format reference, and for the vocabulary, the mask layout glossary.

Open it in the editor

A converted file is usually a starting point rather than a finished mask: layers need mapping onto your process, datatypes need assigning, and outlines need checking. Open in the free Glyph editor to do that — nothing to install, and your files never leave your browser. From there, see Layers and Cells & hierarchy.

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

Frequently asked questions

Can I convert DXF to GDSII without installing anything?

Yes. Drop the DXF on the converter on this page and it is read and written as GDSII inside your browser tab, with nothing installed and nothing uploaded. Units come from the file's $INSUNITS header (a file that declares none is read as 1 unit = 1 µm, and the converter says so), and each DXF 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.

What units does the converted GDSII file use?

Coordinates land as integer world nanometres. The scale comes from the DXF $INSUNITS header, so a millimetre drawing becomes 1 000 000 nm per drawing unit. A unitless or unknown file defaults to 1 drawing unit = 1 µm, and you can rescale the whole design afterwards from the Properties panel in the editor.

Do DXF blocks and inserts survive the conversion?

Yes. A DXF BLOCK definition becomes a GDS cell and an INSERT becomes an SREF, or an AREF when the insert is arrayed, so the drawing keeps its hierarchy instead of being flattened into one cell.

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. Those import as zero-width GDS paths, which a mask writer treats as centrelines rather than as regions to expose. 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 DXF file uploaded anywhere?

No. The conversion runs entirely in your browser using the same parser and writer as the Glyph editor. There is no server to upload to, and your design data never leaves your machine.

Does the converter read binary DXF as well as ASCII DXF?

Yes. The DXF flavour is detected from the file's own bytes, so a binary DXF needs no re-save step. The separate .dxb plotting format is not DXF group codes and is declined by name.

Updated 2026-09-26

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