Skip to main content
Vecaria

G-code to DXF Converter

Local

View G-code toolpaths as DXF geometry — polylines for linear moves, native ARC entities for G2/G3 arcs, free online and local, no upload.

Sample data loaded — click "Export DXF" to try it.

What is it? G-code to DXF exports G-code toolpaths as DXF geometry: straight moves become polylines and G2/G3 arcs become native DXF arc entities (full circles as circles), so the paths can be viewed, measured or edited in CAD.

TL;DR: Export G-code toolpaths to DXF with native arcs — view, measure and edit in CAD; runs in your browser.

How to use

  1. Paste your G-code program into the input box (a sample is pre-filled) — or choose/drop a .gcode/.nc/.tap program file.
  2. Click "Export DXF".
  3. Review the inline line-art preview and the result summary, then copy the DXF source or download toolpath.dxf.

FAQ

Are arcs preserved?

Yes — G2/G3 arcs in the XY plane (G17) are exported as native DXF ARC entities and full circles as CIRCLE entities. Arcs without I/J/K/R center words and arcs outside the XY plane fall back to straight chords, counted in the result summary.

Is it local?

Yes, conversion is local.

What units is the output in?

Always millimeters (DXF $INSUNITS=4) — inch (G20) programs are converted automatically at 1 in = 25.4 mm.

Does it handle relative coordinates (G91)?

Yes — G91 relative moves are accumulated automatically, and lines without an explicit G0–G3 word continue the previous motion mode.

Why convert G-code back to DXF?

Because a G-code program is the only surviving geometry of a part — the CAD file is gone or never existed. Exporting it to DXF gives you 2D geometry you can view, measure and edit in CAD again: archive a machined part's toolpath, recover geometry from a program someone else wrote, or check a finished job against the drawing.

When do arcs become chords instead?

G2/G3 arcs in the XY plane (G17) export as native DXF ARC entities and full circles as CIRCLE entities. Arcs without I/J/K/R center words, and arcs in the XZ (G18) or YZ (G19) planes, fall back to straight chords — the result summary counts them so you can see exactly what was chorded.

What about Z heights and machine commands?

Z heights and non-motion commands — feeds, spindle, coolant — are ignored. The output is 2D XY geometry in millimeters, which is exactly what a flat CAD view needs; it is not a 3D model and it will not run a machine.

How is this different from G-code to SVG?

Both turn toolpaths into viewable geometry, but the output format differs: SVG is for web viewing and sharing in a browser, DXF is the CAD-editable format you open in your CAD or DXF viewer to measure and edit. If the next step is CAM or a drawing revision, take DXF.

Does it pair with DXF to G-code?

Yes, in that direction: DXF to G-code generates toolpaths from drawings. This tool goes the other way — from an existing program back to geometry. Use it to check what a generated program actually contains, or to recover geometry before re-cutting.

Examples

  • Paste G-code → get a DXF

Supported formats

G-codeDXF

Limitations

  • Programs are parsed as absolute coordinates (G90) in millimeters (G21); G91 relative and G20 inch programs are converted automatically (output is always mm, DXF $INSUNITS=4). Coordinate-only continuation lines are tracked as modal moves.
  • G2/G3 arcs follow the modal plane: XY-plane (G17) arcs export as native ARC entities (full circles as CIRCLE); arcs without I/J/K/R center words and non-XY-plane (G18/G19) arcs fall back to straight chords, counted in the result summary.
  • Z heights and non-motion commands (feeds, spindle, coolant) are ignored — output is 2D XY geometry.
  • Verify the exported toolpath in a CAD/DXF viewer and dry-run before machining.
  • Runs locally in your browser, nothing is uploaded.

Privacy

Privacy first: this tool runs entirely in your browser — your input and files never leave your device, and everything is cleared when you close the page.