What is an .nc file?
An .nc file is a plain-text CNC program. “NC” stands for numerical control: the file is a list of G-code and M-code commands that tell a mill, router, lathe or similar machine where to move, how fast, and when to switch the spindle on or off. CAM software writes these files, and the machine controller (Fanuc-style, Haas, Siemens, Mach3, LinuxCNC, GRBL and others) reads them.
Because it is just text, an .nc file is the same kind of file as a .gcode, .tap, .ngc or .cnc file. Only the extension differs. The commands that draw a path (G0, G1, G2 and G3) are shared by almost every controller, which is what the viewer reads.
How to open an .nc file online
- Go to the viewer and drop the .nc file onto the upload area, or choose it with the browse button.
- Check that the profile reads CNC / milling, and set Units to inches if your program uses G20 and the sizes look wrong.
- Switch between the 2D top view and the 3D view, then play the path back or step through it move by move.
- Click a path to jump to its source line, or search the source for a command such as
M6orG2.
You do not need an account or an install, and it works the same on Windows, Mac and Linux. The file stays on your device.
What the NC viewer shows
- Rapids and feed moves, drawn differently, so you can see where the tool travels quickly and where it works.
- Arcs and circles from G2 and G3 in the active plane.
- Extents, the minimum and maximum X, Y and Z of the programmed path, to compare with your stock size and machine travel.
- Tool changes, recorded when the program selects a tool (T and M6).
- Skipped commands, listed in the parser notes, such as canned drilling cycles, splines and macro variables, instead of being guessed.
The CNC G-code viewer page lists in detail what is and is not applied, including work offsets, tool length offsets and cutter compensation.
NC viewer, not an NC editor or simulator
This viewer cannot edit an .nc file. To change a program, use a text editor or your CAM software, then open the result here to check the path. It also does not simulate cutting. It plays the programmed path back, but it does not remove material, detect collisions or check machine limits; see G-code simulator online for exactly what playback covers.
Is your .nc file actually G-code?
Not every .nc file is a CNC program. The same extension is used by NetCDF, a binary format for scientific data such as climate and ocean measurements. If your file came from a research project or a weather or ocean dataset, this viewer will report that it looks like a binary file, and you need a NetCDF tool such as ncview or Panoply instead. If the file came from CAM software or a machine shop, it is almost certainly G-code and will open here.
If a genuine CNC file will not load, see why a G-code file will not load.
NC viewer questions
Is the NC viewer free? Yes, with no account and no download.
Is my .nc file uploaded? No. It is read and drawn in your browser. See the privacy policy.
Which files will it open? Plain-text G-code up to about 150 MB, including .nc, .tap, .ngc, .cnc, .gcode and .txt. See how to open G-code files for what each extension means.
Can it open Siemens, Fanuc or Haas programs? It draws the standard motion commands those programs use. Controller-specific cycles, macro variables and expressions are skipped with a warning, so part of a program may be missing from the preview.
Back to the online G-code viewer.