Online G-code viewer and analyzer

Open a .gcode file from any slicer, or a Bambu .gcode.3mf, and step through the toolpaths layer by layer. Read the print size, layer count, filament and the slicer's time estimate, right in your browser.

Never uploadedCura, Prusa, Bambu, OrcaLayer slider & travel movesWorks offline

Loading tool…
3dfiles Pro: big files, STEP export, batches.Pro adds files over 100 MB, unlimited STEP export, fit-to-printer cuts, colour 3MF and big batches. A one-off 7-day pass, or monthly with 7 days free.
See Pro

How to view G-code

  1. Drop the .gcode file into the box above or click Choose file. A sliced .gcode.3mf from Bambu Studio or OrcaSlicer opens the same way; its first plate is shown.
  2. Drag the Layers slider to draw the print up to any layer. The readout gives the layer number and its Z height, and the top layer shown is highlighted.
  3. Tick Travel moves to add the moves made without extruding. They are off at the start and drawn in grey.
  4. Rotate and zoom, or switch to Front, Top or Right. Read the figures in the panel; Screenshot saves a PNG.

This page shows G-code that a slicer has already made. It does not slice an STL. To check a model before slicing, use the print checker or the STL viewer.

What the viewer reads from your file

Row in the panelWhere it comes from
Print size (X × Y × Z)The box around all extrusion moves, in millimetres
Layers and HeightThe Z levels that have extrusion, and the Z of the highest one
FilamentThe slicer's own figure when the file has one, otherwise the sum of the E moves. Shown in metres and as an approximate weight for 1.75 mm PLA
Print time (slicer)The estimate the slicer wrote into the file. The viewer does not calculate a time; the row is left out when the file has none
Sliced withThe slicer name and version from the file's comments
MovesThe number of move commands that change position

Speeds, temperatures, retractions and time per layer are not analysed, and moves are not coloured by speed or feature type. To turn the filament length into grams for another material or diameter, use the filament length calculator.

Which G-code files open

  • Extensions: .gcode, .gco and .g, plus Dremel .g3drem and FlashForge .gx, whose binary header is skipped.
  • Bambu Studio and OrcaSlicer .gcode.3mf: opened directly. The toolpath of the first plate is shown and the status line says how many plates the file has.
  • Other extensions such as .nc: the file picker does not list them, but G-code is recognised by its content when you drag the file onto the page.
  • Commands read: G0 and G1 moves, G2 and G3 arcs (with I/J or R), G90/G91, M82/M83 for absolute and relative extrusion, G92, G20/G21 for inch and millimetre files, and G28.
  • Slicer comments read: PrusaSlicer, SuperSlicer, Bambu Studio, OrcaSlicer, Cura, Simplify3D, ideaMaker, KISSlicer and Slic3r are recognised by name. The toolpath is drawn whichever program wrote the file.
  • CNC and laser files: G-code with no extrusion is drawn from its feed moves and labelled "G-code (CNC / laser)", with the work area and the number of Z levels. This is a preview of the path, not a simulation of the machine.
  • Not readable: Prusa binary G-code (.bgcode). See the troubleshooting list below.

What is G-code?

G-code – RS-274 machine instructions

G-code (RS-274 machine instructions) was developed in the 1950s as a language for numerically controlled machines. It is a list of move commands that tells a 3D printer or CNC machine where to move and how much to extrude. It is the file a slicer produces and a printer actually runs. More about G-code files

Checking the G-code before printing helps catch missing layers, wrong scale or a model placed off the build plate. The steps before slicing are in how to check an STL before printing.

Troubleshooting: G-code file won't open or looks wrong

  • Prusa's .bgcode doesn't load. From version 2.7.0 PrusaSlicer writes binary G-code by default for printers that support it. It is not plain text, and this viewer cannot read it. In PrusaSlicer, File → Convert turns an existing .bgcode into plain G-code. To export plain G-code from the start, untick Support binary G-code under General in the printer settings (Prusa's article on binary G-code).
  • A Bambu file ends in .gcode.3mf. That is a ZIP containing the G-code per plate plus thumbnails and settings. Drop it here as it is: the first plate is shown and the status line says how many plates there are. To see another plate, rename the file to .zip and extract that plate's .gcode from the Metadata folder, or export the plate's G-code from the slicer.
  • Moves are missing or extrusion looks wrong. Arc moves (G2/G3) written by Arc Welder or a slicer's arc fitting are drawn as short segments here, and both absolute (M82) and relative (M83) extrusion are read. What cannot be drawn is anything the file does not spell out: moves made by a firmware macro, such as a Klipper start or purge macro, exist only on the printer.
  • A 300 MB file is slow. Large prints at fine layers produce millions of moves, and the whole file is read before anything is drawn. On very long prints the last part of the toolpath is counted in the figures but not drawn; the status line says so when that happens.

What people use G-code viewers for

A G-code viewer shows the toolpaths the printer will actually follow, layer by layer – not the model the slicer started from. It is used to catch problems before printing: missing thin walls, gaps in top layers, supports that don't touch the part, or travel moves across the print.

People also use it to check a file someone else sliced, find the layer number and Z height for a filament change or pause with the Layers slider, and confirm which printer and settings a file was made for from its header comments.

Common questions

Can this slice an STL into G-code?

No. It shows G-code that a slicer such as Cura, PrusaSlicer, Bambu Studio or OrcaSlicer has already produced. To prepare a model for slicing, the print checker finds an orientation and suggests starting settings.

Can I inspect a single layer?

Drag the Layers slider: the print is drawn from the first layer up to the one you pick, and that top layer is highlighted. The readout shows its number and Z height. Layers above it are hidden.

Does it estimate print time itself?

No. The Print time row is the estimate your slicer wrote into the file. If the file has no such comment, the row is left out.

Which slicers and firmwares are supported?

Any slicer that writes plain-text G-code. The move commands shared by Marlin, Klipper and RepRapFirmware are read; firmware-specific commands and macros are skipped, so moves hidden inside a macro are not drawn.

Can I view .nc or CNC G-code?

Yes. A file without extrusion is drawn from its feed moves and labelled as CNC / laser G-code. Drag a .nc file onto the page, because the file picker only lists the 3D-printing extensions.

How do I open a Prusa .bgcode file?

Not here: .bgcode is binary. In PrusaSlicer, File → Convert turns it into plain G-code, which opens in this viewer.

Can I convert G-code back to STL?

Not reliably – G-code contains toolpaths, not a surface. Keep the original STL or 3MF.

Is the file uploaded?

No. The file is parsed and drawn in your browser.

Can I see the print time and filament use of a G-code file?

Yes. The panel shows the print time your slicer wrote into the file and the filament in metres, with an approximate weight for 1.75 mm PLA. When the file has no filament figure, the length is added up from the extrusion moves.

What is a G-code flavour?

It is the dialect a firmware expects, such as Marlin, Klipper, RepRapFirmware or Bambu. The basic move commands are shared, but temperature, pause and acceleration commands differ, so G-code is tied to the printer it was sliced for.