OpenSCAD to STL — export from your browser
STL is still the file most 3D-printing workflows start from: every slicer reads it, and every printing service accepts it. With openscad-web you write a part in OpenSCAD code and download an STL a moment later, without installing OpenSCAD. This page explains what happens when you press Export, how units and parameters are handled, and how to catch problems before the file reaches your slicer.
One thing first: openscad-web is a tool for making STL files from code. It does not open, view or repair STL files you already have. If you need an STL viewer, use your slicer or a dedicated viewer; if you want to design or change a part parametrically, you are in the right place.
From code to STL in four steps
- Open the editor, sign in with Google, and write or import your
.scadcode. - Watch the 3D preview and the status bar. The status bar shows the model's size, volume and triangle count, and warns
NOT MANIFOLDwhen the mesh is not watertight. - Set the design's unit if your numbers are not millimetres: click the unit badge in the 3D view to switch between mm, cm and m.
- Choose Export… → STL. The design is saved first, then the server compiles it and your browser downloads the file, named after the design.
What the export contains
The export is compiled by OpenSCAD 2025.03.25 with the Manifold backend, the same version that draws the preview in your browser, so the downloaded mesh matches what you saw. The file is binary STL, which is several times smaller than ASCII STL for the same triangles and is what slicers handle fastest.
Because the design is saved right before the export, unsaved edits and slider changes are never left out. The file is always built from the code and Customizer values you are looking at.
Units: why the scale is always right
An STL file has no unit field; slicers assume millimetres. If you model a shelf bracket in centimetres and export the raw numbers, it arrives ten times too small. openscad-web stores a unit with every design and scales the exported mesh to millimetres: a design in cm is multiplied by 10, a design in m by 1000. You keep writing the numbers that are natural for the part, and the printer gets the right size.
Customizer values are part of the file
Variables at the top of your file with OpenSCAD's Customizer comments, such as wall = 2; // [1:0.5:5], appear as sliders and fields next to the 3D view. The values you set are stored with the design and passed to OpenSCAD for the export. To make a set of sizes, duplicate the design from the Designs menu for each variant, or simply move the slider and export again.
STL, 3MF or OFF?
| Format | Choose it when |
|---|---|
| STL | You want the most compatible file for any slicer, printing service or mesh tool. |
| 3MF | Your slicer prefers 3MF, as Bambu Studio does. openscad-web writes a minimal 3MF with one object and the unit set. Open in Bambu Studio uses it. |
| OFF | You process the mesh in a tool that reads Object File Format. |
| .scad | You want the source code itself, for example to keep it in version control or open it in desktop OpenSCAD. |
A quick checklist before printing
- No errors in the editor. If the code does not compile, the export fails and no file is written; the editor marks the line to fix.
- Manifold. If the status bar says
NOT MANIFOLD, look for faces that only touch, or zero-thickness walls. Overlapping solids slightly in aunion()usually fixes it. - Size. Compare the dimensions in the status bar with what you intended, in the design's unit.
- Orientation. Use the standard view buttons in the 3D view to check that the flat face you want on the bed is at the bottom.
Letting an assistant do the export
If you connect an AI assistant over MCP, it can compile the design, read the same measurements and hand you a download link with its export_model tool. See OpenSCAD with AI assistants. To learn more about the editor itself, read OpenSCAD online — no install.
FAQ
Can openscad-web open an existing STL file?
No. openscad-web creates STL files from OpenSCAD code; it does not open or view STL files you already have.
Is the STL binary or ASCII?
Binary STL, written by OpenSCAD with the Manifold backend and scaled to millimetres.
What happens to my Customizer values?
They are saved with the design and applied to the export, so the file matches the sliders you set.
My design is in centimetres. Will the STL be the right size?
Yes. Each design has a unit (mm, cm or m) and exports are scaled to millimetres, the unit slicers expect for STL.
Why did my export fail?
If the code does not compile, no file is produced and the status bar shows that the export failed. Fix the errors shown in the editor and export again.