Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

G-code Viewer

Toolpaths of CNC, laser and 3D-printer programs in 3D, with run time and filament use.

Free preview, no sign-upIncluded in your pass Pro tool Pro pass: ₹179 for 30 days No upload Works offline Engineering

Try before you buy.

  • Free preview: the toolpath with a MySmartCoPilot watermark, its counts and size, and the first layers (up to 10); the run time, distances and filament are hidden.
  • Locked until you unlock it: download and copy.
  • Unlock: Pro pass, ₹179 for 30 days, a one-time payment that never renews.

Ways to unlock shows how to get the full result.

See passes (opens in a new tab)

Printing this result is locked in the free preview.

Paste G-code instead

Open a G-code file or try a sample.

Program

Estimated run time —

    Machine and time estimate
    mm/min
    mm/s²
    mm
    Filament
    USD

    Drag to turn, right-drag or Shift-drag to pan, scroll or pinch to zoom, double-click to fit. With the view focused: arrow keys turn (Shift: pan), + and − zoom, F fits.

    Next steps Done. What next?

    All engineering & electronics calculators

    About the G-code Viewer

    Open a G-code program — from a slicer for a 3D printer, a CAM program for a CNC mill or router, or a laser tool — and see its toolpath in 3D before you run it. Rapid moves and travel are drawn apart from cuts and extrusion, arcs (G2, G3) in all three planes, drilling cycles and inch programs are followed, and a layer or Z-level slider and a progress slider with play show the program building up move by move, with the line of G-code at each point.

    The report gives the size of the part, the number of lines, moves and layers, the cutting or extrusion distance and the travel, and an estimated run time from a look-ahead planner that brakes for corners and accelerates out of them, as firmware does (Grbl, Marlin, Klipper). For 3D prints it adds the filament length, its mass for the material you choose and its cost at your price per kilogram, and shows the slicer’s own estimate when the file carries one. The program is read on your device and never uploaded.

    Without a pass, the free preview shows the toolpath with a watermark, the counts and the part size, and the first layers of the table; the run time, distances, filament and the other figures, Copy report, the CSV and the PNG of the view come with a Pro pass.

    How to use it

    1. Choose or drop a G-code file (.gcode, .nc, .ngc, .tap …), paste a program, or try a sample. The machine type is guessed from the program; change it under Machine and time estimate if needed.
    2. Turn the view by dragging, pan with the right button or Shift, zoom with the wheel or a pinch; use Top, Front, Side or 3D. Colour the path by kind of move, feed rate, layer or feature.
    3. Move the layer slider to see the part up to a layer (or a mill’s passes down to a depth), tick Only this one for a single layer, and use Program progress or Play to follow the program.
    4. For an accurate time, enter your machine’s acceleration and junction deviation (the file’s own M204 and M205 J are used when it sets them). For prints, choose the filament and type its price per kilogram.
    5. Copy the report, or download the layer table as CSV and the view as a PNG — with a Pro pass, or after unlocking this result.

    Examples

    The CNC sample
    Input
    A 100 × 60 mm outline with R10 corners in two 1.5 mm passes, a slot with an R5 circle, four holes drilled with a G81 cycle; two tools
    Result
    719.1 mm of cutting, Z levels at −1.5, −3 and −2 mm, the holes drawn from R2 down to Z −6, tools T1 and T2 at 12,000 and 3,000 rpm
    The 3D-print sample
    Input
    A 20 mm hollow square, 5 layers of 0.2 mm, two perimeters each, 1 mm retractions, M204 S1000
    Result
    782 mm of extrusion, 28.3 mm of 1.75 mm filament (about 0.08 g of PLA), 10 retractions, 5 layers
    Why the planner matters
    Input
    G1 X100 F600 on its own, at 500 mm/s²
    Result
    10.02 s: 0.1 mm to reach 10 mm/s at each end; a program of many short moves can take far longer than distance ÷ feed

    Common uses

    • Checking a CNC program from CAM for crashes, missing passes or a wrong origin before running it
    • Previewing a 3D print layer by layer and estimating its time, filament and material cost
    • Seeing a laser job’s cut and travel moves and how long it will take
    • Finding where in a long program a move happens, with its line of G-code

    What the viewer understands

    • Motion: G0, G1, G2 and G3 (centre offsets I J K, absolute with G90.1, or radius R, full circles and helices), planes G17, G18 and G19, millimetres and inches (G21, G20), absolute and incremental positions (G90, G91) and G92 offsets (G92.1 cancels them). On a CNC machine, G28 and G30 draw the move to their intermediate point; where the home position is, and where G53 moves in machine coordinates go, is set on the machine and not in the program, so those moves are not drawn.
    • Drilling cycles and dwells: G81, G82, G83 and G73 pecking, G85, G86 and G89, with G98 and G99 retract, until G80. A dwell (G4, or P in G82 and G89) is read in seconds, as RS274/NGC, LinuxCNC and Grbl read it, or in milliseconds when it is written as a whole number of 100 or more (G04 P1000), as Fanuc-style controls read it.
    • 3D printers: the E axis (absolute M82 or relative M83, G92 E resets), retractions, G4 dwell (P in milliseconds, S in seconds, as Marlin reads them), M204 and M205 J accelerations, Cura, PrusaSlicer and similar layer and feature comments, and their own time and filament estimates.
    • Not interpreted: cutter compensation (G41, G42: the path is drawn as programmed), rotation and scaling (G68, G51), local offsets (G52), variables and expressions (#, [ ]), macros and subprograms (G65, M98, M99) and per-revolution feeds; the notes list what a program uses.

    The language follows the NIST RS274NGC interpreter report (the basis of ISO 6983-style G-code) and the Marlin G-code reference for 3D-printer extensions.

    How the run time is estimated

    Each move gets a trapezoidal speed profile: it accelerates at the set rate, cruises at its feed and brakes for the next corner. The speed through a corner comes from the junction-deviation rule that Grbl and Marlin use, v² = a·δ·sin(θ/2) ÷ (1 − sin(θ/2)); a backward and a forward pass make sure the machine can always stop and can always reach each speed. Dwells are added. Heating, pauses for filament changes, tool changes and the machine’s own speed limits per axis are not, so treat the time as an estimate. Marlin’s own default junction deviation is 0.013 mm; accelerations vary a lot from machine to machine.

    Limitations

    • Only the motion of the program is simulated: no stock removal, no collision check with the machine, fixtures or holder.
    • Work offsets (G54–G59) are treated as one coordinate system; G92 offsets are applied.
    • The run time is an estimate: per-axis limits, firmware look-ahead settings, heating, pauses and tool changes change it.
    • Very large programs need memory: up to 150 MB opens on a computer; phones may run out of memory sooner.

    Privacy

    Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

    Frequently asked questions

    What do I get without a pass?

    Without a pass, G-code Viewer shows the toolpath with a MySmartCoPilot watermark, its counts and size, and the first layers (up to 10); the run time, distances and filament are hidden. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.

    Can I see a 3D print layer by layer?

    Yes. Move the layer slider to show the print up to a layer, tick “Only this one” to see a single layer, and use the progress slider or Play to watch the nozzle move through the program, with the line of G-code it is on.

    How accurate is the time estimate?

    It models acceleration and cornering the way the firmware plans moves, so with your machine’s real acceleration and junction deviation it is usually close. It cannot know heating time, pauses or firmware limits it is not told about; slicers that model your printer exactly can be closer for prints.

    Why are rapids drawn in red?

    Rapid (G0) moves and 3D-printer travel move without cutting or extruding, so they are coloured apart: a rapid through the part is the first thing to look for before running a CNC program. Untick “Rapids and travel” to hide them.

    Which machines does it support?

    Programs for CNC mills and routers (Fanuc-style, LinuxCNC, Grbl, Mach3/4 and similar RS274 dialects), laser engravers driven by Grbl-style G-code, and 3D printers running Marlin, RepRap, Klipper or similar firmware.

    Is my file uploaded?

    No. The program is read and drawn by your browser on your device, and the page keeps working offline once it has loaded.

    Quick answers and tool search

    Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.