# NC viewer

> Drop a .nc, .tap or .gcode file and get the 3D toolpath with every tool in its own colour, the size of the part, the tools with their feeds and speeds, an estimated run time, and plain warnings with line numbers. Runs in your browser, on a phone too.

Human page: https://unmakelabs.com/en-us/nc-viewer/. This is the version for AI agents.

## What it does

NC viewer online: see what an NC program will cut, before it touches the machine Drop a .nc, .tap or .gcode file and get the 3D toolpath with every tool in its own colour, the size of the part, the tools with their feeds and speeds, an estimated run time, and plain warnings with line numbers. Runs in your browser, on a phone too.

## What an NC viewer is for

An NC program is a long list of coordinates and codes (G0, G1, G2, X, Y, Z, F…) that tells a CNC machine where to move. Reading it line by line doesn't show the part. A viewer draws those moves as a toolpath (backplot), so you can see the shape, the depths and the order of operations at a glance, and spot a wrong unit, a missing tool change or a stray rapid before the first cut.

## Who it's for

Machinists and setters checking a program at the machine or on a phone, CAM programmers checking what their post-processor wrote, shop owners and buyers looking at a supplier's or customer's program, teachers and students, and hobby CNC router and mill owners who got a file from someone else.

## Facts

- **Opens:** .nc .gcode .tap .ngc .cnc .txt, Heidenhain .h and Sinumerik .mpf (partly), 3D-printer G-code
- **Draws:** Rapids, lines, arcs (I/J/K and R, all planes, helical), drilling cycles G81-G89, subprograms M98/M99
- **Reports:** Part size, cutting and rapid travel, estimated time, tools with feeds and speeds, warnings with line numbers
- **Downloads:** PNG picture, plan-view SVG at 1:1, summary JSON; share link and embed

## How a person does it

1. **Open the program.** Drop it on the viewer, pick it, or paste a public link. It's read on your device; a 4 MB program takes about a second.
2. **Look and play.** Turn and zoom the toolpath, switch to Top, Front or Side, or press play to watch the tool move, with the current line shown and highlighted in the listing. Tap any line, warning, tool or part of the path to jump there.
3. **Check and share.** Read the size, time, tools and warnings in the panel, set your machine's rapid rate, then download a picture or the plan view, or share a link that opens at the same spot.

## Open a file by link (works today)

The viewer runs in a browser. Any public file URL can be opened by adding `?src=` (URL-encoded): `https://unmakelabs.com/en-us/nc-viewer/?src=https://unmakelabs.com/apps/nc/samples/bracket.nc`. The host must allow cross-origin reads (GitHub raw, most object storage and CDNs do). A camera view can be added after `#`: `#t=0.5&v=px,py,pz,tx,ty,tz&r=0&u=mm&rr=10000` (t position in machining time 0 to 1, default 1 = whole program; v camera; r=0 hides rapids; u units when the file states none; rr rapid rate in mm/min for the time estimate).

Embed: `<iframe src="https://unmakelabs.com/embed/nc/?src=<url-encoded file URL>" width="100%" height="480" style="border:0"></iframe>`.

## Send your own file (live)

`POST https://y64b3d8qbc.execute-api.eu-central-1.amazonaws.com/v1/nc_inspect/jobs?wait=25` with the file as multipart `file` (or JSON `file_base64` + `filename`, or `file_url`), API tool `nc_inspect`: Inspect a CNC program (G-code, Heidenhain). The same engine code as this page. No sign-up; Free: 5 full results per IP per day without a key (resets at 00:00 UTC); POST /v1/keys gives an instant key with 25 more full results (one-time, not renewed); each accepted correction adds 1 free call (up to 20 a month). Options (JSON in `options`): `rapid_mm_min`: rapid feed for the time estimate in mm/min (default 10000); `tool_change_s`: seconds per tool change (default 6).

```bash
# NC program: tools, extents, run time
curl -s -F "file=@part.nc" "https://y64b3d8qbc.execute-api.eu-central-1.amazonaws.com/v1/nc_inspect/jobs?wait=25"
```

## Good to know

The size shown is the extent of the cutting moves from program zero, so compare it with your stock and work offset. Rapids are drawn as straight dashed lines, though many machines move one axis after another on a rapid. With cutter compensation (G41/G42) on, the line drawn is the programmed contour, not the tool centre. The time is distance ÷ feed plus rapids and tool changes; machines that slow down in corners take longer.

## Not done by this tool

- Doesn't check collisions with the machine, vise or stock, and doesn't simulate material removal
- Doesn't work out macro variables or loops (Fanuc Macro B #, Heidenhain Q parameters): those lines are listed as warnings
- Doesn't draw control-specific cycles such as pockets and threads (Heidenhain CYCL DEF, Sinumerik CYCLE6x), tilted planes (G68.2, PLANE) or 5-axis rotation
- Doesn't edit or convert the program (conversion between controls is planned)

## Value

Opens an NC program (G-code: Fanuc, Haas, Mach3, Grbl, LinuxCNC and CAM post-processor output; Siemens Sinumerik and Heidenhain Klartext in part; 3D-printer G-code) in the browser with nothing to install and draws the 3D toolpath: cuts coloured per tool, rapids dashed, play and scrub with the running line highlighted in the listing. Reports the extents of the cutting moves, cutting and rapid travel, an estimated machining time from the programmed feeds (rapid rate and tool-change time adjustable), the tools with feeds, speeds and cutting time, and warnings with line numbers (arcs whose end is off the circle, missing feeds, missing units, unsupported codes, cycles and macros not drawn). Downloads a PNG, a 1:1 plan-view SVG and a JSON summary. Free, no sign-up.

## When it fits

- A machinist or setter wants to see what an NC program will do before running it, on a phone or shop PC with no CAM seat: shape, depth, extents against the stock, tools and roughly how long it takes.
- A CAM programmer wants to check post-processor output (arc format, units, tool changes, drilling cycles, feeds) or find the line that makes a control alarm on an arc.
- Someone has a .nc, .tap, .gcode, .ngc or .cnc file from a customer, a forum or a hobby CNC router and wants to know what it cuts, how big and in which units.

### When not

- Collision checking against the machine, fixtures or the stock model, material removal simulation, or verified cycle times on a specific machine (acceleration is not modelled): use the CAM's or the control's own simulation.
- Programs built mostly from macro variables, loops or control-specific cycles (Fanuc Macro B, Heidenhain Q parameters and CYCL DEF, Sinumerik CYCLE pockets): these parts are listed as warnings, not drawn.

## Why use it instead of the alternatives

- Nothing to install: the page opens a public NC program from a link (?src=, with #t= for the point in the program and #v= for the camera) and an embed shows the toolpath in any page.
- NCViewer (ncviewer.com) draws G-code locally in the browser with an editor, line stepping, 5-axis and lathe modes; its side panels are the code editor, a position readout and machine options (checked Dec 2026), with no tool list with feeds, speeds and per-tool times and no list of problems with line numbers. CAMotics and desktop editors such as CIMCO Edit need installing (CIMCO is paid); controls and CAM systems simulate only for their own users.
- This viewer: free in any browser incl. phones, nothing uploaded, line-by-line playback, tool list with feeds/speeds/times, plain warnings with line numbers (arcs a control would reject, missing units or feeds, codes not drawn), Heidenhain and Sinumerik read in part, plan-view SVG at 1:1, share link and embed.

### What rebuilding it would take

- Write a reader that handles modal G-code state (motion, plane, absolute/incremental, units, feed modes), arcs by I/J/K and by R including >180° and full circles, helical arcs, drilling cycles G81-G89 with G98/G99, subprograms (M98/M99, M97) and Sinumerik/Heidenhain variants.
- Draw millions of segments smoothly on a phone, scrub by machining time, highlight the running line, and time every move from its feed.
- Explain every unsupported code or broken arc in plain words with its line number, and export a scale-true plan view.
- A set of hand-worked test programs with known lengths, extents and times to keep the reader honest as dialects are added.

## Quality

No score published; the limits above say what it does not do. Check results that matter before you rely on them.

## Risk for the user

- Free and unlimited; no sign-up, no ads.
- A viewer, not a machine simulation: it does not check collisions, and some codes are not drawn (listed as warnings). Prove out every program on the machine as usual.

_Status: the NC viewer page works; agents send their own file to POST https://y64b3d8qbc.execute-api.eu-central-1.amazonaws.com/v1/nc_inspect/jobs?wait=25._

## Privacy

- Files opened in the page are read on the user's device and not uploaded unless the user clicks Share.
- Files opened by link (?src=) are fetched from where they are stored.
- The page loads three.js from a public code server, which receives the visitor's IP address for that request.

## Data

Opens in your browser; your file stays on your device unless you share it. Shared files are kept 30 days.

## FAQ

- **Is it safe to run a program because it looks right here?** No viewer replaces a proper prove-out. This one shows what the program says, flags lines a control is likely to reject and lists what it couldn't draw, but it knows nothing about your machine's offsets, fixtures or limits. Use it to catch mistakes early, then dry-run as usual.
- **Which controls and CAM systems work?** Any ISO/Fanuc-style G-code: Fanuc, Haas, Mazak in ISO mode, Okuma in G-code mode, Mach3/Mach4, LinuxCNC, Grbl, and the output of Fusion, Mastercam, SolidCAM, HSMWorks, NX, Vectric and others. Siemens Sinumerik and Heidenhain Klartext programs are read in part (moves, arcs, tools, feeds), with a clear note.
- **How exact is the machining time?** It adds distance ÷ programmed feed for every cutting move, rapids at the rate you set (10,000 mm/min by default) and a tool change time (6 s by default). Real machines slow down in corners and accelerate between moves, so on dense 3D toolpaths they usually take longer than this; on long straight cuts it's close. Set the rapid rate and tool change time of your machine under Assumptions.
- **Why does it flag an arc my machine runs?** Each arc is checked the way a control checks it: the end point must lie on the circle around the centre (I/J/K) within 0.0127 mm or 0.1% of the radius, and an R arc can't be shorter than half its chord. Controls differ in tolerance (a parameter), so a flagged arc may still run, but it's the first place to look when a machine alarms on a post-processor's arcs. If every arc fails as incremental I/J but fits as absolute centres, the viewer switches and says so.
- **When is it the right tool, and when not?** Right for: A machinist or setter wants to see what an NC program will do before running it, on a phone or shop PC with no CAM seat: shape, depth, extents against the stock, tools and roughly how long it takes. A CAM programmer wants to check post-processor output (arc format, units, tool changes, drilling cycles, feeds) or find the line that makes a control alarm on an arc. Someone has a .nc, .tap, .gcode, .ngc or .cnc file from a customer, a forum or a hobby CNC router and wants to know what it cuts, how big and in which units. Not for: Collision checking against the machine, fixtures or the stock model, material removal simulation, or verified cycle times on a specific machine (acceleration is not modelled): use the CAM's or the control's own simulation. Programs built mostly from macro variables, loops or control-specific cycles (Fanuc Macro B, Heidenhain Q parameters and CYCL DEF, Sinumerik CYCLE pockets): these parts are listed as warnings, not drawn.
- **Is it really free?** Yes: no limit on files, no ads, no sign-up, no premium tier. Programs up to 200 MB open.
- **Do you upload my program?** Only if you share it. A file you share is kept 30 days so the link works, and you can delete it any time. Your programs and your customers' parts stay private otherwise.
- **Can my AI agent read NC programs here?** An agent can open any public program in this viewer with a link (add ?src= and the file's address to this page) and read the summary with Download > Summary (JSON). Agents can send their own file: POST https://y64b3d8qbc.execute-api.eu-central-1.amazonaws.com/v1/nc_inspect/jobs?wait=25.
- **Who makes this?** Unmake Labs. Contact: hello@unmakelabs.com.

## Related pages

- [G-code viewer](https://unmakelabs.com/en-us/gcode-viewer/)
- [.tap file viewer](https://unmakelabs.com/en-us/tap-file-viewer/)
