Free Online G-Code to DXF Converter (.NC / .TAP to AutoCAD R12 DXF)
When the original CAD drawing is gone and all you have left is a shop-floor .nc, .tap, .gcode, or .ngc machine program, CutPath parses the toolpath locally in your browser, ignores non-cutting G0 rapid traverses, projects G1 linear moves and G2/G3 circular arcs onto the XY plane as clean AutoCAD R12 (AC1009) LINE geometry, preserves native G20 inch vs G21 millimeter units, and flattens multi-pass Z-stepdowns so you can reopen the part in AutoCAD, Fusion 360, SheetCam, or LightBurn.
- Strips G0 rapid traverses and exports only active G1/G2/G3 cutting paths
- Projects XY geometry to strict AutoCAD R12 (AC1009) LINE entities
- Preserves modal G20 (inches) vs G21 (mm) scale & handles Z-pass flattening
- 100% free & local in-browser — zero proprietary .NC file upload
Controller Dialect & G-Code to DXF Recovery Calibration
| Parameter / Material | Recommended Setting | Shop-Floor Engineering Note |
|---|---|---|
| GRBL / GrblHAL (.nc, .gcode) | G21 mm / G90 Absolute · Incremental I/J Arcs | Standard desktop router, diode laser, and OpenBuilds dialect; G2/G3 arcs are chord-projected onto XY with tight tolerance. |
| Mach3 / Mach4 (.tap, .nc) | G20 Inch or G21 mm · G91.1 Incremental IJ | Supports legacy shop-floor .tap plasma and mill programs; ignores toolchange M6/T lines and spindle speed S-words. |
| LinuxCNC / EMC2 (.ngc) | Strict RS274NGC Modal State + G17 XY Plane | Handles modal motion groups across lines where G1/G2/G3 is omitted on subsequent coordinate blocks. |
| Langmuir FireControl / SheetCam (.tap, .nc) | G20 Inch · M3/M5 Torch On/Off + IHS Z-Probes | Filters out G38.2/G92 torch-height touch-offs and G0 repositioning moves so only cut profiles land in the R12 DXF. |
| Fanuc / Haas Mill (.nc, .tap) | G90 Absolute · O-Program Headers & % Delimiters | Strips tape leaders, N-line numbers, parenthetical comments, and canned Z-retract rapids before writing XY R12 DXF. |
Step-by-Step Shop Workflow
- 01 Drop your .nc, .tap, .gcode, or .ngc program into CutPath Free G-Code Viewer (/gcode-viewer) — processing runs 100% locally in your browser.
- 02 Verify G20/G21 units, XY bounding box dimensions, and toggle 2D XY view to confirm G1/G2/G3 cut geometry matches the physical part.
- 03 Click Export R12 DXF to download a strict AutoCAD R12 (AC1009) DXF with G0 rapid traverses automatically stripped out.
- 04 Optionally open the recovered DXF in /dxf-unit-scaler to fix 25.4× unit headers or in /plasma-dxf to deduplicate multi-pass Z layers and close loops.
Common Controller Errors & Verified Fixes
Recovered DXF opens 25.4× too large or 25.4× too small in AutoCAD or Fusion 360
Cause: Legacy G-code omitted an explicit G20 (inches) or G21 (mm) header, or your target CAM imported with opposite default units.
Fix: Check the detected unit badge in /gcode-viewer and, if needed, send the exported DXF through /dxf-unit-scaler for an exact 25.4× or 1/25.4× rescale.
Multi-pass router or mill G-code produces stacked overlapping lines in the exported DXF
Cause: Each Z step-down pass traces the exact same XY contour at a deeper Z height, creating coincident duplicates when flattened to 2D.
Fix: Drop the exported R12 DXF into /dxf-checker or WB-01 (/plasma-dxf) to deduplicate stacked XY passes and weld clean single-pass closed polylines.
Recovered part dimensions are off by half a cutter diameter or half a plasma kerf
Cause: G-code stores the tool centerline path (already offset by cutter radius or plasma kerf), not the raw uncompensated CAD nominal edge.
Fix: Measure a known feature in /dxf-viewer with the 2-point caliper and offset the recovered DXF inward/outward by half your original tool diameter or kerf in CAD.
G2/G3 arcs look like huge wild circles or flat straight chords
Cause: Source post-processor used absolute I/J arc centers (G90.1) instead of standard incremental I/J offsets from the start point.
Fix: Verify the backplot preview in /gcode-viewer first; confirm your post-processor outputs standard incremental I/J (G91.1) or R-radius arcs.