G-code Editor Online with 3D Preview
Drop a .gcode file onto the editor, click any line to edit it and see the move it draws in the 3D preview. Use search and replace, go to a layer, or run a batch tool to change temperatures, insert a pause or filament change at a layer, scale the feed rate or strip comments. Download the result and undo any step.
How to edit a G-code file online
- 1
Open a file
Drop a .gcode, .gco, .g or .nc file on the page, choose one from your device, or load the built-in sample to try the tools first.
- 2
Find the line
Search for a command or jump to a layer number. Click a line and the move it draws is marked in the 3D preview, so you can see where it sits in the print.
- 3
Change it
Edit one line, replace text across the file, or use a batch tool for temperatures, a pause at a layer, feed rate, Z offset or comments. Undo steps back.
- 4
Download and check
Save the edited file, then check the start G-code and temperatures for your printer and watch the first layer of the print.
What the batch tools change
Every tool changes only the lines it names and tells you how many it touched. Run one, look at the preview, and undo it if the result is not what you wanted.
| Temperatures | Rewrites the S value of nozzle and bed commands (M104, M109, M140, M190). A value of 0 is left alone, so the cool-down at the end still turns the heater off. |
|---|---|
| Insert at a layer | Adds a command such as M600 (filament change), M0 or PAUSE before a layer number or the first move above a Z height, for colour changes or inserts. |
| Feed rate | Scales every F value by a percentage from 10 to 300, from the first layer or from a layer you choose. Slow a whole print down, or only the top. |
| Z offset | Moves every layer from the second one up by a small amount. Any change that would put a move at or below 0.02 mm is refused, and nothing is changed. |
| Strip comments | Removes the text after a semicolon and empty lines to shrink the file. Commands are kept, and an option can keep the layer markers. |
| Search and replace | Plain text or a regular expression, case sensitive or not, with next and previous match, replace this line or replace all. |
Why edit G-code by hand
A slicer turns a model into thousands of lines of G-code, and most of the time you never read them. But there are plenty of small jobs that are quicker in the file than in the slicer: raising the nozzle temperature for the last layers, adding a filament change at a given height, removing a command your firmware does not understand, or fixing a start sequence on a file somebody else sliced. Re-slicing can take minutes and may change the print in other ways; a one-line edit changes just that line.
An editor that only shows text makes this hard, because a plain file of coordinates tells you very little about where the nozzle is going. Here every extruding move is also drawn in 3D, and the list and the picture are linked. Click a line and the move it draws is marked in the preview. That makes it easy to find the layer where a pause belongs, or the move that went wrong.
The editor works on the lines of the file as they are. It does not re-slice, re-order or re-calculate anything, so the rest of the file stays exactly as your slicer wrote it.
Large files, on any device
Sliced files are big. A detailed print can run to several hundred thousand lines and many megabytes, and a normal text box slows to a crawl on that. This editor draws only the rows you can see, so a file of up to 50 MB scrolls smoothly, and the search runs over the whole file without freezing the page. The 3D preview is built in the background in chunks, with a progress bar. For very large files it is updated when you press the button instead of after every edit, so typing stays responsive.
It also works on a phone or tablet: the list, the preview and the tools stack in one column, and the controls are large enough to tap. Everything runs on your own device. The file is not uploaded, no account is needed and closing the tab clears it, so a file with private designs or settings stays with you.
Binary G-code (.bgcode) and zip files are not supported, because they are not plain text. Export plain G-code from your slicer for those.
Edit with care
G-code is a list of commands your printer will carry out exactly as written, and a wrong line can crash the nozzle into the bed or heat something it should not. The editor does not know your printer, so it does not stop you from typing a bad command. The batch tools do refuse some changes: a temperature outside a sensible range, a feed rate outside 10 to 300 percent, and a Z shift that would put a move at or below 0.02 mm.
Make one change at a time, look at the preview, and download. Before you print, open the start of the file and check the homing, the temperatures and the bed and nozzle commands for your printer. Then watch the first layer, and be ready to stop the print. The editor only produces a file: it never sends anything to a printer.
If something looks wrong in the preview, undo the step. The editor keeps the last ten versions of the file so you can go back without opening it again.
Need something to print?
Turn a picture or a description into a 3D model, then slice it and edit the G-code here.
More G-code and printing tools
G-code editor FAQ
The G-code is made in your browser and downloaded as a file. Nothing is sent to your printer. Check the start G-code and temperatures for your printer before printing, and watch the first layer.