Free G-code viewer

Look at a G-code program before you run it. Drop the file in and you get the toolpath in 3D, with rapid moves and cutting moves in different colours, plus the travel limits in every axis.

Drop a G-code file hereor click to choose one from your computerAccepts .nc, .gcode, .tap, .ngc and similar. Read in this browser, never uploaded.
Rapid (G0) Cutting move

What this viewer shows you

Drop a program in and you get the toolpath drawn in 3D. Rapid moves are drawn in a faded copper and cutting moves in near-black, which is the quickest way to spot the mistake everyone worries about, a rapid that goes straight through the part or the fixture.

You also get the travel in each axis, so you can check the program fits inside your machine and inside your workholding before you cut anything.

What it reads

What it does not do

The viewer draws where the tool centre goes. It does not know your tool diameter or remove material, so it cannot warn you that you are about to crash into a vise it cannot see. It does not apply cutter compensation or follow subprogram calls and macros. Inside a drilling cycle it leaves out the dwell and the spindle orientation at the bottom of the hole. A program does not say where the tool is before its first move, so the viewer starts it at X0 Y0 Z0 and draws the first move from there.

Treat it as a fast way to see the shape of a program and catch obvious problems. It does not replace running the program above the part with the spindle off, and it does not replace a proper machine simulation.

File formats

G-code goes by a lot of extensions depending on who wrote the post processor. This viewer accepts .nc, .gcode, .tap, .ngc, .cnc, .mpf, .eia and plain .txt. Comments in either parentheses or after a semicolon are ignored, as are line numbers and block delete slashes.

Questions

Is my program uploaded anywhere?
No. The file is parsed in your browser and never sent anywhere, which matters because a program can tell someone a great deal about the part you are making.
Which controls does it support?
It reads the common motion words that nearly every control shares, which covers most output from Fusion, Mastercam and similar. It also reads the standard canned drilling cycles. Control specific extras such as macros are skipped, and the viewer does not guess at what they do.
Does it show drilling cycles such as G81 and G83?
Yes. Each hole in a G73, G74, G76 or G81 to G89 cycle is drawn as a black feed line from the R plane to the Z depth, with copper rapids across to the hole and back up to the R plane or the starting height, as G99 or G98 sets. Peck drilling shows every peck set by Q. Dwells and spindle orientation are not shown.
Why are some moves missing?
Most likely they are in a subprogram or a macro. The viewer does not follow M98 or G65 calls, so a subprogram kept in a separate file is not drawn, and one at the end of the same file is drawn once, in the order it appears.
Does it check for crashes?
No. It draws where the tool centre travels. It does not know your tool, your stock or your fixture, so it cannot tell you that a move is unsafe. Use it to catch obvious problems before you prove out the program on the machine.
What do the colours mean?
Faded copper is rapid traverse, meaning G0, and near-black is a cutting move at feed rate. A rapid that passes through where your part should be is the thing to look for.

Contact

Quote machined parts without the wait

Tell Derik how your shop quotes machined parts today and where requests wait. He will tell you which steps software could draft from your past jobs, with your estimator approving.

Prefer to talk? Book a meeting.

Your message goes to Derik Lawlis, the founder.