G-Code Viewer & Simulator
Inspect, pan, zoom, and simulate CNC or 3D printer G-code toolpaths (G0, G1, G2, G3) 100% locally in your browser.
Preview and Simulate CNC & 3D Printer G-Code in Your Browser
This G-code viewer and G-code simulator parses .gcode, .nc, .tap, and .ngc toolpaths right inside your web browser so you can catch rapid-move crashes, scale mix-ups (G20 inches vs G21 millimeters), and open contours before loading a program onto your CNC mill, router, laser engraver, or 3D printer.
All parsing and canvas simulation run 100% locally on your device. Drop a CAM output file or paste raw G-code into the editor box on the left to inspect every rapid (G0) and cutting (G1 / G2 / G3) move, scrub step-by-step through the machining sequence, and check bounding extents and estimated runtime with zero file uploads.
What This Online G-Code Viewer Checks
- Rapid vs. Cutting Path Distinction: Renders rapid positioning moves (
G0) as dashed amber lines and feed cutting moves (G1,G2,G3) as solid cyan paths, with a toggle to hide rapids for cleaner contour review. - Circular Arc Interpolation (
G2/G3): Accurately interprets clockwise (G2) and counter-clockwise (G3) arcs using incrementalIandJcenter offsets—critical for checking CNC pocket fillets and circular bolt bores. - Step-by-Step Toolpath Simulation: Drag the progress slider or click Simulate to watch the green toolhead indicator trace the exact execution order across your part.
- Instant Bounds & Distance Metrics: Displays overall
X × Yfootprint,Ztravel range (so you can immediately spot accidental deep plunges or missing safe-Z retracts), total cutting distance in millimeters, and feed-based estimated machining time. - Unit & Positioning Modes: Automatically honors
G20(inches converted to mm for unified display),G21(millimeters),G90(absolute coordinates), andG91(incremental moves).
Supported G-Code Commands
| Command | Meaning | Viewer Behavior |
|---|---|---|
G0 / G00 |
Rapid positioning | Drawn as dashed amber travel path |
G1 / G01 |
Linear feed interpolation | Drawn as solid cyan cut path; counted in cut distance |
G2 / G02 |
Clockwise circular arc (I/J) |
Interpolated smoothly along arc sweep |
G3 / G03 |
Counter-clockwise arc (I/J) |
Interpolated smoothly along arc sweep |
G20 / G21 |
Inches / Millimeters | Scales coordinates automatically |
G90 / G91 |
Absolute / Incremental mode | Updates coordinate accumulation accurately |
F<rate> |
Feed rate | Used to calculate estimated machining duration |
Pair Your G-Code Review with Browser CAD Tools
Need to adjust the 2D part geometry before regenerating CAM toolpaths? Open your source DXF inside Online CAD Editor, verify hole coordinates with our Bolt Circle Calculator, or convert SVG artwork to clean DXF contours via SVG to DXF Converter. Always run an air-cut or verify machine zero and Z-retract heights on your controller before cutting metal or hardwood.
More Online CAD & DXF Tools
Frequently Asked Questions
Which G-code file extensions can I open in this viewer?
Yes. This online G-code viewer opens .gcode, .nc, .tap, .ngc, and plain text CNC or 3D printer toolpath files locally in your browser with no signup and no file size queues.
Does the G-code simulator support G2 and G3 circular arcs?
Yes. Both G2 (clockwise) and G3 (counter-clockwise) arc commands using I and J center offsets are interpolated into smooth curves alongside G0 rapid and G1 linear moves.
How do I animate or step through a CNC toolpath?
Click the Simulate button below the viewport or drag the move-progress slider manually. A green crosshair tracks the exact toolhead position move by move so you can verify cutting order.
How can I catch Z-depth mistakes before running G-code on my CNC?
Check the Z Range box on the left sidebar to verify minimum plunge depth and maximum safe-Z retract height, and confirm your CAM post-processor emitted G21 (mm) or G20 (inches) as expected.
Are my CNC G-code files uploaded to a server?
No. Your G-code programs are parsed entirely inside local browser memory and are never uploaded to or stored on any server.