Convert GDSII to DXF
GDSII-to-DXF conversion takes a hierarchical mask layout — integer coordinates, numbered (layer, datatype) pairs, SREF and AREF placements — and writes it as a DXF R2000 drawing that mechanical and general CAD tools can open. The conversion runs entirely inside your browser; the file is read, converted and written locally, and there is no server to upload it to.
How to convert GDSII to DXF
- Drop your
.gdsor.gdsiifile onto the converter on this page. - Pick DXF as the target format. No options are needed: the unit mapping, layer naming and entity choices below are fixed so the output is predictable.
- Download the
.dxffile. Open it in your CAD tool, or in the free Glyph editor if you want to compare it against the source layout first.
What survives and what changes
| Aspect | What happens |
|---|---|
| Entities written | Only three: TEXT, LWPOLYLINE and INSERT. A boundary or box becomes a closed LWPOLYLINE; a path becomes an open LWPOLYLINE. |
| Curves | None are emitted. GDSII has no arc primitive, so a circle or curved edge is already a many-sided polygon in the source and stays a polyline in the output. |
| Units | 1 drawing unit = 1 nm, declared as $INSUNITS = 12 with $MEASUREMENT = 1. World nanometres are integers, so every coordinate is exact rather than a rounded micron fraction. |
| Layer names | The (layer, datatype) pair is always encoded in the DXF layer name (L1D0), sanitised to characters AutoCAD accepts and de-duplicated, so 1/0 and 1/4 can never merge. |
| Layer colours | Written as the nearest AutoCAD Color Index — the only colour field a DXF R2000 LAYER record defines — plus the exact RGB as a true-colour value (group 420), which tools that read it (Glyph among them) show exactly. A hidden Glyph layer is written with a negative ACI, DXF's "layer is off", never dropped. |
| Hierarchy | Each cell becomes a BLOCK. An SREF becomes an INSERT carrying magnification, rotation and mirroring. |
| Axis-aligned arrays | An AREF whose lattice is axis-aligned, positive-stepped and unrotated becomes a single INSERT with DXF's column/row array groups (70/71/44/45) — one entity, however large the array. |
| Other arrays | An AREF that cannot use DXF's orthogonal form expands instance by instance up to 20 000 instances. Past that only the four corner instances are written, and a 999 comment in the file says so. |
| Paths | A widened path becomes a constant-width LWPOLYLINE (group 43). The GDS end-cap style (pathType) has no DXF equivalent and is lost — the result is always flush-capped. |
| Text | Written as a plain TEXT entity in the Standard style at the GDS text size, positioned by the resolved anchor. Font, letter spacing and justification collapse into that offset. |
| Not exported | Construction shapes, bitmaps and persistent dimension annotations are excluded, the same contract as every other Glyph writer. |
| Damaged input | A truncated or corrupt .gds is reported, never silently converted as a partial file — the reader warns on a missing ENDLIB, a corrupt record with its byte offset, unconsumed tail bytes, and dropped NODE elements. |
| Round trip | Re-importing a DXF that Glyph wrote restores geometry, hierarchy, each (layer, datatype) pair, layer names and exact colours — Glyph encodes the pair in every DXF layer name and marks the file as its own. A DXF re-saved by another CAD tool can lose that mark, and then the encoded names come back literally. Keep the .gds as your master file. |
| Validation | Output is judged by ezdxf, never by Glyph's own DXF reader. A lossy writer round-trips cleanly against a lossy reader, so the oracle has to be an independent implementation. |
Why DXF is a lossy destination for mask data
DXF was built for general drafting: named layers, native arcs, floating-point coordinates in a user-chosen unit. GDSII was built for photomask and IC layout: numbered (layer, datatype) pairs, closed filled polygons, integer database units. Converting downward means giving up the datatype dimension (recovered here only as a naming convention), the end-cap model, and true layer colour.
That is a fair trade when the destination is a CAD tool, a drawing office, or a lithography flow that reads DXF — and a bad one if you are archiving. For the full side-by-side, see DXF vs GDSII. For the source format's record structure, see the GDSII file format reference.
If your goal is a figure for a paper or a slide rather than a CAD handoff, GDSII to SVG is the better target — see also the publication figures guide.
Open it in the editor
To check layer mapping, hierarchy or geometry before you hand the DXF on, open the source file in the free Glyph editor — nothing to install, and your files never leave your browser. See Open & save and Layers.
Glyph is made by NANYTE. For where a finished layout goes next, read NANYTE's maskless lithography overview.
Frequently asked questions
What drawing unit does the exported DXF use?
One drawing unit is exactly 1 nanometre, declared with $INSUNITS = 12 and $MEASUREMENT = 1 for metric. GDS world coordinates are integer nanometres, so every coordinate is written exactly. A consumer that ignores $INSUNITS reads the drawing as unitless at 1 unit per nanometre, which is a scale question rather than a geometry error.
How is the GDS datatype represented in DXF?
DXF has no datatype concept, so the pair is encoded in the layer name as L1D0 (layer 1, datatype 0). Without that convention, layer 1/0 and layer 1/4 would silently merge into one DXF layer.
Does the cell hierarchy survive?
Yes. Each GDS cell becomes a DXF BLOCK, an SREF becomes an INSERT carrying magnification, rotation and mirroring, and an axis-aligned AREF becomes a DXF orthogonal array on one INSERT.
Will the exported DXF contain arcs and circles?
No. GDSII has no arc primitive, so anything curved is already a polygon by the time it reaches the writer. The writer emits only TEXT, LWPOLYLINE and INSERT entities, which is what makes the output predictable for mask and lithography tooling.
Is my GDSII file uploaded anywhere?
No. The conversion runs entirely in your browser using the same writer as the Glyph editor. There is no server to upload to, and your design data never leaves your machine.
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.
What happens if my GDSII file is truncated or corrupt?
It is reported, not silently converted as a partial file. The reader warns on a missing ENDLIB record, on a corrupt record together with its byte offset, on unconsumed bytes at the end of the file, and on dropped NODE elements, so a short file can never look like a whole one.
How is the DXF output checked?
The DXF writer is validated on every build against ezdxf, a Python implementation that shares no code with Glyph. Its auditor runs over each fixture with repairs treated as failures, structural expectations are hand-written so they cannot inherit the writer's bugs, and three negative controls must each fail.