G-code Viewer Online: Layers, Print Time, Filament
Add to Chrome
EnglishEN
Home › G-code

G-code viewer

Drop a .gcode file into this G-code viewer and the toolpath appears layer by layer, with print time, filament and cost in the Info panel. The file is read inside this tab.

Drop STL, OBJ, 3MF, STEP or G-code here

or click to browse

Also GLB / glTF, PLY, IGES, OFF, 3DS, FBX, DAE, WRL, AMF · several files at once (OBJ + MTL, glTF + BIN)

🔒 Files are opened by your browser and never leave your device

More G-code tools

STL to G-codeOur FDM slicer in the tab: printer, layers, infill, supports, then Download G-code.NC viewerToolpath preview for .nc, .ngc and .tap: cutting moves, rapids, depth slider, size and Z range.G-code to STLRebuild the printed part from extrusion lines as a watertight STL.3D print time calculatorPrint time from G-code at once, or from an STL through our slicer.

What the G-code viewer shows

Your slicer turns a model into thousands of short moves. This page draws them as lines, so you can check the print before the printer heats up.

Test files with 10 layers show 10 layers on the slider. Orbit, zoom and pan work as in the 3D viewer.

Checks worth doing before a long print

A gap you spot at layer 40 on screen costs a minute; the same gap found on the bed at 3 a.m. costs the whole night of printing. So open the file the evening before an overnight job. Drag the slider to layer 1 and switch on single layer. The first layer should be one closed outline with the skirt or brim around it. Then step up to where the model changes shape, such as the start of an overhang or a thin tower, and look for missing walls.

Turn travel moves on near the top layers. Long travels across open space are where stringing starts. Compare the layer count and height with what you set in the slicer; a file sliced at the wrong layer height gives itself away at once.

Slicer comments and our second opinion

Most slicers write the expected time and filament as comments at the top of the file. The viewer reads these headers from five common slicers, and the tests covered four header styles. Simplify3D headers are read but were not in the test set. Next to that number you see our own estimate, worked out from the moves themselves.

When a file has no comments, our estimate becomes the print time. It replays each move with acceleration and jerk, the way the printer's planner does. The method and its error range are on the 3D print time calculator page.

Filament and cost from the toolpath

Filament here means net extrusion: retractions pull filament back and the next unretract pushes it out again, so they cancel. On 13 real files our length came within 1.1 % of PrusaSlicer's own figure.

Enter the price of a spool per kg and an hourly rate, and the panel shows the print cost. For quoting a part from the model rather than from G-code, use the 3D print cost calculator; to compare spools by grams and meters, the filament calculator.

Big files and what to expect

A G-code file with 400k moves (12 MB) opens in about 5 s on a laptop. On files that size the layer slider redraws in about 4 s, so the picture updates when you release the handle.

Plain-text G-code opens. Binary .bgcode files and Bambu .gcode.3mf project files do not, so export plain G-code from your slicer for this page.

The viewer was tested in Chrome 155 and runs in other Chromium browsers. Firefox and Safari have not been tested yet.

Where the file goes

JavaScript in this tab parses the moves, so the G-code stays on your computer. In a full test run every request went to our own domain as a plain GET, and nothing was posted.

Need G-code first? Our slicer on the STL to G-code page makes it in the same tab. Lost the model and kept only the G-code? G-code to STL rebuilds the printed shape.

Questions and answers

Is this a G-code simulator?

It draws the toolpath and replays the moves to estimate time. It does not simulate the machine, the plastic flow or material removal.

Which slicers' headers does it read?

Time, filament length and weight comments from five widely used desktop slicers. Files without such comments still open; then our estimate gives the time.

Why do I see two print times?

One comes from your slicer's comment, the other from our replay of the moves. On 13 PrusaSlicer files ours ran 0.6 to 8.8 % higher, median 2.6 %.

Can I open .gcode.3mf or .bgcode?

No. Both are packaged formats. Save plain .gcode from your slicer and drop that file here.

How long does a big file take to open?

About 5 s for 400k moves in a 12 MB file. Moving the slider on such a file redraws in about 4 s, so the view updates when you let go.

Can it read CNC programs?

Yes, as a toolpath preview: cutting moves, rapids and a depth slider, tested on four real CAM files. The NC viewer page lists what it reads and what it leaves out.