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
G0 | Rapid move (travel, no extrusion) |
G1 | Linear move |
G2 | Clockwise arc move |
G3 | Counter-clockwise arc move |
G4 | Pause (dwell) |
G10 | Retract filament (firmware retraction) |
G11 | Unretract filament (firmware retraction) |
G20 | Set units to inches |
G21 | Set units to millimeters |
G28 | Home axes |
G29 | Bed leveling probe / mesh |
G80 | Mesh bed leveling (Prusa) |
G90 | Absolute positioning |
G91 | Relative positioning |
G92 | Set current position |
M17 | Enable stepper motors |
M18 | Disable stepper motors |
M73 | Set print progress |
M82 | Extruder in absolute mode |
M83 | Extruder in relative mode |
M84 | Disable stepper motors (idle) |
M104 | Set hotend temperature (do not wait) |
M105 | Report temperatures |
M106 | Set part cooling fan speed |
M107 | Turn part cooling fan off |
M109 | Set hotend temperature and wait |
M112 | Emergency stop |
M114 | Report current position |
M115 | Report firmware info |
M117 | Show message on display |
M140 | Set bed temperature (do not wait) |
M141 | Set chamber temperature |
M190 | Set bed temperature and wait |
M191 | Set chamber temperature and wait |
M201 | Set max acceleration per axis |
M203 | Set max feedrate per axis |
M204 | Set default acceleration |
M205 | Set jerk / junction deviation |
M220 | Set speed factor override |
M221 | Set flow (extrusion) factor |
M300 | Play a beep |
M400 | Wait for moves to finish |
M420 | Enable/disable bed leveling compensation |
M500 | Save settings to EEPROM |
M501 | Load settings from EEPROM |
M502 | Restore factory settings |
M503 | Report settings |
M600 | Filament change (pause for swap) |
M851 | Set Z probe offset |
M900 | Set linear/pressure advance factor |
T0 | Select 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.