G-code Viewer: How to Check a G-code File Before You Cut

Last modified: October 21, 2026

What is a G-code Viewer?

A G-code viewer reads a G-code file (also called an NC file) and shows you what it will do: a 3D drawing of the toolpath, plus information about the program that's hard to see by reading the code. It's the cheapest insurance you can buy against a broken tool, a ruined part or a crash.

If you want help choosing one, see our NC viewer buyer's guide. This page is about using one. We'll walk through checking a real program with CutViewer, the free browser-based viewer we recommend now that CNC Cookbook's G-Wizard Editor is no longer available. You can follow along with our example files.

Step 1: Open the File

Go to cutviewer.com and drag your file onto the window, or click Open File. CutViewer reads .nc, .G-code, .tap, .ngc and other G-code files. The file is read in your browser; nothing is uploaded.

To follow along, open our Griffin relief carving straight from this page: open the Griffin relief in CutViewer.

The G-code appears in the editor on the left and the toolpath on the right.

Step 2: Look at the Whole Toolpath

Start with the big picture. Does the shape look like the part you expect? Use the Top, Front, Left and Right buttons, drag to rotate, scroll to zoom, and press F to fit the toolpath to the window.

The colors tell you what kind of move you're looking at:

Things to look for:

Step 3: Read the Job Panel

The Job panel in the corner of the 3D view sums up the program:

Step 4: Check the Warnings

Under Checks, CutViewer lists problems it found in the program, with links to the lines that cause them. Those lines are also marked in the editor. It looks for:

To see one, open our home switch panel engraving. The panel is 11" × 4", but the program never says G20, so CutViewer flags it. On a control left in millimeters, every move in that program would come out 25.4 times too small. Read more about G20 and G21.

Step 5: Step Through the Program

Now look at the details. Press Play (or the space bar) to watch the program run, and change the speed with the slider. Drag the progress bar to jump anywhere. Click a line in the editor, or click the toolpath, to see exactly where the tool is at that point; the position, feed rate and spindle speed are shown below the 3D view.

Pay extra attention to:

Step 6: Fix and Save

If you find a problem, you can fix it right in the editor. The toolpath updates as you type, so you can check the fix before saving. Click Save (or press Ctrl+S) to download the edited file, then load it on your machine.

For anything bigger than a small fix, go back to your CAM software so the change is in your source file too.

What a Viewer Can't Tell You

A viewer checks the program, not your setup. It doesn't know where your work offset is, how long your tool is or where your clamps are. Before the first run of any new program, still:

Learn More

Be the first to know about updates at CNC Cookbook

Join our newsletter to get updates on what's next at CNC Cookbook.