# G-Code-Viewer

> Beliebige G-Code-Datei öffnen und sehen, wie jede Zeile zur Bewegung wird: Das Listing läuft mit dem Werkzeug mit, die aktuelle Zeile leuchtet auf der 3D-Bahn, und ein Tipp auf eine Zeile zeigt genau, was sie tut. Kreise, Einheiten und Vorschübe werden dabei geprüft.

Human page: https://unmakelabs.com/de-de/g-code-viewer/. This is the version for AI agents.

## What it does

G-Code-Viewer online: G-Code als Bild lesen, Zeile für Zeile Beliebige G-Code-Datei öffnen und sehen, wie jede Zeile zur Bewegung wird: Das Listing läuft mit dem Werkzeug mit, die aktuelle Zeile leuchtet auf der 3D-Bahn, und ein Tipp auf eine Zeile zeigt genau, was sie tut. Kreise, Einheiten und Vorschübe werden dabei geprüft.

## Was ein G-Code-Viewer zeigt

G-Code ist die Sprache der meisten CNC-Maschinen: G0 fährt im Eilgang, G1 schneidet gerade, G2 und G3 Kreise, X, Y und Z sind das Ziel, F der Vorschub. Ein G-Code-Viewer macht aus diesen Zeilen die Bahn des Werkzeugs, damit man Form und Zusammenhang jeder Zeile sieht.

## Für wen

Alle, die G-Code lernen oder Fehler suchen: Azubis und Studierende, Hobby-CNC-Fräsen mit Estlcam, Grbl, Mach3 oder LinuxCNC, wer G-Code von Hand schreibt, und Programmierer, die prüfen, was der Postprozessor aus einer kniffligen Zeile gemacht hat.

## Facts

- **Zeile für Zeile:** Listing und Werkzeugweg in beide Richtungen verknüpft
- **Versteht:** G0–G3, G17/18/19, G20/21, G90/91, G4, G28/G53, G41/42, G43, G54–59, G81–89, G92–95, M3–M9, M6, M98/M99
- **Prüft:** Kreisendpunkte auf dem Kreis, zu kurze R-Kreise, fehlender Vorschub, fehlende Einheit, unbekannte Wörter
- **Downloads:** PNG, SVG-Draufsicht 1:1, Zusammenfassung als JSON

## How a person does it

1. **Datei öffnen.** .gcode-, .nc-, .ngc- oder .tap-Datei ablegen, auswählen oder Link einfügen. Nichts wird hochgeladen.
2. **Durchschrittweise.** Mit ◀ ▶ oder den Pfeiltasten Zeile für Zeile gehen; die Zeile steht über dem Regler und ist auf der Bahn orange markiert. Abspielen läuft in etwa 30 Sekunden durch.
3. **Fehlerzeilen finden.** Warnungen benennen jedes Problem mit Zeilennummer; antippen springt dorthin. Im Listing sind diese Zeilen gelb oder rot markiert.

## 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/de-de/g-code-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

G-Code ist modal: Ein G1 oder G2 bleibt aktiv, bis ein anderer Bewegungsbefehl kommt; eine Zeile nur mit X und Y setzt die letzte Bewegung fort. Ist noch G2 aktiv und die nächste Zeile hat keinen Mittelpunkt, stoppt eine echte Steuerung; der Viewer meldet das und zeichnet eine Gerade. Ohne G20 oder G21 wird in Millimetern gelesen, mit Umschalter auf Zoll.

## Not done by this tool

- Wertet keine Makrovariablen (#100) oder Ausdrücke in Klammern aus
- Zeichnet noch keine Polarkoordinaten (G16), Drehung (G68) oder Skalierung (G51): sie werden aufgelistet
- Bearbeitet keinen G-Code (dafür einen Texteditor nehmen)

## 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

Öffnet im Browser; Ihre Datei bleibt auf Ihrem Gerät, außer Sie teilen sie. Geteilte Dateien werden 30 Tage aufbewahrt.

## FAQ

- **Was ist der Unterschied zwischen G2 und G3?** G2 fährt einen Kreis im Uhrzeigersinn, G3 gegen den Uhrzeigersinn, von oben auf die Ebene gesehen (in G17 von +Z). Der Mittelpunkt steht in I, J, K (standardmäßig relativ zum Startpunkt) oder der Radius in R (negativ für Bögen über 180°). Der Viewer zeichnet beide Formen und prüft, ob der Endpunkt auf dem Kreis liegt.
- **Warum meldet er einen Kreis, den meine Maschine fährt?** Jeder Kreis wird wie von einer Steuerung geprüft: Der Endpunkt muss auf 0,0127 mm oder 0,1 % des Radius auf dem Kreis um den Mittelpunkt liegen, und ein R-Kreis darf nicht kürzer als die halbe Sehne sein. Steuerungen haben unterschiedliche Toleranzen (Parameter); ein gemeldeter Kreis kann also laufen, ist aber die erste Stelle zum Suchen, wenn eine Maschine bei Postprozessor-Kreisen Alarm gibt.
- **Wann ist es das richtige Werkzeug, und wann nicht?** Passt für: Ein Maschinenbediener oder Einrichter will sehen, was ein NC-Programm macht, bevor er es startet, am Handy oder Werkstatt-PC ohne CAM: Form, Tiefe, Abmessungen gegenüber dem Rohteil, Werkzeuge und ungefähre Laufzeit. Ein CAM-Programmierer will die Ausgabe des Postprozessors prüfen (Kreisformat, Einheit, Werkzeugwechsel, Bohrzyklen, Vorschübe) oder die Zeile finden, bei der die Steuerung an einem Kreis abbricht. Jemand hat eine .nc-, .tap-, .gcode- oder .h-Datei von einem Kunden, aus einem Forum oder für eine Hobby-CNC und will wissen, was sie fräst, wie groß und in welcher Einheit. Passt nicht für: Kollisionsprüfung mit Maschine, Spannmitteln oder Rohteil, Abtragssimulation oder belastbare Zykluszeiten für eine bestimmte Maschine (Beschleunigung nicht modelliert): dafür die Simulation des CAM oder der Steuerung. Programme, die überwiegend aus Makrovariablen, Schleifen oder steuerungseigenen Zyklen bestehen (Fanuc Macro B, Heidenhain-Q-Parameter und CYCL DEF, Sinumerik-CYCLE-Taschen): diese Teile werden als Warnung aufgeführt, nicht gezeichnet.
- **Ist das wirklich kostenlos?** Ja: unbegrenzt viele Dateien, keine Werbung, keine Anmeldung, keine Bezahlversion. Programme bis 200 MB öffnen.
- **Laden Sie mein Programm hoch?** Nur wenn Sie es teilen. Eine geteilte Datei wird 30 Tage aufbewahrt, damit der Link funktioniert, und Sie können sie jederzeit löschen. Sonst bleiben Ihre Programme und die Teile Ihrer Kunden privat.
- **Kann mein KI-Agent NC-Programme hier lesen?** Ein Agent kann jedes öffentliche Programm per Link öffnen (?src= und die Dateiadresse an diese Seite anhängen) und die Zusammenfassung über Download > Zusammenfassung (JSON) lesen.
- **Wer steckt dahinter?** Unmake Labs. Kontakt: hello@unmakelabs.com.

## Related pages

- [NC-Viewer kostenlos](https://unmakelabs.com/de-de/nc-viewer-kostenlos/)
