Real OpenSCAD
Not a look-alike interpreter: OpenSCAD itself (a 2025 development snapshot with the Manifold kernel) compiled to WebAssembly. Modules, functions, recursion, list comprehensions, include and use behave exactly as on the desktop.
Paste code, or drop in a .scad file or a whole project folder: real OpenSCAD runs in your browser and renders the model half a second after you stop typing. color(), % background and # highlight look as they do when you press F5 on the desktop. No install, no sign-up, and nothing is uploaded.
Not a look-alike interpreter: OpenSCAD itself (a 2025 development snapshot with the Manifold kernel) compiled to WebAssembly. Modules, functions, recursion, list comprehensions, include and use behave exactly as on the desktop.
Half a second after the last keystroke the model is redrawn — no button. The parameter panel reads Customizer comments; drag a slider and the value is written back into the source.
color() follows the geometry through booleans; faces cut by a difference() show in green; % draws translucent grey and # translucent pink. $preview is true.
Drop the folder and include / use resolve against your real layout. MCAD, Write.scad and BOSL2 are built in and mounted when used. Text is shaped with OpenSCAD's own Liberation fonts; put a .ttf in the project for others.
“Copy link” puts the current code into the URL, so whoever opens it sees the model. An AI assistant can hand you such a preview link for the code it writes.
“Export STL” saves the triangles on the canvas — the same mesh desktop OpenSCAD exports after a render — ready for your slicer. For Fusion, SolidWorks and FreeCAD the same page also rebuilds the model as real B-rep STEP — see OpenSCAD to STEP.
It opens with this code already rendered; change a line and it redraws half a second later.
// A bracket: a plate with two slots and a stiffening rib
$fn = 48;
difference() {
union() {
cube([60, 30, 4]);
translate([0, 0, 4]) cube([60, 4, 16]);
}
for (x = [12, 48]) translate([x, 17, -1]) hull() {
cylinder(h = 6, d = 5);
translate([0, 6, 0]) cylinder(h = 6, d = 5);
}
}
%translate([-5, -5, 0]) cube([70, 40, 1]); // the sheet it mounts on, shown only
#translate([30, 2, 10]) rotate([-90, 0, 0]) cylinder(h = 4, d = 3); // a pin, highlightedOpen with sample code →Each opens already rendered in your browser. Drag the Customizer sliders to resize it. No sign-up.

A revolved profile with a tapered hub and a bolt circle.
Open the preview →

The entry file uses an involute gear library in lib/ — multi-file projects resolve as they are.
Open the preview →

Size, wall, corner radius and lid fit are Customizer parameters; drag a slider and it rebuilds.
Open the preview →
The statements you will use most, each with how it works and where it trips people up. “Open online” loads the example into the viewer already rendered — change a number and watch it redraw.
cube · cylinder · sphereBox, cylinder, sphere. A cube starts with one corner on the origin, a cylinder with the centre of its base, a sphere with its centre; center = true centres a cube or cylinder on the origin. A cylinder with d1 ≠ d2 is a cone; $fn is the number of segments in a circle.
Open online →translate · rotate · mirrorMove, rotate (in degrees: about X, then Y, then Z), mirror. A transform goes in front of the object and the one nearest it acts first: translate(…) rotate(…) cube() rotates, then moves. mirror flips without copying — write the original again to keep both.
Open online →difference() · union() · intersection()Booleans. difference keeps the first object and subtracts everything after it: holes, slots, pockets. Let a cutter stick out 1 mm past both faces instead of ending flush, or the preview shows flickering leftovers and the render may complain. union joins; intersection keeps only the overlap.
Open online →hull()Wraps its children in one convex hull. Four cylinders make a plate with rounded corners; two make a slot. It only ever fills outwards — pair it with difference for anything concave.
Open online →minkowski()Sweeps the second object over the whole surface of the first: a box with a small sphere becomes a box with every edge rounded. The result grows by the sphere's diameter on every axis, so make the box that much smaller first.
Open online →linear_extrude()Pulls a 2D shape (square, circle, polygon, text) up along Z into a solid. twist turns it as it rises (in degrees); scale shrinks or grows the top. A circle with $fn = 6 is a hexagon.
Open online →rotate_extrude()Spins a 2D cross-section around the Z axis: cups, flanges, pulleys. The cross-section is the outline of one half of the part cut in two, and all of it must lie right of the Y axis (x ≥ 0).
Open online →forRepeats a shape: a bolt circle, a row of vents. A range [start : step : end] includes the end, so [0 : 5] is six values, 0 to 5. Inside a difference it cuts all the holes at once.
Open online →moduleWraps geometry into a part with parameters that you call like a function. Give the parameters defaults and pass only the ones you change.
Open online →// [min : step : max]Put a comment like // [20:5:120] after a variable at the top of the file and the viewer's parameter panel shows a slider for it; a comment on the line above becomes its label, and /* [Size] */ starts a group. Drag a slider and the number in the source changes with it.
Open online →text()Lettering. text() gives a 2D outline: linear_extrude it for raised letters, or subtract that from a part to engrave; halign and valign = "center" centre it on its position. The built-in fonts are the Liberation family; for other fonts and scripts, see the FAQ below.
Open online →All of it works the same in desktop OpenSCAD.
| Desktop OpenSCAD | This viewer | |
|---|---|---|
| Install | Download an installer | Open a web page |
| What runs your code | OpenSCAD | The same OpenSCAD, compiled to WebAssembly |
| Preview | F5: OpenCSG | Real geometry from Manifold, coloured by the F5 conventions |
| Multi-file projects | Open the entry file | Drop the folder |
| Sharing | Send the file | One link with the code in it |
| Export | STL / 3MF / OFF / AMF | STL (the triangles you see in the preview) and STEP (real B-rep) |
| Animation ($t) | Yes | No |
Put the code in the URL and the viewer opens with it loaded and rendered — no file, no sign-up. It is made for AI assistants: when ChatGPT, Gemini or Claude writes OpenSCAD for you, ask it for a Forgent3D preview link. Whoever opens it sees the model rendered, can drag the parameters and, once happy, export STEP. The “Open with sample code” button above is such a link.
Link format
https://app.forgent3d.com/scad#code=<CODE>Prompt to try
Write OpenSCAD for a ___ and give me a Forgent3D preview link: https://app.forgent3d.com/scad#code=<the code, encodeURIComponent-encoded>One command, and the agent renders your .scad with the real OpenSCAD on your machine: it reads back the bounding box, volume and echo() values, checks a three-view snapshot itself, exports STL / 3MF and hands you a link like the one above. No OpenSCAD install.
npx skills add forgent3d/forgent3d-skillsYes. The viewer is OpenSCAD itself, compiled to WebAssembly and running in your browser: writing code, rendering, dragging parameters and exporting STL all happen on the page, and STEP is there too for CAD software. No install and no sign-up.
Yes. The code is executed by OpenSCAD itself — a 2025 development snapshot with the Manifold geometry kernel — compiled to WebAssembly and running in your browser. The language, the bundled libraries and the Customizer comments behave as on the desktop.
That is OpenSCAD's own preview (F5) convention: faces left behind by an object subtracted with difference() are drawn in the “back face” colour, green in the default scheme. The viewer keeps the convention; an object with its own color() keeps that colour.
Yes. Drop in the whole downloaded folder so the files it includes come along. MCAD, Write.scad and BOSL2 are built in.
The viewer ships OpenSCAD's own Liberation fonts, which have Latin, Greek and Cyrillic letters; a character the font lacks comes out as an empty box. For another font, drop its .ttf or .otf file into the project folder next to the .scad (.ttc collections are not read), add use <file.ttf> to the code and pick it with font = "Family Name" — the font's own name, not the file name: Windows' simhei.ttf, for example, is font = "SimHei".
No. OpenSCAD runs in your browser and the .scad files are never uploaded; code after # in a link is not sent to the server either.
A typical model renders in under a second. A model that flattens to more than 150,000 nodes (loops unrolled) is beyond the in-browser build and says so. A long render can be stopped at any time.
The preview is OpenSCAD's own render, with circles as $fn facets. For the STEP export a CAD kernel rebuilds every primitive and boolean as exact geometry, so a circle is a true cylinder. The exported STL is the preview's own triangles. Colours exist only in the preview; neither the STL nor the STEP carries them.
Paste it into the viewer, or ask the assistant for a link of the form https://app.forgent3d.com/scad#code=<code> — it opens with the model already rendered.
Happy with the preview and need a STEP? The same tool, real B-rep, opens in Fusion, SolidWorks and FreeCAD.
Which OpenSCAD features convert exactly to STEP, and the current limits.
Article
Seeing what a piece of OpenSCAD code looks like does not require installing OpenSCAD. Paste it into a viewer in the browser, it renders when you pause, colours match the desktop, and the code can go into a link for someone else.
Article
The walls of a hole come out green and that is not a mistake. The preview's colour conventions, why the outer color() wins, and what happens to % and # in preview and render.