What is the SCAD file format?
A .scad file is a 3D CAD script file used by the OpenSCAD software application. Rather than point-and-click modeling, OpenSCAD uses its own scripting language to create solid 3D CAD objects programmatically. The .scad file can be used by the software to design 2D and 3D objects by specifying object geometry, dimensions, and positioning through code. OpenSCAD can preview 2D and 3D objects in real time as you edit the script, then export them to formats such as .STL, .DXF, .AMF, or .3MF.
The format is plain-text UTF-8 source code - readable and editable in any text editor. Scripts use C-style comments (//, /* */) and support variables, loops, conditionals, and user-defined module blocks for reusable geometry. Core primitives include cube(), sphere(), cylinder(), and polyhedron(); Boolean operations like difference(), union(), and intersection() combine shapes into complex models. This makes .scad files popular in the maker and 3D-printing communities for creating parametric, customizable designs.
Security & safety
RISK: LOWA .scad is plain-text source code with no embedded executables or macros, so it is safe to open and read in any editor. One caution: OpenSCAD scripts can include/use external library files and (in some configurations) import data, so when rendering a script from an untrusted source, glance over the code first and keep OpenSCAD updated. The exported STL/3MF is just geometry. Overall risk is low - the main 'danger' is a complex render consuming a lot of CPU/RAM.
Format details
in a nutshellPrograms that open SCAD files
Technical details
deep spec| File type | Plain-text UTF-8 source code |
| MIME type | text/plain |
| Magic bytes | None - plain-text format with no binary signature; identified by extension and readable script content |
| Language paradigm | Declarative/functional scripting - geometry is described by code, not drawn interactively |
| Comment syntax | C-style: // single-line, /* */ block comments |
| Core 3D primitives | cube(), sphere(), cylinder(), polyhedron() |
| Core 2D primitives | circle(), square(), polygon(), text() |
| Boolean operations | union(), difference(), intersection() |
| Transformations | translate(), rotate(), scale(), mirror(), multmatrix(), resize() |
| Parametric support | Variables, expressions, for loops, if/else conditionals, list comprehensions |
| Module system | User-defined reusable geometry blocks via the module keyword; supports parameters and defaults |
| Library directives | use <file.scad> (imports modules only) and include <file.scad> (imports everything) |
| Rendering engines | OpenCSG for fast real-time preview; CGAL for accurate full render and export |
| Export formats | STL, 3MF, AMF, DXF, SVG, OFF, CSG (selectable at export time) |
| Released | 2010 (OpenSCAD) |
| Open standard | Yes · royalty-free |
| Specification | openscad.org |
SCAD conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about SCAD files.