— Free tool · no sign-up

NC file viewer. See the toolpath before the machine does.

Drop a .nc, .tap or other G-code program and see its toolpath from above, with the cut size, tools, depth and cutting time, before it runs on a CNC router or mill.

Updated

No NC file at hand?

Cutting made-to-order doors or furniture on a CNC? In a configurator, every combination a buyer can choose is one your shop can build: Door Configurator Software for door manufacturers and 3D Furniture Configurator for furniture manufacturers.

01— The format

What an NC file is, and why you check it before it runs

An NC file is the program a CNC machine runs: plain-text G-code that tells the tool where to go, line by line, and that nobody can picture by reading it.

NC stands for numerical control. A CAM program such as Fusion, VCarve, Mastercam or Alphacam turns a drawing into a list of moves and saves it as text; shops call that file an NC file, a G-code file or a tap file, and it carries extensions such as .nc, .tap, .cnc, .ngc or .gcode. The language underneath is the same one, standardized as RS-274 and ISO 6983.

Each line is a block of words: a letter and a number. G0 moves the tool fast through the air, G1 cuts in a straight line at the feed rate F, G2 and G3 cut arcs, X, Y and Z are the coordinates, T names the tool and S the spindle speed. The commands are modal: a line that reads only "X12.25" repeats the last kind of move, which is why a program is hard to follow by eye.

A mistake in it costs material, a tool or a spoiled part, so the usual check is to draw the path first. This viewer reads the program in your browser and draws every move from above: cuts as solid lines, rapids as dashed ones. Nothing is uploaded.

02— Method

How to open an NC file

Four steps turn a G-code program into a picture you can check before it reaches the machine. This is the general method, and what this tool does at each step.

  1. 01Confirm it is G-code

    An NC file is plain text: open it in a text editor and you should see lines of G, X, Y and Z words. The .nc extension is also used by NetCDF data files, which are binary and unrelated.

    This tool: reads the file as text on your device, refuses a binary file, and says so when it finds no moves it can draw. Files up to 25 MB.

  2. 02Read the setup lines

    The first lines set the units (G20 for inches and G21 for millimeters; G70 and G71 on some controls), absolute or incremental coordinates (G90, G91) and the tool (T). A program that never states its units leaves a 600 ambiguous between millimeters and inches.

    This tool: shows the units, the tools and the number of cutting moves in the summary above the drawing, or says "no units set".

  3. 03Trace the moves

    Each block is followed in order from the last position: G0 as a rapid, G1 as a straight cut, G2 and G3 as arcs around a center given by I and J or by a radius R.

    This tool: draws the path from above, cuts solid and rapids dashed, with arcs drawn as 5-degree chords, and marks the program zero. Moves in machine coordinates (G53, G28, G30) are counted and left out, because where they go depends on the machine.

  4. 04Check size, depth and time

    Before the job runs, the useful checks are the overall size of the cut against the stock, the deepest Z against the material thickness, and whether a rapid crosses a clamp or the part.

    This tool: gives the width and height of the cutting moves at the tool center (a profile cut around a part reads one tool diameter larger than the part), the lowest Z a cut reaches, the total cut length and the cutting time at the programmed feeds; zoom, pan, hide the rapids and save a PNG of the view.

03— Coverage

What the NC viewer draws, and what it leaves out

Router, mill, laser and plasma programs made of straight moves and arcs show complete. The list below is what the reader handles, and what it does not.

  • Straight moves: drawn

    G0 rapids and G1 cuts, in absolute (G90) or incremental (G91) coordinates, with modal commands, line numbers and comments read the way a control reads them.

  • Arcs: drawn in the XY plane

    G2 and G3 arcs and full circles, by center (I, J) or radius (R), are drawn in the XY plane (G17) and measured by their true length. An arc in G18 or G19 is drawn as a straight line and reported.

  • Units, tools and feeds: read

    G20, G21, G70 and G71 set the units; T words are listed as tools (counted past six); F feeds give the cutting time. Rapids are not timed, because their speed belongs to the machine. Inverse-time and per-revolution feeds (G93, G95) give no time.

  • Top view only

    The path is drawn from above. Z is read for the depth and the cut length, but there is no 3D view and no material removal: several depth passes on the same line look like one line.

  • Machine moves and offsets: left out

    Moves in machine coordinates (G53, G28, G30, or lines prefixed #MCS) are counted and not drawn. Work offsets (G54 to G59) are treated as one coordinate system, and tool radius compensation (G41, G42) is not applied: the path shown is the programmed one.

  • Cycles, subprograms and macros: reported, not simulated

    Drilling cycles (G81 to G89, G73, G76) show their hole positions as rapids only. Subprogram calls (M98), macro variables and coordinate shifts or rotations (G92, G52, G68, G51) are not simulated; the viewer counts those lines and names them under the drawing.

04— FAQ

Questions about the NC file viewer.

What it does, what it leaves to you, and what it costs.

No. The program is read and drawn on your own device and never leaves your browser. The page fetches only its own code, and no request carries your file.

Plain-text ISO G-code (RS-274) as written for Fanuc, Haas, Mach3, Mach4, LinuxCNC, GRBL and similar controls. The file picker offers .nc, .tap, .cnc, .ngc, .gcode, .gc and .txt; a program saved with another extension opens when you drag it onto the page. Up to 25 MB per file. Heidenhain conversational programs, ShopBot .sbp files and HPGL are different languages and are not read.

None that matters to a viewer. G-code is the language; NC file, tap file and CNC program are names for a text file written in it. The extension usually comes from the CAM post-processor, not from the content.

It gives the cutting time: the length of every feed move divided by its programmed feed rate. The real cycle time is longer, because rapids, tool changes, acceleration and dwells are not counted. A program with a feed move and no F word, or with G93 or G95 feeds, gets no time.

Moves in machine coordinates (G53, G28, G30) are left out because their target depends on the machine, and a move is drawn only once the program has stated both X and Y. Drilling cycles, subprograms and macros are not simulated. The viewer counts every such line and says so under the drawing; the section above lists exactly what is drawn. A very large program is drawn up to 2,000,000 points; its size, length and time still cover the whole program.

It reads it, because a slicer writes the same G0 and G1 moves, but it draws every layer on top of the others in one top view and ignores extrusion. A slicer’s own preview is the better tool for a print.

No. It is a viewer: it does not edit, re-post or optimize the G-code, apply tool radius compensation, or show the stock being cut. It answers one question before the program reaches the machine: where will the tool go, and how big and deep is the cut.

Yes. Any recent browser opens it, on Mac, Windows, Linux, iPhone, Android or a Chromebook: drag with one finger to pan and pinch to zoom. There is nothing to install.

Yes. No sign-up, no email, no watermark on the exported PNG and no cap on how many programs you open. One limit: 25 MB per file, because the whole program is held in your browser’s memory while you view it.

More free tools

All free tools

Selling products you cut on a CNC?

In a 3D configurator set up from the CAD behind your catalog, buyers pick sizes, materials and options, see the result, and every combination they can choose is one your shop can build. SBFS sets it up and runs it. See configurator demos by industry.

Book a 20-min call