G-code explainer

Paste G-code or open a .gcode file to see what every line does in plain English, plus a summary of the whole print.

Common G-code commands

G0Rapid move (travel, no extrusion)
G1Linear move
G2Clockwise arc move
G3Counter-clockwise arc move
G4Pause (dwell)
G10Retract filament (firmware retraction)
G11Unretract filament (firmware retraction)
G20Set units to inches
G21Set units to millimeters
G28Home axes
G29Bed leveling probe / mesh
G80Mesh bed leveling (Prusa)
G90Absolute positioning
G91Relative positioning
G92Set current position
M17Enable stepper motors
M18Disable stepper motors
M73Set print progress
M82Extruder in absolute mode
M83Extruder in relative mode
M84Disable stepper motors (idle)
M104Set hotend temperature (do not wait)
M105Report temperatures
M106Set part cooling fan speed
M107Turn part cooling fan off
M109Set hotend temperature and wait
M112Emergency stop
M114Report current position
M115Report firmware info
M117Show message on display
M140Set bed temperature (do not wait)
M141Set chamber temperature
M190Set bed temperature and wait
M191Set chamber temperature and wait
M201Set max acceleration per axis
M203Set max feedrate per axis
M204Set default acceleration
M205Set jerk / junction deviation
M220Set speed factor override
M221Set flow (extrusion) factor
M300Play a beep
M400Wait for moves to finish
M420Enable/disable bed leveling compensation
M500Save settings to EEPROM
M501Load settings from EEPROM
M502Restore factory settings
M503Report settings
M600Filament change (pause for swap)
M851Set Z probe offset
M900Set linear/pressure advance factor
T0Select tool / extruder 0

Common questions

What is G-code?

G-code is the list of instructions a slicer writes for your printer: move here, extrude this much, heat to that temperature. Each line is one command.

What is the difference between G0 and G1?

G0 is a travel move, meant to be fast with no extrusion. G1 is a controlled move that usually extrudes. Many firmwares treat them the same.

What does M104 vs M109 mean?

Both set the hotend temperature. M104 sets it and continues immediately; M109 waits until the temperature is reached. M140 and M190 work the same way for the bed.

Is my G-code file uploaded?

No. The file is read and explained entirely in your browser.

More tools