Folders

How to open .GCODE files (3D printer toolpaths) on Android, Windows and Linux

What a .gcode file is and how to open G-code and AMF 3D printing files for free on Android, Windows and Linux, to check the print's shape before you start.

Cover: Folders' 3D viewer on two phones, labelled .GCODE

You’ve downloaded a ready-sliced print, a friend has sent the file they print on their machine, or you want to know what’s on your printer’s memory card. The file ends in .gcode, and in a text editor it’s thousands of lines of short commands.

G-code is the list of moves a 3D printer follows. Folders opens it in its built-in 3D viewer on Android and Windows, for free, so you can see the printed shape as lines and turn it around before committing hours of printing. It also opens AMF, a 3D printing model format.

What is a .GCODE file?

G-code is the instruction language of computer-controlled machines, from milling machines and laser cutters to 3D printers. It goes back to the early days of numerical control, and most dialects follow the RS-274 standard.

Each line is one command. G1 X60.2 Y85.4 E2.31 moves the nozzle in a straight line while pushing out filament; G0 moves without printing; G2 and G3 draw arcs; M104 and M140 set the nozzle and bed temperatures. Lines starting with ; are comments, and slicers use them to record their settings, layer changes and the estimated print time.

A 3D printer can’t print an STL or 3MF model directly. A slicer such as Cura, PrusaSlicer, OrcaSlicer or Bambu Studio cuts the model into layers and writes G-code for one particular printer, with its bed size, nozzle, material and temperatures built in.

Extension What it is
.gcode A sliced print: the printer’s moves, layer after layer, as text
.amf Additive Manufacturing File Format: a 3D model for printing, written in XML

AMF is an ISO/ASTM standard designed to improve on STL: it can carry several objects, colours, materials and even curved triangles, and it can be saved zipped. It never caught on like STL or 3MF, but Slic3r-based slicers read it.

How to open a .GCODE file with Folders

  1. Install Folders from the download page and allow file access.
  2. Find the file. If it’s on the printer’s SD or microSD card, connect the card through a card reader, or copy the file to your phone or computer first.
  3. Tap the .gcode or .amf file. Long prints take a moment to load and show a progress bar.

On Android, choose Open with → Folders for files in other apps. On Windows, open the file in Folders, or right-click it in File Explorer and select Open with → Folders. On Linux the 3D viewer isn’t available yet, because it needs a web view the Linux version doesn’t have; Folders offers Open with…, so you can use your slicer’s preview instead.

What you can do with it in Folders

With G-code:

  • See the printed shape as lines. The paths the nozzle prints are drawn in 3D, so you can check it’s the object you expect, at the size you expect.
  • Turn and zoom to look at overhangs, supports and the first layer, then Save screenshot.
  • Details shows the number of line segments and the print’s size in model units (millimetres, for nearly every printer).
  • Z axis is up, Ground grid and Axes help you read how the part sits on the bed.

With AMF:

  • The model shows as a solid mesh, standing up the way printers expect (AMF treats Z as up), zipped AMF files included.
  • Details lists meshes, vertices, triangles and materials, and Wireframe shows the triangles.

Folders is a viewer only. It doesn’t slice, estimate print time, edit G-code or send files to a printer.

Other ways to open .GCODE files

  • Your slicer. PrusaSlicer comes with a separate G-code viewer, and Cura and others can preview G-code layer by layer, with print time and filament use.
  • Your printer’s web interface. OctoPrint, Mainsail and Fluidd show a preview of each G-code file.
  • Any text editor, to read or change the commands themselves.
  • For AMF: PrusaSlicer, or Online 3D Viewer (3dviewer.net) in a browser.

Problems opening a .GCODE file?

Curves look broken or have gaps. Some slicers replace runs of short straight moves with arcs (G2/G3), a setting usually called arc fitting, or done by the Arc Welder plugin. Folders draws the straight moves but not the arcs; your slicer’s preview shows both.

It’s a .bgcode file. PrusaSlicer can save binary G-code, a compact form that isn’t plain text and isn’t one of the types Folders opens. Open it in PrusaSlicer’s G-code viewer, or turn binary G-code off in the printer settings and slice again.

Lines shoot off to one corner. Those are moves made without printing, such as the trip to the home position. Folders hides them when the file has printing moves to show, but milling and laser G-code has none, so all its moves stay visible. A CNC viewer such as NC Viewer or CAMotics suits those files better.

It’s slow, or says the model is too large. A long, detailed print can mean millions of moves. A computer copes better than a phone.

Questions people ask

Can I open G-code on my phone? Yes. Folders draws it in its 3D viewer on Android, without an internet connection.

Can I print a G-code file someone sent me? Only if it was sliced for the same printer and setup. G-code carries one printer’s bed size, temperatures and start routine, and on another machine it can print badly or drive the nozzle into the bed. Ask for the STL or 3MF and slice it yourself.

How do I convert G-code back to STL? You can’t, properly: G-code is a list of moves, not a surface. Ask for the original model.

AMF vs 3MF vs STL: which is better? STL holds only triangles. AMF and 3MF add colours, materials and multiple objects, and 3MF has become the usual choice in modern slicers. All three open in Folders.

More 3D printing help: STL, OBJ and 3MF files. Or browse all 382 file types Folders opens.

Keep reading