3D model viewer: open STL, OBJ and GLB files and measure them
Drop a 3D model to turn it, zoom in and save a picture, and to get the numbers a 3D print depends on: triangle count, width × depth × height, surface area, whether the mesh is watertight, and its volume. It opens STL (binary and text), OBJ with its .mtl and textures, GLB, and .gltf with its .bin, using three.js inside this tab.
The model is opened on your device. It is never uploaded.
What it shows
- The model, lit and turnable. Drag to rotate, scroll or pinch to zoom, right-drag or two-finger drag to pan. The camera frames the whole model when it opens, and “Reset view” brings that back. A wireframe switch shows the triangles themselves; a grid under the model, labelled with its square size, gives a sense of scale.
- Triangle count: every mesh in the file, after quads and polygons are split into triangles, which is how slicers and game engines count.
- Size as width × depth × height of the axis-aligned bounding box, plus the raw X, Y and Z extents. STL is read as Z-up, the 3D-printing convention; glTF is Y-up by its specification; OBJ is assumed Y-up. If the model lies on its side, switch the up axis.
- Surface area, the sum of all triangle areas, with a cm² conversion. Useful for estimating paint, plating or coating.
- Watertight or not. A mesh is closed when every edge is shared by exactly two triangles. The page counts the edges that belong to only one triangle (holes) and those shared by three or more (non-manifold), and names both.
- Volume, only for a closed mesh, with the weight of a solid print in PLA. On an open mesh the page says “not watertight — N open edges — volume not shown” rather than print a number that means nothing.
- Save picture (PNG): the current view at the canvas's full pixel size with a transparent background, made in this tab and saved by your browser's normal download.
What it cannot open
- Draco- or meshopt-compressed glTF. Files that use KHR_draco_mesh_compression or EXT_meshopt_compression need a separate decoder that viewhack does not include. The page says which one it found. Blender imports Draco files and can export them again without compression.
- FBX, 3MF, PLY and .blend. FBX is a closed Autodesk format. A 3MF is a ZIP of XML meshes from slicers (PrusaSlicer, Bambu Studio, Cura), and those programs export STL. PLY comes from 3D scanners and MeshLab, which saves STL or OBJ. A .blend opens only in Blender, which exports all three formats that open here.
- STEP and IGES CAD files (.step, .stp, .iges, .igs). They describe exact curved surfaces, not triangles, and turning them into a mesh takes a CAD kernel. Export STL or 3MF from the CAD program instead; choose a fine tolerance if the curves must stay smooth.
- Anything a model fetches from the internet. If a .gltf, .obj or .mtl points at a file by web address, that file is not downloaded. The page lists it, with the reason. A missing texture leaves the surface plain. A missing .bin buffer holds the geometry itself, so the model cannot be drawn without it.
- Very large models. Opening and measuring takes roughly 400 bytes of memory per triangle at its peak. A 1-million-triangle model needs about 400 MB; a 5-million-triangle scan needs about 2 GB. Desktop browsers usually manage that; phones often run out of memory and reload the page.
- Animation and textures in GPU formats. glTF animations are not played, so skinned characters show their rest pose. KTX2/Basis textures (KHR_texture_basisu) are not decoded.
- Editing and repair. This is a viewer. It finds holes but does not fill them, and it saves pictures, not models.
Useful to know about 3D model files
- STL has no units
- An STL stores bare numbers. Cura, PrusaSlicer and nearly every CAD export treat them as millimetres, so this page does too, with a switch for cm, m and inches. If a part you expect to be 40 mm long shows as 1.575, it was exported in inches (1.575 × 25.4 = 40). If it shows as 0.04, it was exported in metres.
- Binary versus ASCII STL
- A binary STL is an 80-byte header, a 4-byte triangle count and exactly 50 bytes per triangle, so a 1-million-triangle model is about 50 MB. That exact size is how viewhack recognises one, since the header can hold any text, even the word “solid”. An ASCII STL writes every number out as text and is usually about five times bigger for the same mesh. Neither stores colour in a standard way, or shares corners between triangles.
- Why watertight matters
- A slicer has to decide what is inside the part and what is outside. With a hole in the surface there is no inside, so it may fill the wrong regions, skip layers or refuse the file. Typical causes: a face deleted by accident, a model built from separate surfaces that only look joined, or parts that touch without sharing edges. The open-edge count shows how many edges are affected. Slicers' repair functions and Blender's 3D-Print Toolbox can close small holes.
- How the volume is worked out
- Each triangle and a fixed point form a tetrahedron whose volume is positive or negative depending on which way the triangle faces. On a closed surface the parts outside the solid cancel, and the sum is the exact enclosed volume, whatever the shape. On an open surface nothing cancels properly, which is why no number is shown. If the triangles are wound inconsistently (some face in, some out), the volume is withheld as well.
- Weight of a print
- The page multiplies the volume by 1.24 g/cm³, a typical PLA density. A 20 × 10 × 5 mm block is 1,000 mm³ = 1 cm³, about 1.24 g printed solid. Real prints use a few solid walls plus 15–20 % infill, so they weigh noticeably less; how much less depends on the wall count and the part's shape. For a quote, trust your slicer's estimate.
- glTF, GLB and the .bin file
- A .gltf is JSON describing the scene. Its geometry sits in one or more .bin files, and its textures in image files, all named inside the JSON. A GLB packs all of it into one binary file. To open a .gltf here, select the .gltf together with its .bin and images in the file picker, or drop them all at once. Positions in glTF are metres, and Y points up.