GCODE to OFF Converter - Toolpath Mesh in ASCII | MiConvert

Convert GCODE to OFF Online

Upload a G-code program and get back an ASCII OFF file: a vertex list plus triangles, built from the moves recorded in the file. It is a reconstruction of the path the machine would follow, not the model that was sliced, so expect a thickened shell around every kept move.

📁

Drop your file here

or click to browse

Select File

Max 10 files, 50MB each

SSL Encrypted Auto-deleted No Sign Up 100% Free
GCODE → OFF

Why convert G-code to OFF?

A G-code file is a list of machine instructions, move here at this feed rate, extrude this much, raise the spindle, with no mesh, surface or object description inside it, so geometry tools have nothing to load. OFF (Object File Format) is the opposite kind of file: a header line, counts, then vertex coordinates and triangle indices, which is why CGAL, MeshLab and Geomview read it without a plugin.

Our converter runs on our servers, not in your browser. A Python step reads the program line by line, tracking position through G0-G3 moves, G90/G91, G92 and M82/M83. If any E word appears outside a comment, the file is treated as FDM output and only moves where cumulative extrusion increases are kept, so travel and retraction drop out. Without an E word it is read as a CNC or laser program: G1/G2/G3 cuts and the plunge into the first cut are traced, G0 rapids skipped. The surviving samples are marked into a voxel grid, a marching-cubes surface is pulled from the distance field at a fixed 0.2 mm radius, and that surface is written as ASCII OFF triangles.

What you keep is a closed surface with corrected normals and coordinates exactly as the program wrote them, with no re-centering and no axis flip; what you lose or get approximated, including real bead width, arcs, inch units, colors and layer structure, is covered in the questions below.

This is useful if you need a mesh to feed into CGAL, MeshLab, Geomview or your own parser, to measure a bounding box, see where material actually goes, or sanity-check a program whose source model you no longer have. If you came looking for a printable model back out of G-code, read the first question below.

How to convert a G-code file to OFF

  1. Start from the program itself: the file your slicer saved or your post-processor wrote. A .gcode, .g or .gco file works, as does a FlashForge .gx and a PrusaSlicer binary .bgcode, which is decoded to text G-code first.
  2. If the program came out of an arc-fitting option such as Arc Fitting or ArcWelder, re-slice with that off: arc moves survive only as straight chords, and a full circle written as one G2 disappears.
  3. Check the size: 50 MB per file without an account, 100 MB with a free account, 200 MB on Plus, 1 GB on Pro, up to 10 files per request for guests.
  4. Drop the file on this page and start the conversion. It is uploaded over HTTPS and converted on our servers; each engine step gets up to 10 minutes, and binary G-code decoding gets 5.
  5. Download the OFF file. The link stays valid for about 4 hours, after which the output is deleted automatically.
  6. Open it in MeshLab, Geomview, Blender or your own code, and scale by 25.4 if the source was an inch (G20) program.

What this converter actually does

  • Writes plain ASCII OFF: the OFF keyword, counts, vertex coordinates and triangle indices, readable in a text editor and parsable by CGAL, MeshLab and Geomview.
  • Produces a closed surface shell around every kept move, with normals repaired (verified watertight on our test files), so mesh tools get a sealed surface rather than loose path geometry.
  • Detects FDM versus CNC content from the presence of extrusion words, keeping extruding moves in one case and cut moves in the other, and skipping G0 rapids.
  • Handles G90/G91 for axes, M82/M83 for the extruder and G92 resets, so relative-E slicer output traces correctly.
  • Accepts the aliases .g, .gco and FlashForge .gx, and decodes Prusa binary .bgcode (deflate, heatshrink 11/4 and 12/4, MeatPack, CRC32 checked).
  • Drops the purge or intro line when the file contains layer markers such as ;LAYER_CHANGE or ;LAYER:n.

Video Tutorial

Discover the easiest way to convert GCODE files to OFF — 100% free, no registration! 🔗 Convert now: https://miconvert.com/en/gcode-to-off?utm_source=youtube&utm_medium=social&utm_campaign=gcode-to-o

Frequently asked questions

Can I get my original STL or CAD model back from G-code?

No, and no converter can: the slicer discarded the model when it wrote the path, and only the moves remain. What you get is a thickened surface wrapped around those moves, with the infill lattice inside the shell, useful for measuring and poor as a basis for editing or re-slicing. For the same reconstruction in a more common container, try our G-code to STL page.

Why do my arcs and inch dimensions look wrong?

Arc commands are read for their end point only; I, J and R are never interpreted, so a 90-degree G2 becomes a straight chord and a full circle whose start equals its end collapses to nothing. Re-export with arc fitting disabled so curves become short G1 moves. G20 and G21 are ignored too, so an inch program keeps its inch numbers, and OFF has no unit field to correct that; scale by 25.4 after import.

I got "No movement/extrusion commands found in G-Code file". What went wrong?

The parser found no usable moves. Common causes: a program of only rapids or travel; a CNC program with an E word outside a comment, which switches the file into FDM mode and drops the cutting moves; a text file that is not G-code; or a binary file renamed to .gcode. Upload the posted or sliced program itself and check that cuts use G1, G2 or G3.

Which file extensions are accepted?

On this page: .gcode, .g, .gco, .gx and .bgcode. Controller extensions such as .tap, .ngc, .mpf, .ncc and .eia are not recognized; rename the file to .gcode to use it here, or to .nc and use our NC to OFF page, which is also where .nc and .cnc programs belong. Sliced .gcode.3mf projects are not a G-code source here, and .bgcode files signed for Prusa Connect cannot be read, so export an unsigned one or turn off binary G-code in PrusaSlicer.

Will colors, layers, supports or print settings survive?

No. The output is one merged, untextured mesh of positions and triangles: no color, no material, no per-extruder or per-feature separation, no layer structure. Prime towers, skirts and supports fuse into the same geometry, since only ;TYPE:Custom blocks are filtered. Large jobs also come out coarse: the bead radius is a fixed 0.2 mm and the voxel size is max(0.3 mm, longest side / 250).

I was searching for how to turn off the fan, spindle or bed in G-code. Does this help?

No. This page reads a program and writes a mesh; it never edits or re-emits G-code, and fan, spindle and heater commands are ignored during parsing. Change them in your slicer's custom start and end G-code, or in a text editor.

What happens to my file after the conversion?

The upload is converted on our servers and deleted as soon as the job's final attempt ends. The OFF result stays available through an unguessable random download link for about 4 hours, then it is deleted automatically. Transfers run over HTTPS. File names, sizes, formats and outcomes are logged, and signed-in users get a history row, so this is not an anonymous or in-browser process.