# Visualizzatore G-code

> Apri qualsiasi file G-code e guarda ogni riga trasformarsi in un movimento: il listato scorre insieme all'utensile, la riga corrente si illumina sul percorso utensile in 3D e puoi toccare una riga per vedere esattamente cosa fa. Archi, unità di misura e avanzamenti vengono controllati man mano.

Human page: https://unmakelabs.com/it-it/aprire-file-gcode/. This is the version for AI agents.

## What it does

Aprire un file G-code e leggerlo come un disegno, riga per riga. Apri qualsiasi file G-code e guarda ogni riga trasformarsi in un movimento: il listato scorre insieme all'utensile, la riga corrente si illumina sul percorso utensile in 3D e puoi toccare una riga per vedere esattamente cosa fa. Archi, unità di misura e avanzamenti vengono controllati man mano.

## Cosa mostra un visualizzatore G-code

Il G-code è il linguaggio che parlano quasi tutte le macchine CNC: G0 è il movimento rapido, G1 taglia in linea retta, G2 e G3 tagliano archi, X, Y e Z sono la destinazione, F l'avanzamento. Un visualizzatore G-code trasforma queste righe nel percorso seguito dall'utensile, così vedi la forma e capisci ogni riga nel suo contesto, invece di immaginare le coordinate a mente.

## A chi serve

A chi impara o cerca errori nel G-code: apprendisti e studenti, hobbisti con fresatrici e router CNC che usano Grbl, Mach3 o LinuxCNC, chi scrive G-code a mano o con script e i programmatori che vogliono capire cosa ha fatto un postprocessore a una riga difficile.

## Facts

- **Riga per riga:** Listato e percorso utensile collegati in entrambe le direzioni: tocca una riga o un punto del percorso
- **Riconosce:** G0-G3, G17/18/19, G20/21, G90/91, G90.1/91.1, G4, G28/G53, G41/42, G43, G54-59, G81-89, G92-95, M3-M9, M6, M98/M99
- **Controlla:** Punti finali degli archi sulla circonferenza, archi R troppo corti, avanzamenti mancanti, unità mancanti, parole sconosciute
- **Download:** PNG, SVG in pianta in scala 1:1, riepilogo JSON

## How a person does it

1. **Apri il file.** Trascina un file .gcode, .nc, .ngc o .tap, selezionalo o incolla un link. Non viene caricato nulla.
2. **Scorrilo passo passo.** Usa i pulsanti ◀ ▶ o i tasti freccia per avanzare di una riga alla volta; la riga compare sopra il cursore ed è evidenziata in arancione sul percorso. Premi play per eseguirlo a una velocità che dura circa 30 secondi.
3. **Trova le righe problematiche.** Gli avvisi descrivono ogni problema in parole semplici con il numero di riga: toccalo per saltarci. Nel listato quelle righe sono segnate in giallo o in rosso.

## 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/it-it/aprire-file-gcode/?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

Il G-code è modale: un G1 o G2 resta attivo finché un altro codice di movimento non lo sostituisce, quindi una riga con solo X e Y prosegue l'ultimo movimento. Se un G2 è ancora attivo e la riga successiva non ha un centro, un controllo reale si ferma; il visualizzatore la segnala come arco senza centro e la disegna dritta. Un file G-code senza G20 o G21 viene letto in millimetri, con la possibilità di passare ai pollici.

## Not done by this tool

- Non valuta le variabili macro (#100) né le espressioni tra parentesi
- Non disegna ancora coordinate polari (G16), rotazione (G68) o scalatura (G51): vengono solo elencate
- Non modifica il G-code (per questo aprilo in un editor di testo)

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

Si apre nel browser; il file resta sul tuo dispositivo, a meno che tu non lo condivida. I file condivisi vengono conservati 30 giorni.

## FAQ

- **Che differenza c'è tra G2 e G3?** G2 taglia un arco in senso orario, G3 in senso antiorario, guardando il piano dall'alto (da +Z in G17). Il centro è dato da I, J, K (di default come distanza dal punto iniziale) oppure il raggio da R (R negativo per archi oltre 180°). Il visualizzatore disegna entrambe le forme e controlla che il punto finale stia sulla circonferenza.
- **Perché il mio G-code sembra minuscolo o enorme?** Di solito dipende dalle unità: G20 significa pollici, G21 millimetri. Se il file non ha nessuno dei due, il visualizzatore legge in millimetri e propone i pollici con un tocco. I vecchi controlli Fanuc leggono inoltre i numeri senza punto decimale come millesimi (X10 = 0,010 mm); i software CAM scrivono sempre il punto, quindi raramente è un problema.
- **Perché segnala un arco che la mia macchina esegue?** Ogni arco viene controllato come lo controlla un CNC: il punto finale deve stare sulla circonferenza attorno al centro (I/J/K) entro 0,0127 mm o lo 0,1% del raggio, e un arco R non può essere più corto di metà della sua corda. I controlli hanno tolleranze diverse (è un parametro), quindi un arco segnalato può comunque funzionare, ma è il primo punto da verificare quando una macchina va in allarme sugli archi di un postprocessore. Se tutti gli archi falliscono come I/J incrementali ma tornano come centri assoluti, il visualizzatore cambia modalità e lo segnala.
- **È davvero gratis?** Sì: nessun limite di file, nessuna pubblicità, nessuna registrazione, nessuna versione premium. Si aprono programmi fino a 200 MB.
- **Caricate il mio programma?** Solo se lo condividi. Un file condiviso viene conservato 30 giorni perché il link funzioni e puoi eliminarlo in qualsiasi momento. Altrimenti i tuoi programmi e i pezzi dei tuoi clienti restano privati.
- **Il mio agente IA può leggere programmi CN qui?** Un agente può aprire qualsiasi programma pubblico in questo visualizzatore tramite link (aggiungi ?src= e l'indirizzo del file a questa pagina) e leggere il riepilogo con Scarica > Riepilogo (JSON). È prevista un'API che restituisca lo stesso riepilogo in formato dati.
- **Chi lo realizza?** Unmake Labs. Contatto: hello@unmakelabs.com.

## Related pages

- [Visualizzatore G-code](https://unmakelabs.com/it-it/visualizzatore-g-code-online/)
- [Visualizzatore file .tap](https://unmakelabs.com/it-it/aprire-file-tap/)
