STL Viewer, OBJ Viewer, GLB & glTF Viewer

STL Viewer, OBJ Viewer, GLB & glTF Viewer, a VS Code extension by Zovo

STL viewer, OBJ viewer, GLB viewer and glTF viewer for 3D models in VS Code. Also opens PLY and 3MF, with wireframe, glTF animations, a scene tree, model stats, point-to-point measuring and PNG screenshots, all offline.

Install in VS CodeOpen the Marketplace page

Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.3d-model-viewer, version 0.1.5.

Click a .glb, .gltf, .stl, .obj, .ply or .3mf file and turn it, measure it and play its animations without leaving VS Code.

A robot arm GLB open in 3D Model Viewer inside VS Code. The Wave clip is playing. The panel on the right lists 10 meshes, 1,738 vertices, 1,840 triangles, 4 materials, 3 animations and a size of 0.84 by 1.64 by 0.84 metres, and the scene tree shows Base, Turntable, Shoulder, LowerArm, Elbow, UpperArm, Wrist, Camera and the two fingers, each with a visibility checkbox.

Real output from VS Code 1.142 on macOS. The file is robot-arm.glb, made by scripts/make-samples.mjs. scripts/e2e-vscode.mjs installed the packaged extension in a clean VS Code profile, opened the file and saved the window through the debug port.

Quick start

  1. Install 3D Model Viewer.
  2. Click a model file in the Explorer. Drag to orbit, right-drag or Shift-drag to pan, and scroll to zoom.

If another viewer opens, right-click the file and pick "Open in 3D Model Viewer", or use "Reopen Editor With..." from the editor title menu. "3D Model Viewer: Get Started" in the Command Palette opens a short tour.

Questions people ask

Is STL Viewer, OBJ Viewer, GLB & glTF Viewer free?

Yes. STL Viewer, OBJ Viewer, GLB & glTF Viewer is free and MIT licensed.

How do I install STL Viewer, OBJ Viewer, GLB & glTF Viewer?

Click "Install in VS Code" above, or search for zovo.3d-model-viewer in the Extensions view.

What it opens

FormatNotes
GLB and glTF 2.0Embedded or external .bin buffers and textures, PBR materials, node tree, skins, morph targets and animations
STLBinary and ASCII, with per-face colours when the file has them
OBJWith the .mtl file named by mtllib, when it sits next to the model
PLYASCII and binary, meshes and point clouds, vertex colours
3MFObjects, build items and base material colours

glTF files that need Draco or meshopt compression or KTX2 textures show a message that names the extension. The rest of the format list is in Limits below.

Inspect and measure

The gear STL with Measure on. Two red points on opposite sides of the gear are joined by a line labelled 51.36 units, and the status bar reads Distance 51.36 units, delta x 41.09, delta y 30.82, delta z 0.

Press Measure (or M) and click two points on the surface. The label sits on the line, and the status bar adds the X, Y and Z parts. A third click starts over and Esc stops.

The robot arm with Wireframe, Normals, Bounds and Axes on. Cyan vertex normals stick out of every surface and an orange box surrounds the arm.
ToolbarKeyWhat it does
FitFFrames the whole model. Clicking a node name in the scene tree frames that node.
GridGGround grid under the model. The panel lists the cell size.
AxesAModel axes, X red, Y green, Z blue
WireframeWTriangle edges
NormalsNVertex normals in cyan, for models up to 250,000 vertices
BoundsBBounding box. The status bar gives its size.
ShadingAs stored, smooth or flat. Smooth merges shared corners, which fixes the faceted look of STL files.
BackgroundTheme colour, dark or light
Up axisY up or Z up. STL and 3MF open Z up and the rest Y up.
MeasureMDistance between two clicked points
ScreenshotSaves the view as a PNG through a save dialog
PanelPShows or hides the stats and the scene tree

Units come from the format. glTF is in metres and 3MF in millimetres unless the file says otherwise. STL, OBJ and PLY have no unit, so sizes are raw coordinates.

Animations and the scene tree

glTF files with animations get a bar with a clip picker, Play and Pause (or Space) and a time slider you can drag. The scene tree lists up to 3,000 nodes with their triangle or point counts. Unchecking a node hides it and its children.

A 160,000 point terrain scan from a binary PLY file, coloured by height from green to brown to white.

PLY files without faces open as point clouds, with their colours.

A torus knot OBJ with copper and slate materials from its MTL file, 103,716 vertices and 34,572 triangles.

Settings

SettingDefaultWhat it does
modelViewer.backgroundthemeBackground when a file opens, the theme editor colour, dark or light
modelViewer.upAxisautoZ up for STL and 3MF, Y up for the rest. Set y or z to force one.
modelViewer.maxFileMB1024Files larger than this show a message and are not read
modelViewer.askForRatingtrueAsk one time for a Marketplace rating after a few days of use. Nothing is sent anywhere.
modelViewer.showSupportLinkstrueShow the small Sponsor and More free viewers links in the status line.

Privacy and safety

The extension makes no network calls and has no telemetry. The model file is never written. The only file it writes is the PNG you save with Screenshot. The webview runs under a strict Content Security Policy with no remote sources, and names from the file are shown as plain text. Sibling files (.bin, .mtl, textures) load only from the model folder and the open workspace folders.

Limits

License

MIT. The viewer bundles three.js (MIT). See THIRD-PARTY-NOTICES.md.

Install STL Viewer, OBJ Viewer, GLB & glTF Viewer

Click the button to open VS Code and install it, or press Ctrl+P (Cmd+P on macOS) in VS Code and run ext install zovo.3d-model-viewer.

Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.3d-model-viewer, version 0.1.5.

Source code and issues are on GitHub.

All our VS Code extensions

Support this work

If this extension saves you time, you can support the work on GitHub Sponsors. Monthly tiers start at $5, and one-time tiers start at $15. Sponsorship is optional, and the tool works the same without it.