What is the GDS file format?
The .gds file is the established exchange format for integrated circuit (IC) and MEMS mask layout data, formally known as GDSII (Graphic Database System II) or the Calma Stream Format. Developed by the Calma Company in 1978, it became the de facto tape-out format that chip designers deliver to semiconductor foundries for photomask fabrication.
A .gds file is a binary stream composed of length-prefixed records, stored in big-endian byte order. Each record begins with a 4-byte header encoding the record length, type, and data type, followed by the data payload. The file always opens with a HEADER record (hex signature 00 06 00 02) and closes with ENDLIB. Between those markers the format organizes IC geometry in a strict hierarchy: library → structures (cells) → elements. Supported element types include:
BOUNDARY- filled polygons (the primary shape)PATH- wire segments with a defined widthSREF/AREF- single and array cell references for compact hierarchyTEXT- string labels with position, orientation, and magnificationBOXandNODE- additional annotation elements
All geometry resides on numbered layers, with integer coordinates scaled by a UNITS record that maps database units to meters.
A .gds file stores only geometry and hierarchy - it is not a schematic or netlist. File sizes range from kilobytes for a single cell to many gigabytes for a full-reticle mask set. Large files are commonly distributed as .gds.gz using external gzip compression. For modern high-density designs, the OASIS format offers better compression and faster parsing and is increasingly preferred over .gds, though .gds remains the dominant interchange standard across the EDA industry and is accepted by virtually every commercial foundry.
Security & safety
RISK: LOWA GDSII file is passive geometry data - no executable code - so opening one in a layout viewer is safe. The real concerns are confidentiality and integrity, not malware: a .gds is often valuable proprietary IP (a chip design under NDA), so handle it accordingly and avoid uploading designs to unknown online "GDS viewer/converter" services. GDSII has no built-in checksum, so verify integrity through your EDA flow (DRC/LVS, XOR comparison) rather than trusting the file blindly.
Format details
in a nutshellPrograms that open GDS files
Technical details
deep spec| Encoding | Binary, big-endian byte order throughout |
| Record structure | Stream of length-prefixed records; each record has a 4-byte header: 2-byte length, 1-byte record type, 1-byte data type, followed by the payload |
| File signature (magic bytes) | Hex `00 06 00 02` at offset 0 - HEADER record with length 6, record type 0x00 (HEADER), data type 0x02 (2-byte integer) |
| MIME type | `application/x-gdsii`; fallback `application/octet-stream` |
| Coordinate system | 4-byte signed integers in database units; the `UNITS` record pairs user units with a meters-per-database-unit scale factor |
| Floating-point format | Calma/IBM 8-byte hexadecimal floating-point (not IEEE 754), used in `UNITS` and other real-valued record fields |
| Element types | `BOUNDARY` (polygon), `PATH`, `SREF` (cell reference), `AREF` (array reference), `TEXT`, `NODE`, `BOX` |
| Layer model | Integer layer numbers (0-255 in practice) paired with an integer datatype field; no built-in name table - layer-to-purpose mapping is defined externally in PDK technology files |
| Hierarchy | Recursive cell (structure) hierarchy using `BGNSTR`/`STRNAME`/`ENDSTR` blocks; cells reused via `SREF`/`AREF` enable compact representation of repeated geometry |
| Built-in compression | None; files are commonly distributed as `.gds.gz` using external gzip compression |
| Typical file size | Kilobytes for a single test cell; tens of gigabytes for a full-chip or full-reticle mask set |
| Integrity checking | No built-in checksum; file integrity is verified by downstream DRC (design rule check) and LVS (layout vs. schematic) sign-off tools |
| Internal version field | 2-byte integer stored in the `HEADER` record payload; common values are 3, 5, and 6 |
| Text and label support | `TEXT` elements attach string labels to a layer and datatype, with position, rotation, magnification, and one of four font indices (0-3) |
| Primary use case | IC and MEMS mask layout exchange, semiconductor foundry tape-out, and photomask fabrication sign-off |
| Released | 1978 (Calma GDSII), succeeding GDS I |
| Latest version | GDSII (the format is frozen; largely superseded by OASIS for new flows) |
| Open standard | Yes · royalty-free |
| Specification | www.artwork.com |
GDS conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about GDS files.