Convert G-code to OBJ
Free G-code to OBJ converter that runs in your browser. See real dimensions before you download.
In short: To convert G-code to OBJ, drop the file on this page, check its size in millimetres in the preview, choose OBJ and download — the conversion runs entirely in your browser, so the file never leaves your device. Units stored in file: numbers in mm; Usual up axis: rotated (switchable).
How to convert G-code to OBJ
- Drop your G-code file onto the converter — it opens in your browser, nothing is uploaded.
- Check the preview and the dimensions in mm; fix units or the up axis in “Units & orientation” if the size or orientation looks wrong.
- Choose OBJ as the output and click Convert. Several files download as one ZIP.
What carries over from G-code to OBJ
| G-code | OBJ | Result | |
|---|---|---|---|
| Colour / materials | No | Yes | — |
| Textures | No | Yes | — |
| Units stored in file | Yes | No | Numbers in mm |
| Separate parts | No | Yes | — |
| Usual up axis | Z | Y | Rotated (switchable) |
About G-code files
G-code is the long-standing numerical control language for CNC machines, standardised as RS-274, and 3D printers use a dialect of it. A .gcode file is a text list of commands such as G1 X50 Y20 E0.8 F1800, which moves the nozzle while extruding, plus M-codes for temperatures, fans and bed settings. A slicer such as Bambu Studio, PrusaSlicer, OrcaSlicer or UltiMaker Cura produces it from a model by cutting the shape into layers and choosing perimeters, infill, speeds and supports. The result is tied to one printer, one filament profile and one set of settings. Prusa's firmware also accepts a compressed binary variant, .bgcode, and some machines use .gco or plain .g. Because it describes motion and not surfaces, G-code cannot be edited like a mesh, and it is not a way to share a design.
About OBJ files
OBJ comes from Wavefront Technologies' Advanced Visualizer software in the 1980s, and it has outlived the product. A file is plain text: lines starting with v define vertices, vt texture coordinates, vn normals, and f faces that reference those lists by index. Faces may be triangles, quads or larger polygons, and the g and o keywords group faces into named objects. Appearance is not in the OBJ at all; a line called mtllib points to a separate .mtl file that lists materials with diffuse colours and texture image names. The format is verbose, has no official unit and no scene hierarchy or animation, but it is trivial to read and write. That is why scanners, photogrammetry tools, sculpting programs and game pipelines still use it to move static meshes around.
3D printing notes
G-code is the last step of printing, not an input to it. You usually cannot print a G-code from a different printer without risking collisions, wrong temperatures or an out-of-range bed. People open G-code to preview layers, check estimated time, or rescue a design when the source file is lost. MeshShift reads G-code, shows a layer preview, and can rebuild the printed toolpaths into a closed solid saved as STL, 3MF or OBJ. That solid is approximate and depends on the chosen resolution, so thin walls and fine detail are rounded off; treat it as a stand-in for the lost model rather than an exact copy. MeshShift does not write G-code.
Frequently asked questions
Is this G-code to OBJ converter free and private?
Yes. The conversion runs in your browser with JavaScript and WebAssembly, so your G-code file is never uploaded to a server. There is no sign-up, no watermark and no daily limit; very large files are limited only by your device's memory.
Can I convert G-code back to an STL?
Approximately. A slicer discards the original surfaces, so a converter has to rebuild a solid from the extrusion paths. The result matches the printed shape at the chosen resolution but loses fine detail and has stair-stepped layers. It is useful when the source model is gone.
Why does my OBJ import without its colours or textures?
The colour information is in a separate .mtl file and image files. If the MTL or textures are missing, renamed or in another folder, the importer shows plain grey geometry. Keep the OBJ, MTL and images together, or convert to GLB, which packs them in one file.
Does converting G-code to OBJ keep the size and accuracy?
Yes, the coordinates are copied, not resampled, so the model keeps its shape and its size in millimetres. A G-code reconstruction is approximate and depends on the resolution you choose. The preview shows the dimensions before you download, so you can check them against the original.
Can I convert several G-code files to OBJ at once?
Yes. Drop or select several G-code files together; each one is converted in your browser and they download together as one ZIP file. There is no limit on the number of files.
Is there a file size limit for G-code to OBJ?
There is no server limit, because nothing is uploaded. The practical limit is your device's memory: files of several hundred megabytes work on a typical laptop, and a phone handles smaller files. Large files take a few seconds longer to open.
What if my OBJ file is the wrong size or lying on its side?
Open "Units & orientation" before converting. You can say which unit the G-code was made in (mm, cm, m or inches) and rotate Y-up to Z-up. The dimension labels update at once, so you can check the size before you download.