---
title: "Convert STL to gcode: a free beginner's guide"
slug: convert-stl-to-gcode
description: "Convert STL to gcode the right way: the only real conversion is slicing. Do it free in any browser on a Chromebook, tablet, or phone, with no install."
target_keyword: convert stl to gcode
secondary_keywords:
  - convert stl to gcode online
  - stl vs gcode
  - 3mf vs stl vs gcode
audience: hobbyists
category: guides
tags:
  - gcode
  - stl
  - beginners
schema: TechArticle
last_modified: 2026-06-26
published: 2026-06-26
author: albert
readtime: 9
og_image: https://cdn.simplyprint.io/i/landing/articles/convert-stl-to-gcode/og.jpg
card_image: gcode_preview.png
og_image_alt: A diagram showing an STL model becoming G-code through a slicer, with the SimplyPrint cloud slicer running OrcaSlicer in a browser
cta_inline:
  text: Try the SimplyPrint cloud slicer free
  url: /features/slicer
cta_final:
  text: Slice your first file free
  url: /signup
related_features:
  - SlicerFeatureController
  - OrcaSlicerFeatureController
  - PrusaSlicerFeatureController
related_articles:
  - what-is-a-3mf-file
  - browser-based-3d-slicer
  - slice-online-chromebook
faq:
  - q: Can a 3D printer print an STL file directly?
    a: |
      No. An STL only stores the shape of the model, not the instructions a
      printer needs to move, heat, and extrude. You must slice the STL into
      G-code first, and that G-code is what the printer actually reads.
  - q: Is converting STL to G-code the same as slicing?
    a: |
      Yes. "Convert STL to G-code" and "slice an STL" describe the same step.
      A slicer reads your STL, splits the model into layers for your specific
      printer and filament, and writes the G-code toolpaths the machine follows.
  - q: Why do online "STL to G-code converter" tools give bad prints?
    a: |
      Most one-click converter tools apply generic defaults with no knowledge of
      your printer, nozzle size, bed size, or filament. G-code is printer-specific,
      so a file sliced for the wrong machine often fails or wastes filament. A real
      slicer asks for your printer profile first.
  - q: What is the difference between STL, 3MF, and G-code?
    a: |
      STL stores raw geometry only. 3MF is a modern container that holds the
      geometry plus colors, units, and often the full slicer project. G-code is the
      final, printer-specific list of movements. You slice an STL or 3MF to produce
      G-code.
  - q: Can I convert STL to G-code online for free?
    a: |
      Yes. A cloud slicer like SimplyPrint runs the real OrcaSlicer, PrusaSlicer,
      Bambu Studio, ElegooSlicer, and Creality Print engines on a server, so you
      upload an STL, pick your printer
      profile, and download G-code in any browser. The free plan includes monthly
      slices with no install.
  - q: Can I convert STL to G-code on a Chromebook or tablet?
    a: |
      Yes. Desktop slicers do not run on Chrome OS or tablets, but a browser-based
      cloud slicer does the slicing on a server and streams the result back, so any
      device with a browser can produce G-code.
tldr: |
  You cannot "convert" an STL to G-code with a simple file converter, because the
  only real conversion is slicing. A slicer turns your STL or 3MF geometry into
  printer-specific G-code based on your machine, nozzle, and filament. SimplyPrint
  slices in any browser, free, using the real OrcaSlicer, PrusaSlicer,
  Bambu Studio, ElegooSlicer, and Creality Print engines.
expertise_note: |
  Written by the SimplyPrint team, which runs the unmodified OrcaSlicer,
  PrusaSlicer, Bambu Studio, ElegooSlicer, and Creality Print engines in the
  browser for hobbyists, schools, and print farms slicing millions of files a year.
---

To convert STL to gcode you have to slice the file, not run it through a file converter. An STL stores only the shape of your 3D model, while G-code is a printer-specific list of movements, temperatures, and extrusion amounts, so the two are not interchangeable formats. A program called a slicer reads your STL, splits the model into layers tuned for your exact printer and filament, and writes out the G-code the machine actually follows.

This guide explains the difference between STL, 3MF, and G-code in plain terms, shows the real step-by-step way to convert STL to gcode, and warns you off the thin "STL to G-code converter" web tools that ignore your printer. By the end you will know exactly how to produce reliable G-code, for free, in any browser on any device.

:::image src="stl_to_gcode_flow.png" alt="A flow diagram: an STL file (just geometry, a triangle mesh) passes through a slicer that reads your printer and filament profile, which produces G-code containing printer motion, temperatures, and extrusion" caption="The only real STL-to-G-code path: a slicer reads your printer and filament profile, then produces the G-code your machine follows.":::

## What's the difference between STL, 3MF, and G-code?

STL, 3MF, and G-code sit at three different stages of the 3D printing pipeline. STL and 3MF describe the model you want to print, while G-code describes how a specific printer should build it. You move from model to print by slicing, which reads the geometry and produces the G-code. Think of STL as a photo of an object, 3MF as a project file that also remembers your settings, and G-code as the turn-by-turn directions your printer follows. The table below maps each one to what it stores and where it fits.

| Format | What it stores | Stage | Printer-specific? |
|---|---|---|---|
| STL | Raw surface geometry (a mesh of triangles) | Model | No |
| 3MF | Geometry plus color, units, multi-plate, and often the full slicer project | Model / project | No (until sliced) |
| G-code | Exact movements, temperatures, fan, and extrusion per layer | Print job | Yes |

The key takeaway: STL and 3MF are inputs, G-code is the output, and the slicer is the only thing that bridges them.

## Can a 3D printer print an STL file directly?

No. A 3D printer cannot print an STL directly, because an STL contains no instructions the machine can execute. It is a static description of a surface, a mesh of triangles with no notion of layers, speed, temperature, or your printer's build volume. The printer's firmware only understands G-code, which lists each move in order: heat the nozzle to 215 degrees, move to this coordinate, extrude this much filament, turn the fan on at this layer, and so on.

That is why every 3D print workflow includes a slicing step. The slicer takes your STL (or 3MF), asks which printer and filament you are using, and calculates the thousands of individual moves needed to build the object. Skipping that step is impossible: there is no firmware that reads STL files.

## How to convert STL to G-code, step by step

Converting an STL to G-code means slicing it. The process is the same whether you use a desktop slicer or a browser-based one, and it always starts by telling the slicer about your printer. Here is the reliable path from STL to a print-ready file:

:::image src="model_loaded.png" alt="The SimplyPrint cloud slicer with an imported STL model sitting on the virtual build plate, a Bambu Lab P1P printer profile selected, PLA filament chosen, and layer height and support settings in the left panel" caption="An imported STL on the build plate in the SimplyPrint cloud slicer, with the printer profile and filament chosen before slicing.":::

1. **Open a slicer and select your printer profile.** This is the most important step. The slicer needs your printer model, nozzle size, and bed size so the G-code matches your machine.
2. **Import the STL or 3MF file.** Drag it in or upload it. The model appears on a virtual print bed.
3. **Choose a filament profile.** PLA, PETG, ABS, and so on each need different temperatures and speeds.
4. **Set layer height and infill.** A 0.2 mm layer height and 15 percent infill is a sensible starting point for most prints.
5. **Add supports if the model has overhangs.** The slicer can generate these automatically.
6. **Click slice.** The slicer calculates every toolpath and produces the G-code, along with a time and filament estimate.
7. **Save or send the G-code.** Download it to an SD card or USB drive, or send it straight to a connected printer.

:::callout type=tip
Always preview the sliced result before printing. A good slicer shows a layer-by-layer G-code preview so you can spot missing supports or a model that floats off the bed before you waste filament.
:::

:::image src="gcode_preview.png" alt="The SimplyPrint cloud slicer showing the sliced G-code preview of a model on the build plate, with toolpaths visualised by color, alongside the print time and filament estimate" caption="The G-code preview after slicing: the real toolpaths your printer will follow, with a print time and filament estimate.":::

You can run every one of these steps in [the SimplyPrint cloud slicer](/features/slicer) without installing anything, which is covered below.

## Why "STL to G-code converter" tools give bad results

Search results are full of one-click "STL to G-code converter" pages that promise an instant download, and they are the main reason beginners get failed prints. G-code is printer-specific, so a file that does not know your printer is almost guaranteed to print badly. These thin converter tools skip the one thing that matters most: a real printer profile.

Here is what those quick converters typically get wrong:

- **No printer profile.** They apply a generic bed size and origin, so the model can print off the edge or in mid-air.
- **No nozzle or filament awareness.** Wrong temperatures and flow cause stringing, weak layers, or clogs.
- **No support or adhesion control.** Overhangs collapse and parts peel off the bed.
- **No preview.** You cannot check the toolpaths before committing filament and time.

A genuine slicer asks for your printer first, then produces G-code calibrated to it. That is the difference between "convert stl to gcode" as a marketing checkbox and slicing that actually prints. As the [OrcaSlicer documentation](https://github.com/SoftFever/OrcaSlicer/wiki) makes clear, the printer, nozzle, and filament settings are inseparable from the resulting toolpaths.

## Convert STL to gcode online with no install (Chromebook or tablet)

You can convert STL to gcode online for free, with no software to install, by using a cloud slicer. A cloud slicer runs the slicing engine on a server and streams the G-code back to your browser, so a Chromebook, tablet, or low-spec laptop can produce the same result a powerful desktop would. SimplyPrint does exactly this, and it is the part no thin converter tool can match: it runs the genuine engines.

SimplyPrint runs the unmodified, upstream OrcaSlicer, PrusaSlicer, Bambu Studio, ElegooSlicer, and Creality Print engines through their official command-line interfaces. That means your G-code is identical to what the desktop apps produce, and any profile you tuned at home imports and works the same. You are not getting a watered-down generic engine, you are getting the real slicer in a browser tab.

:::feature OrcaSlicerFeatureController:::

To convert an STL to G-code online with SimplyPrint:

- **Sign up free.** No credit card, and the free plan includes monthly cloud slices.
- **Upload your STL or 3MF.** Files live in your account, accessible from any device.
- **Pick the engine and printer profile.** Choose OrcaSlicer, PrusaSlicer, Bambu Studio, ElegooSlicer, or Creality Print and your printer from thousands of built-in profiles.
- **Slice and download.** The job runs on our servers; download the G-code, queue it, or send it to a connected printer.

This is the same workflow described in our guide to [slicing on a Chromebook](/articles/slice-online-chromebook), and it works identically on an iPad or a school-managed laptop where desktop slicers are blocked.

:::cta text="Convert your STL to G-code free in the browser" url="/features/slicer":::

## STL vs gcode vs 3MF: which should you keep?

The STL vs gcode question, and the wider 3mf vs stl vs gcode question, really comes down to sharing and re-slicing: keep the model file, not the G-code. STL and 3MF can be re-sliced for any printer, while G-code is locked to the one machine it was sliced for. If you hand someone your G-code, they can only print it on a printer identical to yours, with the same nozzle and filament. Hand them the STL or 3MF and they can slice it correctly for their own setup.

This is where 3MF earns its place. Because a 3MF can carry the full slicer project (geometry, plate layout, colors, and your settings), it is the format to share when you want someone to reproduce your exact print. We cover that in depth in [what is a 3MF file](/articles/what-is-a-3mf-file). The short version for choosing what to keep:

- **Keep the STL or 3MF** as your source of truth for re-slicing later.
- **Keep the G-code** only for the specific printer you sliced it for, as a quick reprint.
- **Share the 3MF** when you want a friend or a print farm to reproduce your settings exactly.

A platform like SimplyPrint keeps the model and its sliced G-code together in your account, so you always have both without juggling files. With [shared profiles across a fleet](/features/slicer), one tuned setup can slice consistently on every machine in a farm or classroom, which is impossible to do by passing G-code around.

## What this means for beginners

If you came here looking for a button that turns an STL into G-code, the honest answer is that the button is a slicer, and using a real one is the difference between a clean first print and a stringy mess. The "conversion" is slicing, and slicing needs to know your printer. Once you internalize that, the whole pipeline makes sense: model in STL or 3MF, slice for your machine, print from G-code.

The good news is that doing it properly is free and takes minutes. You do not need a powerful PC or any installed software. Upload your STL, pick your printer, click slice, and you have correct G-code, on whatever device you happen to be holding.
