Why turn a print file into a GLB
STL is the language of slicers and GLB is the language of the web. If you want to embed a model on a product page, show a part to a client in a browser, place it on a table with a phone in augmented reality, or drop it into Unity, Unreal, Godot or Three.js, the file needs to be glTF. GLB is glTF with everything packed into one binary file, which is the form browsers and phones load fastest.
This converter reads the STL (binary or ASCII), merges its duplicated corners into an indexed mesh, computes vertex normals so the surface shades smoothly, attaches a plain grey material with physically based properties, and writes the JSON and binary chunks that make up a GLB. You see the result in the viewer before you download, so a mesh with flipped faces or missing pieces is obvious.
Like every tool on this site, the work happens in your browser. The file is read from your device, parsed in memory and drawn with WebGL; no copy is sent anywhere. Open the network panel of your browser's developer tools while you load a model and you will see no upload. Close the tab and the model is gone.
Worked example: a 100,000-triangle bracket for a product page
An engineer has bracket.stl, a 4.8 MB binary STL with 100,000 triangles, and wants a web preview on the company site.
- Drop the file. The status line shows
100,000 triangles,50,002 vertices,120.0 x 45.0 x 30.0 mm. The vertex count is half the triangle count, which is what you get for a closed mesh once shared corners are merged. - Orbit around. If any faces look dark or see-through, run STL repair first, because web viewers draw single-sided surfaces and a flipped triangle becomes a hole on screen.
- Click Download GLB. The file comes out at about 2.4 MB: 50,002 vertices at 24 bytes each (position plus normal) is 1.2 MB, and 300,000 triangle indices at 4 bytes each is another 1.2 MB, plus a few hundred bytes of JSON. Half the size of the STL, and with smooth shading the STL did not have.
- Load the GLB into a web component such as model-viewer, or open it in the GLB viewer to confirm it looks right.
One thing to watch: glTF is defined in metres and y-up, while the STL was in millimetres and probably z-up. The converter writes the numbers as they are, so the bracket arrives as a 120-metre object lying on its side in a scene that assumes metres. Most web viewers auto-frame the model so you will not notice, but if you are placing it in a real-scale scene or in AR, scale by 0.001 and rotate 90 degrees about X in the receiving tool, or in a modelling program before you convert.
What the GLB contains
- One mesh, one primitive with POSITION and NORMAL attributes and an index buffer.
- Normals computed per vertex from the merged surface. Smooth across gentle curves, which is right for organic shapes; a hard-edged mechanical part may look slightly soft on its edges compared with the STL's flat facets.
- A default material: neutral grey, metallic 0, roughness 0.6. Change it in a modelling tool or override it in your web viewer.
- No textures, no UVs, no animation, because STL has none of them.
- Coordinates exactly as in the STL, in whatever units it used.
Limitations
- No unit or axis conversion. Numbers are copied as they are; scale by 0.001 and rotate in the receiving tool if you need true metres and y-up.
- No colour or texture. The material is a single grey; STL cannot carry anything else.
- No Draco or Meshopt compression, so very large meshes produce large GLBs. Decimate first if the target is a phone.
- Holes and flipped normals in the STL carry through. Repair first.
- The whole STL is held in memory during conversion.
Last updated 2026-09-16. Runs in your browser; nothing is uploaded.