Description
GCode Preview is a small TypeScript library and web viewer for G-code, the instruction files that 3D printers and CNC machines read. Drop a G-code file onto the page and it draws the toolpath in 3D, with layers, travel moves and extrusion shown in separate colors. You can choose a start and end layer, view a single layer, render travel moves in their own color, draw extrusion as tubes, and highlight the top layer or the last segment. The viewer can show the build volume and a bounding box, use an orthographic camera, and draw a small grid. You can set the line width, the extrusion width fallback and up to several extrusion colors for each tool. The library is aimed at 3D printing software and websites that want to show a print preview, and it includes API docs. It is released under the MIT license, and the source is on GitHub.…
Highlights
- Draws G-code toolpaths in 3D in the browser
- Layer range, single layer and top layer highlighting
- Travel and extrusion views with custom colors
- Build volume, bounding box and orthographic camera
Ratings & Reviews
No ratings yet
Be the first to rate Gcode Preview.
People also visit
Grid Apps
Browser-based Slicer for 3D Printing, CAM, Laser (Kiri:Moto) and mesh editor
Gcode Preview FAQ
What does GCode Preview do?
It parses G-code files and draws a 3D preview of the print path, so you can check a file before printing it.
Can I use it in my own project?
Yes. It is a TypeScript library with API docs, and it is released under the MIT license.
Do I need to install anything to try it?
No. Drop a G-code file onto the page to preview it in the browser.
What can I change in the preview?
Layer range, travel and extrusion colors, tube rendering, line width, the build volume, background color and camera type.
What are the best Gcode Preview alternatives?
Popular alternatives to Gcode Preview include GCodeViewer, Grid Apps and QRCode2STL. See all Gcode Preview alternatives









