bg

How to open an NC file: CNC program file types and viewers

A file that ends in .nc is almost always a CNC program: plain text with G code, such as N10 G01 X25. Y10. F300, written by a CAM system or by hand for a milling machine, a lathe or a router. Because it is text, any editor opens it. To read it comfortably, see the tool path or check it before it goes to the machine, use a G-code editor or viewer.

Three ways to open an NC file

  1. In your browser, without installing anything. Drag the file into the free online G-code viewer. It draws the tool path in 3D, steps through the program and checks it for arc errors, missing feed rates, cutting with the spindle off and other mistakes. The file is not uploaded.
  2. In a G-code editor on Windows. CNC Syntax Editor opens any text NC program with syntax highlighting for ISO G code and Heidenhain ISO, renumbers blocks, shifts, scales and mirrors coordinates, and compares two versions side by side. The Free Edition opens programs up to 16 KB; Professional and Enterprise have no size limit, and Enterprise adds a 3D backplotter.
  3. In Notepad. Right-click the file, choose Open with and then Notepad. You can read and change the text, but you get no syntax highlighting and no CNC tools. For how the common editors differ, see CNC Syntax Editor vs CIMCO Edit, Notepad++ and VS Code.

To open every .nc file with the same program, right-click a file, choose Open with, then Choose another app, select the program and tick Always use this app.

CNC program file extensions

The extension is chosen by the CAM post-processor or the control, so the same G code can arrive with different endings. The usual ones:

ExtensionUsually written forWhat is inside
.ncmany controls; a common CAM outputISO G code as text
.tapMach3 and many CAM post-processorsG code as text
.ngcLinuxCNCG code as text
.cnc, .iso, .txtgenericG code as text
.mpf, .spfSiemens Sinumerik: main program, subprogramG code with Siemens extensions
.iHeidenhain TNC: DIN/ISO programsHeidenhain ISO G code
.hHeidenhain TNC: conversational (Klartext) programsHeidenhain dialog text, not G code
.min, .sub, .ssbOkuma OSP: main program, subprogramsG code with Okuma extensions
.eiaMazak: EIA/ISO programsG code as text
no extension, or O1234Fanuc-type controls, named by program numberG code as text
.gcode3D printers (Marlin, Klipper and others)printer G code, a different set of commands

All of these except the 3D-printer files are CNC programs that a G-code editor opens as text. Machine-specific codes differ between controls, so read the G code and M code lists with the manual of your machine at hand.

When a .nc file is not a CNC program

The same extension is used by NetCDF, a binary format for scientific data such as climate, ocean and satellite measurements. If the file shows random characters in a text editor, it is a NetCDF file: open it with a NetCDF tool, for example Panoply from NASA. CNC editors and G-code viewers cannot read it.

Before you send a program to the machine

  • Look at the tool path: no move should leave the part or the fixture.
  • Compare the X, Y and Z ranges with the travel of the machine and with the set-up.
  • Check the tools, spindle speeds and feed rates against the set-up sheet.
  • Look for arcs whose end point is not on the circle and for rapid moves into the part.

The online G-code viewer lists all of this in one report. To send the program to a CNC machine over a serial (RS-232) connection, use DNC Precision, which is sold separately.

Questions

Which program opens an NC file? An NC file with a CNC program is plain text, so any text editor opens it. A G-code editor such as CNC Syntax Editor adds syntax highlighting and CNC tools, and a G-code viewer draws the tool path.

Can I open an NC file without installing anything? Yes. Open it in Notepad to read the text, or drag it into the free online G-code viewer, which draws the tool path in your browser without uploading the file.

Why does my .nc file show random characters? Then it is probably not a CNC program but a NetCDF file, a binary format for scientific data such as climate and ocean measurements. Open it with a NetCDF tool, for example Panoply.

Can I edit an NC file in Notepad? Yes, for small changes. Save it as plain text with the same extension. For renumbering, shifting or scaling coordinates and comparing versions, a G-code editor is faster and safer.

M codes | G codes | G and M codes for mills | ISO tape codes | EIA tape codes | Online G-code viewer

Product Buy Download Support Contacts Site map
Copyright © 1999 - 2026, AGG Software.
All rights reserved.. Terms of use | Privacy policy