Skip to content
Vecaria
Go Pro

G-code File Types — .gcode, .nc, .tap, .cnc, .ngc

Every CNC mill, laser cutter and 3D printer is driven by G-code, but the programs themselves arrive under half a dozen extensions. They are all plain text, and the extension tells you more about which post-processor wrote the file than about what is inside.

G-code is the programming language of machine tools (RS-274 lineage): a plain-text list of commands telling the controller where to move, how fast, and which tool to use. G0–G3 motion — rapid, linear, and the two arc directions — is the universal core. Everything else varies: tool change (M6), spindle or laser on/off, units (G20/G21), work offsets (G54–G59) and vendor macros are dialect. Programs describe tool motion rather than geometry, which is why viewing them is the fastest way to verify a finished program.

Extension Typical origin
.gcode 3D printers and generic slicers
.nc General CNC post-processors
.tap TAP format — common for engraving and lighter machines
.gco, .ngc Older printer firmware and hobby controllers
.cnc Mixed — various desktop CNC tools

The content is what matters. G-code Viewer opens .gcode, .nc, .tap, .gco, .cnc and .ngc as long as the content is standard G-code, parses G0–G3 motion and ignores vendor-specific macros.

  • 3D toolpath — G-code Viewer renders the program with timeline replay (0.5–8× speed), a 2.5D material-removal simulation, bidirectional source-to-toolpath seeking, and static safety checks (missing F words, negative feed, rapids below the deepest cut, missing tool/end/units words). Read-only — it never modifies the program.
  • Run estimate — G-code Time Estimator estimates run time, filament weight and the bounding box from the program.
  • Archive picture — G-code to SVG renders the toolpath as vector: cutting moves solid, rapid moves dashed, ready for a work-order archive.
  • Multiple programs — Merge G-code Files joins several programs into one, stripping intermediate end commands.

The viewer reads and reports in millimetres; inch (G20) programs are converted at 1 in = 25.4 mm. Arcs are measured by true arc length (a full circle = 2πR); cutter compensation and macros are not parsed. Viewing is read-only: no G-code is generated or modified — for generating toolpaths from a drawing, see DXF to G-code and its pre-cut checklist.