Glyph

Convert GDSII to SVG

GDSII-to-SVG conversion flattens a hierarchical, integer-coordinate mask layout into a self-contained vector image: each boundary polygon becomes an SVG <path>, each layer becomes a styled <g> group, and the database-unit coordinate space becomes the viewBox. 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 SVG

  1. Drop your .gds or .gdsii file onto the converter on this page.
  2. Pick SVG as the target format. The output is sized to the design's bounding box and carries each layer's colour, so it opens looking like the layout.
  3. Download the .svg file. Illustrator, Inkscape, LaTeX toolchains and every modern browser read it directly — no .gds viewer required.

What survives and what changes

Aspect What happens
Hierarchy Flattened. Every SREF and AREF is expanded, with translation, rotation, magnification and mirroring baked into the emitted coordinates. The cell structure itself is not represented.
Boundaries Each polygon becomes an SVG <path> built from M/L commands and closed with Z, filled in the layer's colour.
Paths A widened path becomes a stroked <path> at the GDS width, with the end-cap style mapped onto stroke-linecap. A zero-width centreline is drawn as a one-device-pixel hairline (vector-effect="non-scaling-stroke").
Layers One <g> group per layer, carrying that layer's colour and opacity, emitted in the document's layer order so overlap reads correctly. Hidden layers are not written.
Coordinates The design's bounding box becomes the viewBox in world nanometres. GDS coordinates are integers, so there is no floating-point drift.
Y axis A single root flip (matrix(1 0 0 -1 …)) converts y-up GDSII into y-down SVG. Re-importing into Glyph applies the exact inverse, so a Glyph → SVG → Glyph trip is position-exact.
Text Written as an SVG <text> element at the GDS text size in a generic monospace face, positioned by the resolved anchor. Imported font outlines are not embedded — flatten text to polygons in the editor first if you need the exact glyph shapes.
Large arrays The whole export shares a one-million-vertex budget. Past it an array draws its true footprint outlined plus up to 64 sampled real instances, always including the four true corners, so pitch and orientation stay legible.
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.
Not a layout SVG is a presentation format. It has no (layer, datatype) pairs, no cells and no database unit, so an SVG is a picture of a mask rather than a mask. Keep the .gds as your master file.

Why convert a layout to SVG

GDSII is a compact binary format built for mask tooling — browsers, PDF viewers and vector editors cannot open a .gds file at all. SVG is text-based, resolution-independent, and understood by Illustrator, Inkscape, LaTeX toolchains and every modern browser, which makes it the usual first step toward a paper figure, a web-embeddable die diagram, or a layout you want to annotate outside a mask tool.

For how the mapping works in detail — polygons to paths, layers to groups, database units to a viewBox — see GDSII to SVG. For a clean figure with a white background, solid fills, a scale bar and a layer legend, follow the publication figures guide. Going the other way is SVG to GDSII.

Open it in the editor

To choose which layers appear, recolour them, or frame a region before exporting, open the file in the free Glyph editor — nothing to install, and your files never leave your browser. See Layers and Open & save.

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

Frequently asked questions

What units does the exported SVG use?

The design's bounding box becomes the SVG viewBox directly, in world nanometres, so no unit conversion happens beyond scaling that box to a sensible on-screen size. Because GDS coordinates are integers, nothing drifts.

Does the cell hierarchy survive the conversion?

No, and deliberately so. SVG has no primitive that mirrors a GDS reference cleanly for a portable snapshot, so the writer walks the reference tree and expands every SREF and AREF, baking translation, rotation, magnification and mirroring into each instance's coordinates.

Why is the exported SVG flipped compared with a naive conversion?

GDSII is y-up and SVG is y-down. The writer applies a single root flip so the figure reads right side up. Re-importing that SVG into Glyph applies the exact inverse flip, which makes a Glyph to SVG to Glyph trip position-exact.

What happens to a very large array?

The export is charged a whole-figure vertex budget of one million vertices. An array that would blow it stops expanding instance by instance and draws its true footprint as an outline plus a bounded sample of up to 64 real instances, always including the four true corners, so the lattice pitch and orientation stay legible instead of collapsing to four lonely dots.

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.

Can I get a publication-ready figure rather than a raw export?

Yes. The editor's Export figure mode adds a white background, solid fills, a scale bar and a layer legend on top of the same conversion, and can render the result to PNG at a chosen pixel width.

Updated 2026-08-20

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