Glyph

DXF vs GDSII

DXF and GDSII are both drawing-interchange formats, but they were built for different domains: DXF is Autodesk's general-purpose CAD drawing format, and GDSII is a purpose-built format for hierarchical integrated-circuit and photomask layout. They differ in geometry model, precision, layering, and hierarchy, which is why files don't move cleanly between them without a dedicated converter.

What is DXF?

DXF (Drawing Exchange Format) is a CAD drawing-interchange format created by Autodesk for AutoCAD, first released in 1982. It's designed to carry general 2D and 3D drawing data — lines, arcs, circles, polylines, text, dimensions, blocks — between CAD packages, and is widely supported across mechanical, architectural, and general drafting tools. DXF ships in both an ASCII (plain-text) and a binary variant, and its structure is a tagged group-code stream rather than a fixed binary record layout.

DXF vs GDSII: key differences

DXF GDSII
Origin / vendor Autodesk, for AutoCAD (1982) Calma Company, for GDS II layout systems (late 1970s)
Primary domain General CAD drafting (mechanical, architectural, general drawing) Integrated-circuit and photomask layout
Core geometry Lines, arcs, circles, and open/closed polylines Filled boundary polygons and paths (wires); no native arcs — curves are polygonized
Units and precision Floating-point coordinates in a user-chosen drawing unit Signed 32-bit integer coordinates in a fixed database unit (commonly 1 nm), avoiding floating-point drift
Layers Named, user-defined layers (arbitrary strings), each with its own color/linetype Numbered (layer, datatype) pairs — a fixed 16-bit layer number and a 16-bit datatype, not names
Hierarchy / reuse Blocks, which can be inserted (and nested) like a lightweight instance Structures (cells), placed via SREF (single instance) or AREF (regular array), forming a true hierarchical DAG
Curves/arcs Native arc and circle entities No arc primitive — a circle or curved edge is represented as a many-sided polygon approximation
DXF open polyline vs GDSII closed filled boundary, same shape DXF POLYLINE GDSII BOUNDARY open (gap, no fill) closed, filled region same vertices — DXF keeps the path open; GDSII requires a closed filled polygon

The practical upshot: DXF's named layers and native arcs suit drafting workflows where a human names things and curves matter, while GDSII's numbered layers, integer coordinates, and array references suit dense, hierarchical mask data where a single repeated cell (e.g. a memory bitcell) might be instanced millions of times.

Converting between DXF and GDSII

Need a quick conversion? Convert DXF to GDSII or GDSII to DXF in the free browser-based converter — no upload, no installation, runs entirely in your browser. Need more control? Read on.

Because the two formats model geometry differently — arcs vs polygonized curves, named layers vs numbered layer/datatype pairs, floating-point vs fixed integer units — converting between them is a lossy or approximating operation, not a re-encoding. Arcs typically need to be segmented into polygons (or vice versa, approximated) during conversion, and named DXF layers need an explicit mapping to numbered GDS layers.

DXF → GDSII is the easier direction, and Glyph does it natively: open the .dxf file, review the imported geometry and layer mapping, then save as .gds. No separate converter step is required.

GDSII → DXF is a direction Glyph covers directly, via File → Export DXF… (see below). Whatever tool you use, check what it does with arcs, units, and layer mapping before trusting a converted file — defaults vary, and a mismatch there is a common source of geometry errors.

Does Glyph support DXF?

Yes, in both directions. On import, Glyph converts a DXF into editable, hierarchical geometry — lines, polylines (including bulge arcs), circles, arcs, ellipses, splines, hatch boundaries, and text all become native shapes, with DXF BLOCK/INSERT mapped onto Glyph cells and SREF/AREF instances so the hierarchy survives rather than flattening. Glyph reads both the ASCII and the binary DXF variant, detecting which one a file is from its own bytes — there's no re-save step. Drawing units come from the file's $INSUNITS header (falling back to 1 unit = 1 µm when absent), and imported layers default to hollow outlines since DXF drawings are usually line art rather than filled mask regions. (.dxb is a different format from binary DXF — a compact opcode-based plotting format, not DXF group codes — and isn't supported; export DXF from your CAD tool instead.)

On export, File → Export DXF… writes DXF R2000 (AC1015), with 1 drawing unit = 1 nm and $INSUNITS = 12, so coordinates stay exact integers. Because DXF has no datatype concept, the GDSII (layer, datatype) pair is encoded in the DXF layer name (L1D0) rather than silently merging 1/0 with 1/4. Output is checked against ezdxf's auditor on every build, so a DXF Glyph writes is validated by an implementation that shares no code with it.

Further reading

Open a .gds file directly in Glyph — nothing to install, and your files never leave your computer. Once a design is in GDSII, see maskless lithography for how it gets exposed without a physical photomask.

Updated 2026-07-12

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