Format

G-code

G-code is machine instruction code for 3D printers, CNC mills, laser cutters, and other computer-controlled fabrication machines.

What is G-code?

G-code is a machine instruction language that tells computer-controlled fabrication equipment how to move, extrude, cut, heat, and operate. In 3D printing, G-code is usually generated by a slicer from a mesh model and contains layer-by-layer toolpath commands for the printer.

How it works

A G-code file is a plain-text list of commands such as movement coordinates, feed rates, temperatures, fan speeds, and extrusion amounts. Different machines and firmware interpret common commands similarly, but many dialects add machine-specific commands and settings. G-code matters because it is the final manufacturing instruction set that turns a digital 3D model into physical motion. Artists usually do not write all G-code by hand, but they may inspect or edit it to tune print starts, pauses, material changes, or machine behavior.

Use cases

  • Exporting a 3D model to a slicer that generates printer-ready G-code.

  • Checking toolpaths before a 3D print to verify supports, layers, and travel moves.

  • Adding custom start, end, pause, or filament-change commands for fabrication.

Related Tools

3D File Converter

Convert between FBX, OBJ, GLB, STL and more.

3D File Compressor

Shrink 3D file size without losing visible quality.

Online 3D Viewer

View and inspect any 3D file right in your browser.

3D Text Generator

Turn text descriptions into 3D text and shapes.

Frequently Asked Questions

G-code tells a 3D printer where to move, how fast to move, when to extrude material, and what temperatures or fans to use during a print.

G-code is not a 3D model format. It is a machine instruction format generated from a model by slicer or CAM software.

Yes. Most G-code files are plain text, so they can be opened and inspected in a text editor.

No. Many printers share common G-code commands, but firmware such as Marlin, RepRapFirmware, Klipper, and proprietary systems can support different command sets.

Slicer software such as PrusaSlicer, Cura, Bambu Studio, and OrcaSlicer generates G-code from 3D models and print settings.

G-code files commonly use .gcode, but some machines and workflows use extensions such as .gc, .nc, or .tap.

Yes. Incorrect G-code can cause crashes, overheating, extrusion problems, or unsafe motion, so edits should be tested carefully.

STL stores a triangle mesh that describes surface geometry, while G-code stores machine commands that control fabrication movement and process settings.

Yes. G-code is widely used for CNC milling, CNC routing, lathes, laser cutters, plotters, and other computer-controlled manufacturing machines.