NC to STL Converter - Toolpath to 3D Mesh | MiConvert

Convert NC to STL Online

Upload a CNC program (.nc or .cnc) and get a binary STL that wraps the tool center-line in a thin closed surface. Read it as a picture of the toolpath, not the finished part: the converter never learns your cutter diameter, so nothing about stock removal is simulated.

📁

Drop your file here

or click to browse

Select File

Max 10 files, 50MB each

SSL Encrypted Auto-deleted No Sign Up 100% Free
NC → STL

Printing a photo instead?

Turn a picture into a lithophane or relief STL that glows when light shines through it. It is built in your browser, and the photo is never uploaded. Lithophane maker →

What an NC file holds, and what the STL actually contains

An .nc file is the plain-text G-code a post-processor wrote for a mill, router or laser: motion blocks with X, Y and Z coordinates, feedrates, spindle commands and tool calls. There is no geometry entity anywhere in it, which is why a mesh viewer, a slicer or a 3D printing app has nothing to open. The queries that bring people here, "convert cnc files to stl files" and "ncviewer export stl", are both about the same wish: see the path as an object instead of scrolling through coordinate lines.

The conversion runs on our servers in a Python process, directly from the motion commands. If no E (extrusion) word appears outside comments, the program is treated as CNC: G1, G2 and G3 moves plus the bare coordinate lines that follow them are collected, and explicit G0 rapid blocks are skipped, so the mesh shows cutting motion and the plunge from clearance height into the first cut. Those path samples are marked in a voxel grid, then a distance transform and marching cubes build a surface around them at a fixed radius of 0.2 mm. Voxel size is the larger of 0.3 mm or the longest side divided by 250, so a small part is sampled at 0.3 mm while a 500 mm router job lands on a 2 mm grid and comes out coarse and quantized.

What survives: the coordinates exactly as written, with no re-centering and no axis change; a closed surface with consistent normals; and a binary STL, the most widely supported mesh format. What is lost: arcs, because I, J and R are never read, so a G2/G3 move becomes a straight chord and a full circle whose start equals its end disappears entirely (re-post with arcs linearized into short G1 segments if curve fidelity matters). G20 is ignored, so an inch program keeps its inch numbers and will look about 25.4 times too small when read as millimeters. Rotary A/B/C words, tool changes, cutter compensation (G41/G42), work offsets (G53-G59) and canned cycles (G81-G89) are not interpreted, and feed, spindle and laser power are ignored, which means a G1 travel with the laser off is drawn like a cut. Modal motion is not tracked either: explicit G0 blocks are skipped, but a bare coordinate line that follows a G0 is traced as a cut, so some rapid moves can still appear in the mesh. Everything merges into one mesh with no colors, no materials and no separation per operation or per tool.

So this page suits machinists and CAM users who want to eyeball a posted program as a shape, hand a reviewer something they can spin in a viewer, or turn a GRBL engraving path into a 3D object. It is the wrong tool if you need the designed part back, a solid for machining, material-removal simulation, or if your .nc is really a DSTV steel-detailing file.

How to convert an NC program to STL

  1. Open the file in a text editor and confirm it is motion G-code, with G1, G2 or G3 blocks carrying X/Y/Z coordinates.
  2. Check the extension. We accept .nc and the alias .cnc; controller extensions such as .tap, .ngc, .ncc, .mpf and .eia are rejected, so rename a copy to .nc first.
  3. If the program is in inches (G20), either re-post it in metric or plan to scale the mesh afterwards, since units are not converted.
  4. Drop the file on this page. It uploads to our servers: up to 50 MB per file as a guest, 100 MB with a free account, 200 MB on Plus, 1 GB on Pro.
  5. Start the conversion. Short programs, which is what most uploads here are, finish within a few seconds; long milling programs take longer, and each step is cut off at 10 minutes.
  6. Download the binary STL, open it in a mesh viewer or slicer, and compare it against your CAM preview, especially in arc-heavy regions.

What this converter does

  • Detects CNC-style programs automatically (no E words) and keeps cutting motion: explicit G0 rapid blocks are dropped, plunges into the cut are kept.
  • Builds a closed surface around the tool center-line using a voxel distance transform and marching cubes, with normals corrected, so the output is a watertight mesh rather than loose path lines.
  • Writes binary STL and leaves the coordinate values untouched, so the mesh keeps the program's own work coordinates and its original numbers (millimeters for a G21 program, inch values for a G20 one).
  • Accepts .nc and .cnc, and handles 3-axis milling, routing and laser (GRBL) G-code the same way, treating every feed move as path.
  • Refuses to deliver an empty file: if no usable motion is found, the job fails with a message instead of handing you a zero-geometry STL.
  • Several programs per request, each converted and downloaded separately, with the per-file ceiling rising from 50 MB to 1 GB by plan.

Video Tutorial

Pro tip: convert NC to STL without installing anything! 💡 🔗 https://miconvert.com/en/nc-to-stl?utm_source=youtube&utm_medium=social&utm_campaign=nc-to-stl ⏱️ Timestamps: 0:00 Intro 0:06 Finding th

Frequently asked questions

Will the STL show the machined part?

No. It is a thin shell around the tool center-line at a fixed 0.2 mm radius. The converter does not know your cutter diameter, stock or depth of cut, so it cannot show the finished part or the removed material. Treat it as a 3D drawing of the path.

Why does my large router job look blocky?

Voxel size is the longest side divided by 250, with a 0.3 mm floor, so a 500 mm job is sampled on a 2 mm grid and path positions get quantized to it. Smaller programs keep much finer detail. Splitting a long program into separate operations gives crisper meshes.

I get "No movement/extrusion commands found in G-Code file". What now?

This is the most common failure here. It happens with programs that contain only rapids, files that are not really G-code (setup sheets, logs, renamed binaries), or a stray E word outside a comment, which makes the file parse as print G-code and drops the CNC moves.

My .nc came from steel detailing software (DSTV / NC1). Can I use this page?

No. A DSTV file sent to an STL target goes through the G-code parser and yields a few meaningless triangles that are still reported as success. Use the NC to DXF page, which reads DSTV directly and draws contours, holes, slots and marking text on separate layers.

Can I upload .tap, .ngc, .mpf or .eia files?

Not under those extensions; they are not in the accepted list, so the upload is rejected as an unsupported format. The contents are usually ordinary G-code, so rename a copy to .nc or .gcode. Note that 4- and 5-axis programs still lose rotary motion, because A, B and C are ignored.

I need the toolpath as 2D lines for CAM or a laser, not a mesh.

We cannot do that from G-code. Our DXF target also exports the same voxel surface as a single 3D MESH entity, with no LINE, LWPOLYLINE or ARC geometry, so it is not usable in 2D CAM. A real layered 2D DXF only comes out of DSTV input.

How many files can I send at once, and how big?

Up to 10 files per request as a guest or free account, 25 on Plus and 50 on Pro. Each file converts and downloads on its own; there is no combined ZIP. Free tiers are also capped at 10 conversion jobs per hour per IP address.

What happens to my NC program after the conversion?

Processing happens on our servers, not in your browser. Your upload is deleted as soon as the job finishes, and the STL plus its download link stay available for about 4 hours, then are removed automatically. Transfers use HTTPS; file names, sizes and outcomes are logged for operations.