The G-code viewer shows what a printer will actually do with a sliced file: every extrusion line, coloured from blue at the bed to orange at the top, with a slider to step through the layers. Cards show the print time, filament length and weight, number of layers and the size of the print.
Test file
A G-code file written for the test: the outline of a 20 mm cube, 100 layers of 0.2 mm at 30 mm/s, 13.5 KB.
The file was read in 0.1 s. The viewer showed 0.27 m of filament, which matches the 0.266 m written in the file, 100 layers, a size of 20 × 20 × 20 mm, and a print time of about 4 minutes; the moves alone take 267 seconds. Real slicer files carry their own time estimate, which the viewer uses instead.
Check a file before a long print: that supports are where you expect, the first layer covers the bed, a pause is at the right height, or a model that came from someone else is sliced the way they say.
To estimate the material before slicing, use the 3D Print Cost Calculator.