STL to GCode: Free Online Slicer
Drop an STL, pick your printer and filament, and press Slice. You get a .gcode file with walls, solid top and bottom layers, infill and a skirt, plus a layer-by-layer preview and a rough time and filament estimate. It runs in your browser, so the model is never uploaded. It does not generate supports.
How to convert an STL to GCode
- 1
Load your STL
Drop a binary or ASCII STL, or press the sample button to slice a built-in 20 mm cube with a hole. The model is placed in the middle of the bed and dropped onto it.
- 2
Check size and printer
Pick a printer preset or enter your own bed size, then check the size in millimetres. Use scale or target height if the part is too big or too small.
- 3
Choose the settings
Set layer height, walls, infill and the filament. The advanced section holds speeds, retraction, fan, the skirt and the start and end G-code.
- 4
Slice and download
Press Slice, scrub through the layers to check the paths, then download the .gcode. Open it on your printer only after you have checked the start G-code and temperatures.
Default settings at a glance
These are the values the slicer starts with for a 0.4 mm nozzle and 1.75 mm filament. Every one of them can be changed before you slice.
| Layer height | 0.20 mm, with a 0.20 mm first layer (choose 0.10 to 0.32 mm). |
|---|---|
| Walls and skin | 2 walls, 4 solid top layers and 3 solid bottom layers. |
| Infill | 15% rectilinear, alternating at +45 and -45 degrees on each layer. |
| Temperatures | PLA at 200 C nozzle and 60 C bed; PETG at 235 C and 80 C. Both are editable. |
| Speeds | 50 mm/s printing, 20 mm/s first layer, 150 mm/s travel. |
| Retraction | 5 mm at 40 mm/s for the Marlin presets, 0.8 mm at 35 mm/s for the Klipper preset. |
| Skirt and fan | A two-loop skirt; the part-cooling fan is off on the first layer. |
| Supports | None. The slicer warns when a lot of the surface overhangs. |
What slicing an STL actually does
An STL is only a skin made of triangles. A printer cannot read it, because it needs a list of moves: go here, extrude this much, go there. Slicing cuts the skin into thin horizontal layers, finds the outline of the part on each layer, and then plans how to fill it: outer walls first, then inner walls, then infill inside and solid skin on the top and bottom.
This page does that with a planar slicer that runs in a background thread of your browser. For every layer it intersects the triangles with a plane, joins the cut lines into closed loops, shrinks the loops to make the walls, and lays down infill lines. Each move gets an extrusion length worked out from the line width, the layer height and your filament diameter. The result is plain G-code that Marlin and Klipper printers understand.
What this slicer does not do
It makes no supports. If your model has a steep overhang or a bridge, the plastic will hang in the air and may sag or fail, so turn the part until the overhangs are small, or pick a model that prints without them. The tool measures how much of the surface leans out past 60 degrees and tells you before you slice. There are also no tree supports, no multi-material or multi-colour prints, no variable layer height and no gap fill: it is a single-nozzle, flat-layer slicer for ordinary parts.
Very thin features, narrower than one extrusion line, are dropped and listed as a warning. Large, dense meshes work but take longer, and the tool stops at 1.5 million triangles; shrink heavy files first with the STL size reducer, and fix holes in the mesh with the STL repair tool if the slicer reports open edges.
First-print checklist
Before you press print on a new file: open the G-code in a viewer or look through the layer slider, and confirm the part sits where you expect on the bed. Read the start G-code in the advanced section; if your printer needs its own macro, home or bed-levelling command, put it there. Check the nozzle and bed temperatures against what your filament maker recommends.
Then print it and stay beside the machine for the first layer. A first layer that is too high lifts at the corners; too low and the nozzle drags. If it is off, adjust the Z offset and print again. Leave the first print small, such as the sample cube, so a mistake costs little filament and time.
No model to print yet?
Make a printable 3D model from a photo or a short text prompt with AI, or turn a picture straight into an STL, then bring it back here and slice it for your printer.
More free G-code and 3D printing tools
STL to GCode questions
Check the start G-code and temperatures for your printer before printing, and watch the first layer. This slicer only writes a file: it never sends anything to a printer. Print time is an estimate. Marlin and Klipper are named only to describe the G-code dialects; 3D AI is not affiliated with their projects.