What an NC file is
An .nc, .ngc or .tap file is plain-text G-code written by CAM software for a mill, router or laser. G0 lines are rapid moves, G1 lines are cutting moves at a feed rate, and G2 and G3 cut arcs around a centre given by I, J and K. The extension depends on the controller; the text inside follows the same pattern.
A 3D-printer file uses the same language and adds an E value for the filament. When a file has no E values, the viewer treats it as a machining program and draws every feed move as the toolpath.
What the NC viewer reads
CAM programs write G-code in different dialects, so the reader accepts the common ones:
- line numbers such as N10, and comments in round brackets, square brackets or after a semicolon;
- several G words on one line (G90 G0 X0 Y0) and modal lines that carry only a coordinate after a G1 or G2;
- G20 inches and G21 millimetres, absolute G90 and incremental G91 positions;
- arcs in all three planes (G17, G18, G19) with I/J/K or R, drawn as short straight pieces.
The Info panel then lists feed moves, rapid moves, arcs, the number of Z levels, the unit the file states, the size of the cutting moves and the Z range of the cutting moves.
Tested on real CAM output
Four programs written by other tools are part of the app tests. In each one the path is drawn with travel hidden, and the slider shows less of it at the first step than at the last.
| File | What it checks | Result |
|---|---|---|
| .nc from CamBam | 2,485 feed moves, 1,569 of them arcs, several depth passes | 111.1 × 111.1 mm, cuts down to Z −3.4 mm |
| .nc with G17 and G19 arcs | arc lead-in and lead-out, lines with only Y or Z | circle of Ø 29.4 mm |
| .nc square | G90/G91 switching, several G words per line | 1000 × 1000 square, passes stepped 10 units in Z |
| .tap for a WinCNC router | square-bracket comments, inch numbers without G20 | path drawn, unit shown as not stated |
Steps to check a CNC program
- Press Open File or drag the .nc, .ngc, .tap or .cnc file onto the page.
- Open Info and compare the size of the cutting moves with your stock, and the Z range with the material thickness.
- Switch Travel moves on to see where the tool rapids between cuts, and off to see only the cuts.
- Drag the slider back to watch the path build up depth by depth, or tick Single layer to look at one depth alone.
If Info says the unit is not stated and the part looks 25.4 times too small, the numbers are probably inches. The Units switch at the bottom changes the readout between mm and inches.
What this page does not do
The page draws the programmed lines. The tool shape, the stock and the material removal are not simulated, and collisions and tool lengths are not checked. Cutter compensation (G41/G42) and work offsets (G54 and up) are not applied, so you see the line as programmed, not the tool centre on the machine.
Canned drilling cycles (G81 to G89) are not drawn. Programs that compute coordinates from variables or call subprograms (#1, O-words, M98) cannot be evaluated here; the viewer says so instead of showing half a picture. The feed time in Info is distance divided by feed rate, without acceleration, tool changes or dwells. G-code to STL also refuses milling and laser files, because there are no extrusion lines to rebuild a part from.
Your program stays on your computer
A shop program often belongs to a customer and may be covered by an NDA. The NC file is read by JavaScript in this tab and is never sent to a server.
For 3D-printer files the full toolset works: the G-code viewer with layers and filament, and the print time estimate.
Questions and answers
How do I open an .nc file?
Drop it on this page or press Open File. The picker accepts .nc, .ngc, .tap and .cnc. A program without E values is drawn as a toolpath.
Is this a CNC simulator?
No. It previews the toolpath written in the file. Use your CAM software or the controller to verify a program before you cut.
Why are some moves missing?
Drilling cycles (G81 to G89) are not drawn, and rapids are hidden until you switch Travel moves on. A program built on variables or subprograms is refused with a message.
Does it show arcs correctly?
Yes, G2 and G3 arcs in the G17, G18 and G19 planes are drawn, split into short lines. The test file with 1,569 arcs opens with its full outline.
Can I convert an .nc file to STL?
No. G-code to STL rebuilds a part from extrusion lines, and milling or laser programs have none. The tool reports this instead of writing an empty file.
Do I need to install anything?
No, there is nothing to install. The page runs in Chrome and other Chromium browsers; Firefox and Safari have not been tested.