G-code Tools
G-code visualizers, post-processors, and macros that sit between slicer and printer.
The slicer (FDM) gives you G-code; sometimes you need to inspect, edit, or programmatically modify it before printing. Visualizers, post-processing scripts, and Klipper macro libraries cover this gap.
G-code visualizers (browser)
- ★ gcode.ws / GCode Analyzer — free; drop a
.gcodefile in the browser, get layer-by-layer playback, time and filament estimates. The "what does this print look like?" go-to. - ★ Kiri:Moto's preview — full G-code preview alongside its slicer/CAM view; runs locally.
- NC Viewer (
ncviewer.com) — browser; CNC-leaning but reads FDM G-code fine. - OctoPrint G-code viewer plugin — preview within OctoPrint.
- Mainsail / Fluidd live preview — built-in G-code rendering for queued + active prints.
G-code visualizers (desktop / library)
- Repetier-Host G-code preview — bundled with Repetier-Host; mature, cross-platform.
- gcodeviewer (npm) — embeddable in your own web app; powers some hosted tools.
- OrcaSlicer / PrusaSlicer / Bambu Studio preview — built-in; the most accurate (knows about retraction, MVS, AMS swaps).
Post-processing scripts
- ★ PrusaSlicer / OrcaSlicer Post-processing scripts — point at any executable; runs after every slice. Standard hook for purge-tower tweaks, M73 progress injection, etc.
- ★ Klipper macros (
gcode_macro) — defined inprinter.cfg; run on the host, can call any Python or shell. The most flexible runtime hook. - Cura PostProcessingPlugin scripts — Python scripts that run inside Cura.
gcode-preprocessor, community Python scripts on GitHub — pause-at-layer, color-change at layer, M600 swap, ironing tweaks.
G-code macros & community libraries
- ★ Klipper-Macros (
th33xitus/klipper-macros) — the canonical START_PRINT / END_PRINT / PAUSE / RESUME / CANCEL macro library for Klipper. - ★ PrusaSlicer / OrcaSlicer macro snippets — community-maintained start/end G-code templates per printer.
- NevermoreMacros — bed-fan / chamber-fan automation for enclosed printers.
- Mainsail / Fluidd macro UI — both UIs let you wire macros to one-tap buttons.
Pause-at-layer / color change / multi-color tooling
- ★ OrcaSlicer "Add pause at layer" / "Change filament at layer" — built-in; emits proper M600 / M601 / pause sequences.
- PrusaSlicer custom G-code at layer — same idea, slightly less polished UI.
- HueForge — paid (cheap); generates filament-change G-code for full-color filament prints (lithophanes + multi-color flat art). Companion to MakerWorld and Printables image-to-print workflows.
- Fullcontrol.xyz — free; programmatic G-code generation in Python; useful for vase-mode art and experiments.
G-code editors / inspectors
- Notepad++ / VS Code with
.gcodesyntax — surprisingly common; G-code is just text. - OctoPrint Terminal tab — send raw G-code commands during a print.
- Mainsail / Fluidd console — same.
- gcode_lint — community linters that flag suspicious moves before printing.
Time & filament estimation
- ★ OrcaSlicer / PrusaSlicer / Bambu Studio built-ins — accurate enough; calibrated to the slicer's speeds.
- gcode.ws — second-opinion estimate.
klipper_estimator— open-source CLI that re-estimates G-code time based on Klipper's actual motion config (input shaping, accel limits). Often more accurate than the slicer estimate on a tuned Klipper printer.- OctoPrint PrintTimeGenius plugin — adaptive time estimation.
Conversion / arc-fitting / optimization
- ★ arc-welder — open source; converts G1 line segments to G2/G3 arcs for smaller files and smoother motion. Available as OctoPrint plugin and CLI; built into Klipper as
gcode_arcs. - G-code optimizer (community) — deduplicates consecutive moves, useful for vase mode.
- OrcaSlicer "Arc fitting" — built-in setting; emits G2/G3 directly.
Programmatic G-code (write your own)
- ★ Fullcontrol — Python lib for generating G-code from scratch (great for non-planar, vase-mode, calibration-experiment art).
- gcodepy / mecode — Python G-code emitters.
- Vase-mode generators (community OpenSCAD scripts) — single-perimeter spiral G-code from a contour.
Pick this if…
- Quick "what's this G-code do" check: drop it into gcode.ws.
- Custom start/end behavior on every print: Klipper macros (Klipper) or post-processing scripts (slicer-side).
- Multi-color or pause-at-layer: OrcaSlicer's built-in tools, plus HueForge for full-color art.
- More accurate time estimates than the slicer gives: klipper_estimator.
- Smaller G-code, smoother arcs: arc-welder or your slicer's arc-fitting toggle.
- Generate G-code programmatically: Fullcontrol.