Free tools

G-code viewer

See a milling program's toolpath in 3D before it goes to the machine. Play it back line by line, and check its extents, depth, tools and run time. Your file is read in your browser and never uploaded.

Drop a G-code file

or click to choose one (.nc, .tap, .gcode, .ngc, .cnc, .txt)

Drop a file, paste a program or load the sample. Drag the view to turn it, shift-drag to pan, scroll to zoom. Dashed red lines are rapids, blue are cutting moves, green are drilling cycles.

What it reads

The viewer reads the common Fanuc-style G-code that most CAM posts write for milling machines and routers:

  • Rapids and feeds (G0, G1), arcs and helixes (G2, G3) given by I, J and K or by R, in all three planes (G17, G18, G19).
  • Millimetres and inches (G21, G20), absolute and incremental moves (G90, G91), and absolute or incremental arc centres (G90.1, G91.1).
  • Drilling cycles (G81 to G89, G73) with their R plane and G98 or G99 retract, drawn as the moves the machine makes.
  • Comments in brackets or after a semicolon, block numbers, and tool, spindle and feed words.

It is a viewer, not a machine control. Macro programs, subprograms and the special cycles of particular controls are not run: when a program uses them, the viewer says so under the summary. Where the machine's reference point is (G28) depends on the machine, so those moves are not drawn.

How the run time is worked out

Each cutting move's length is divided by its programmed feed, and rapids by the rapid rate you enter. A real machine slows down for corners and short moves, so the actual time is longer, often by 10 to 30 percent on detailed 3D finishing.

Checking a program before you run it

Look at the Z range first: the lowest Z should be where you expect the bottom of the cut, and no rapid should go below the top of the stock. Then play the program through and watch the rapids (dashed) between cuts. A viewer catches the big mistakes; it doesn't replace a dry run with the tool above the part.

Make the G-code from your model. Ruffle3D's Manufacture workspace makes facing, profile, pocket, adaptive clearing and drilling toolpaths from the part, shows the tool cutting the stock, and posts G-code for common controls. Free to try in your browser.

Open Ruffle3D