Developer · 3D printing

Convert OpenSCAD to STL

Paste or upload your .scad code and render it to a printable STL with the real OpenSCAD engine, running entirely in your browser. Preview the result in 3D, then download. Nothing is ever uploaded.

0

Runs 100% in your browser with WebAssembly. Your design is never uploaded.

Your 3D model will appear here

Hit “Convert to STL” to render it
Engine log

                

Free online OpenSCAD to STL converter

This converter turns OpenSCAD code into an STL file you can slice and 3D print, without installing OpenSCAD. It runs the real OpenSCAD engine, build 2022.03 compiled to WebAssembly (openscad-wasm), with the CGAL geometry kernel, so a .scad file renders here as it does in that release of the desktop program.

It is made for makers who download a parametric model and only need the STL, for a quick render on a computer without OpenSCAD, such as a school or work machine, and for checking a change to a .scad file on any device. You paste the code or open the file, press Convert, check the model in a 3D preview and download the result.

The render happens in your browser, in a background worker. Your code and your model are not sent to a server, there is no account, and the converter is free.

What the converter does

  • Real OpenSCAD 2022.03: the language of that release, including difference(), hull(), minkowski(), linear_extrude() and rotate_extrude(), rendered with CGAL.
  • Editor or file: paste code into the editor, or drop or pick a .scad file. The file is read on your device and opens in the editor, where you can change it before converting.
  • Five output formats: binary STL, ASCII STL, OFF, AMF and the CSG tree.
  • 3D preview: turn and zoom the result, switch to wireframe, stop the auto-rotation or reset the view. The preview works for every output format.
  • Model stats: triangle count, file size, the size of the model along X, Y and Z, and the render time.
  • MCAD built in: use <MCAD/...> works without installing anything, for example the involute gears.
  • Fonts for text(): tick Enable text() / fonts and the engine gets the font data that text() needs.
  • Smoothness override: a value in Smoothness $fn sets $fn for the whole file. Shapes that pass their own $fn keep it.
  • Engine log: OpenSCAD's own messages, warnings and errors, line by line.
  • Six examples: sphere minus cube, cube, rounded box, hollow vase, an MCAD gear and extruded text.

How to convert a .scad file to STL

  1. Paste your code or open a .scad file

    Type or paste OpenSCAD code into the Editor tab, or open Upload .scad and drop the file there. An uploaded file opens in the editor.

  2. Choose the output format

    Keep binary STL for 3D printing, or pick ASCII STL, OFF, AMF or the CSG tree. Set $fn for smoother curves, and tick the fonts box if the model uses text().

  3. Press Convert to STL

    The first run loads the OpenSCAD engine. Simple models are ready in a moment, while models with minkowski() or many curved parts take longer.

  4. Check the 3D preview

    Turn the model with the mouse or a finger, check its dimensions and triangle count, and open the engine log if something looks wrong.

  5. Download the file

    Press Download to save model.stl, or the format you chose, and open it in your slicer.

Output formats

  • Binary STL: a compact triangle mesh, the usual choice for slicers.
  • ASCII STL: the same mesh as readable text, in a larger file.
  • OFF: a simple text mesh format read by geometry tools such as MeshLab.
  • AMF: the XML-based Additive Manufacturing File format.
  • CSG tree: OpenSCAD's flattened description of the model as text, not a mesh.

3MF and OBJ are not offered, because this WebAssembly build of OpenSCAD cannot write them.

Good to know

  • Units: OpenSCAD numbers have no unit. Slicers usually read STL numbers as millimetres, so 20 becomes 20 mm, and the converter shows the dimensions in mm too.
  • One file at a time: include and use work for the bundled MCAD library only. A model split across several of your own .scad files has to be combined into one file first.
  • Customizer values: there is no Customizer panel. Change the variables at the top of the file in the editor, then convert.
  • 2D shapes: STL needs a 3D solid. A model that only draws square(), circle() or text() produces no geometry until you wrap it in linear_extrude() or rotate_extrude().

Frequently asked questions

Is this OpenSCAD to STL converter free?

Yes. It is free, with no account, no sign-up and nothing to install.

Is my .scad file uploaded to a server?

No. The file is read on your device and rendered in your browser by OpenSCAD compiled to WebAssembly. Neither your code nor the result is sent to a server.

Do I need OpenSCAD installed?

No. The first time you press Convert, the page downloads the OpenSCAD engine from this site together with the MCAD library and the font data, about 16 MB in all. Your browser can keep these files in its cache for the next visit.

Which OpenSCAD version does it use?

OpenSCAD 2022.03, from the openscad-wasm build 2022.03.20. Code that relies on features added to OpenSCAD after that release may not render here.

Can I use the MCAD library or other libraries?

MCAD is bundled, so lines like use <MCAD/involute_gears.scad> work. Other libraries, such as BOSL2, are not included, and extra .scad files of your own cannot be loaded next to the main file.

Why does text() fail?

The engine only gets its fonts when Enable text() / fonts is ticked. Without them OpenSCAD reports that it cannot get a font. Tick the box and convert again. The Text example ticks it for you.

Why does it say that no geometry was produced?

The model renders nothing, or only a 2D shape. STL needs a 3D solid, so extrude 2D shapes with linear_extrude() or rotate_extrude(), and check that the part you want is not commented out or switched off by a variable.

Does the converter work on a phone?

Yes. The page works on phones and tablets. The render runs on your own device, so a complex model takes longer on a phone than on a computer.