Convert STL to G-code Online
A free STL to G-code converter and slicer that works completely in your browser. Select your printer profile, adjust your print settings, preview the output, and download ready-to-use G-code — with no software installation and no files uploaded to a server.
Drag an STL file onto this area
Accepts .stl files, in binary or ASCII form.
STL to G-code
Prepare your model and generate printer-ready G-code
·
- Triangles
- Dimensions
Fix the issue(s) below before slicing.
Preparing model…
Slice Complete
- Layers
- Print time
- Filament length
- Filament weight
- File size
- Est. material cost
Preview G-code
Printer
- Build volume
- Nozzle
- Filament
- Profile
Material
Starting values — adjust for your specific filament.
Print Settings
Smaller layer heights can improve vertical detail but increase print time.
Advanced Settings
Model Transform
Scale
- Original dimensions
- Print dimensions
Bed & Adhesion
Speed & Temperature
Infill & Walls
More walls can increase strength and surface quality.
Other Settings
Workflow
How It Works
The whole job takes a couple of minutes for most models.
- 1
Add your model
Drag an .stl file onto the drop area or browse for it. It opens in a 3D viewer straight away.
- 2
Match your hardware
Select the printer you own and the filament you are loading so bed size and temperatures start out right.
- 3
Fine-tune the print
Change layer height, wall count, infill, print speed and supports, or leave the defaults alone.
- 4
Slice and save
Run the slicer, check the time and filament estimate, then download the .gcode file.
What you get
Features
- Runs on your device
- Parsing and slicing are done by your browser, so large files never wait on an upload.
- See it before you slice
- Rotate, scale and reposition the model in a 3D view and check it against the build plate.
- Ready-made printer setups
- Start from a built-in printer and filament profile instead of typing in bed dimensions.
- Settings that matter
- Layer height, walls, infill pattern, speed, temperatures, supports and bed adhesion are all adjustable.
- Real toolpaths
- CuraEngine generates the G-code, the same engine behind the Cura desktop slicer.
- Time and filament estimates
- Get a print time and material figure after slicing, plus a text view of the G-code.
Your model never leaves this tab.
When you open an STL, your browser reads and slices it locally. The only things fetched from our server are the slicer engine and printer profiles, which arrive as ordinary static files the first time you visit. Your design is not sent anywhere.
- Slicing happens in the browser
- No account or login
- Files are not uploaded
- Nothing is stored after you close the page
About this tool
A free STL to Gcode converter, right in your browser
STLToGcode is a free online tool built for one job: turning a 3D model into a file your printer can actually run. If you have ever searched for a way to convert STL to Gcode without installing desktop software, this is that tool. Drop in an .stl file, pick your printer and filament, and the converter slices the model and hands you back a ready-to-print .gcode file — no account, no watermark, and nothing sent to a server.
What happens when you convert STL to Gcode
An STL file only describes shape — a mesh of triangles with no idea how thick a layer should be, how fast the nozzle should move, or what temperature the filament needs. G-code is the opposite: a plain-text list of machine instructions with no concept of the object's geometry. Converting STL to Gcode is the process that bridges the two. A slicer reads the mesh, cuts it into layers, and writes out the exact toolpath, extrusion amount, and temperature for every layer. That is exactly what happens when you use this STL to G-code converter: the browser handles the .stl to gcode conversion locally, using the same CuraEngine that powers the desktop Cura slicer, so the result is a real, tested toolpath rather than a rough approximation.
An STL to Gcode converter online, free — nothing to download
Most people looking for an STL to Gcode converter online free just want to go from model to print without installing anything. That's the whole premise here. There is no STL to Gcode converter free download involved, because there is nothing to download in the first place — you open the page, and the converter and printer profiles load as ordinary static files. From there you can convert STL to Gcode online free as many times as you like: one file or twenty, one printer profile or several, with the same free experience every time. Because everything runs client-side, converting STL to Gcode online also means your model file itself is never uploaded anywhere.
A real STL to Gcode slicer, not just a file converter
Plenty of tools claim to convert STL to Gcode but really just wrap a single fixed preset. This one is a full STL to Gcode slicer online: layer height, wall count, infill pattern and density, print speed, supports, and bed adhesion are all adjustable, and printer and filament profiles set sensible starting temperatures and bed dimensions so you are not guessing at machine limits. A 3D viewer shows the model against the build plate before you commit, and after slicing you get a print-time and filament estimate alongside the G-code itself — closer to a desktop slicer's workflow than a bare STL to G-code converter that only spits out a file.
Who converts STL to Gcode with this tool
Hobbyists slicing a single downloaded model, makers iterating on a design between prints, students and teachers who need to convert .stl to gcode on a shared lab computer without administrator rights to install anything, and anyone converting STL to Gcode on a Chromebook or a machine where a full slicer will not run, all land here for the same reason: it is fast, it is free, and it needs nothing beyond a browser tab.
Slice your first model in a couple of minutes — pick a printer, load your .stl, and download G-code that is ready for the bed.
Questions
Frequently Asked Questions
How do I convert an STL file to G-code?
Turning an STL into G-code is called slicing. A slicer cuts the 3D model into thin layers and writes the path your printer follows for each one. You can do it on this page in a couple of minutes with nothing to install. To convert several STL files to G-code, repeat the steps for each file, using Convert Another to start the next one.
- Add your STL file. Drag the .stl onto the drop area or choose Browse files. The model opens in a 3D viewer.
- Pick your printer and filament. Choose a printer profile (or Custom Printer) and a material such as PLA, PETG or ABS, so the bed size and temperatures start out right.
- Adjust the print settings if you want to. Layer height, walls, infill, speed and supports all have sensible defaults.
- Click Slice Model and check the print time and filament estimate when it finishes.
- Download the .gcode file, copy it to your printer's SD card or send it over your usual connection, and start the print.
Are STL files G-code?
No, they are different things. An STL file describes only the shape of a model, as a mesh of small triangles, and says nothing about how to print it. G-code is a plain-text list of machine instructions: where to move, how much filament to push out and which temperatures to hold. A slicer converts an STL file into G-code for a specific printer, filament and set of print settings, which is why a printer cannot run an STL directly.
How do I create a G-code file?
For 3D printing, you create a G-code file by slicing a 3D model. Open the model, usually an STL, in a slicer, choose your printer and material, set the print options and export the result. On this page that means adding your STL, picking a printer and filament, clicking Slice Model and downloading the .gcode file. If you do not have a model yet, design one in CAD software or download one from a model library and export it as STL first. You can also write G-code by hand in a text editor, but that is only practical for very short jobs.
Can I convert an STL file to G-code online for free?
Yes. STLToGcode is a free online STL to G-code converter with nothing to install. The slicing runs in your browser using CuraEngine, the engine behind the Cura desktop slicer, so your model is never uploaded and stays on your device. You choose a printer and filament, adjust the settings, preview the model and download printer-ready G-code.
How can I convert a G-code file to STL?
Not directly, and not accurately. G-code holds toolpaths, the lines the nozzle follows, rather than a solid surface, so the original shape cannot be recovered exactly. A few tools can rebuild a rough mesh from the paths, but the result is an approximation that usually needs a lot of cleanup. The reliable way to get an STL back is to go to the original STL or CAD file the G-code was sliced from. STLToGcode converts in one direction only, from STL to G-code. To see what a G-code file contains, open it in a G-code viewer or a text editor.
How do I change a G-code file?
G-code is plain text, so you can open it in any text editor and change individual lines. Common small edits are the nozzle temperature (M104 or M109), the bed temperature (M140 or M190) and feed rates (the F values) on Marlin-style printers. Changes to the shape of the print, such as layer height, infill, walls or supports, are not safe to make by hand. For those, change the setting and slice the STL again, which is quicker and less error-prone. Keep a copy of the original file, and preview the print before you start it, because a wrong value can overheat the nozzle or crash it into the bed.
What does G-code do?
It is the list of commands a 3D printer follows: where to move, how much filament to push out, and which temperatures to hold. A slicer produces it from your 3D model.
What is inside an STL file?
Only shape. An STL describes the outside surface of a model as thousands of small triangles, with no colour, texture or printer settings attached.