Blog · How-to

How to convert STL to GLB

Last updated 11 June 2026

STL is great for 3D printing but heavy and feature-poor for the web. GLB is web-native, compresses 5–10x smaller with Draco, supports materials and animations, and loads with one HTTP request. If you want to embed a 3D model on a webpage, ship it for AR, or just share a smaller file, convert your STL to GLB. Here are the free ways.

Option 1 — Blender (GUI, free, all platforms)

The most reliable option, especially for a one-off file.

  1. Install Blender from blender.org (free).
  2. Open Blender, delete the default cube (X key).
  3. File → Import → STL → pick your file.
  4. (Optional) Add a material — Properties panel → Material → New. Pick a colour and metalness / roughness if you want it to look PBR-correct.
  5. File → Export → glTF 2.0 (.glb/.gltf).
  6. In the export dialog: Format = glTF Binary (.glb). Tick "Compression" if you want Draco (smaller file, slightly slower decode).
  7. Save.

Blender's STL importer handles binary and ASCII STL, including ones with bad triangle winding. The glTF exporter is the reference implementation maintained by the Khronos Group.

Option 2 — glTF-Transform CLI (fast, scriptable)

If you have Node.js installed, the glTF-Transform CLI converts STL to GLB in one command:

npm install -g @gltf-transform/cli
gltf-transform copy input.stl output.glb

Add Draco compression in a follow-up step:

gltf-transform draco output.glb output-compressed.glb

This is the fastest path if you have to convert many files — it scripts cleanly.

Option 3 — online converters

Plenty of free websites convert STL to GLB. Quality varies, and you're uploading your file to a server you don't control. Acceptable for hobby files, not for anything confidential.

Names you'll see: Aspose, Convertio, ImageToStl, Anyconv. Most cap free conversions at 50–100 MB.

Option 4 — Open3D viewer (browser, in development)

Some browser viewers let you load an STL and export as GLB without leaving the page. The file stays on your device the whole time. Useful for quick one-offs without installing Blender. Check the viewer's export menu.

What changes in the conversion

STL stores only triangles with face normals. GLB can store much more, but if you start from STL there's only triangles to carry over. So the output GLB has:

If you want a coloured / textured GLB, you have to add the material before export. STL has nothing to convert from on that side.

Why the GLB ends up so much smaller

A binary STL stores each triangle with 12 floats and a 2-byte attribute — 50 bytes per triangle. GLB without compression stores about 36 bytes per triangle (indexed geometry). With Draco, the same triangles compress to 4–8 bytes each on average. A 50 MB STL routinely becomes a 3–5 MB Draco-compressed GLB with identical geometry.

What if I want to print the GLB later?

You can — convert it back to STL using the reverse process (Blender import GLB, export STL, or glTF-Transform). You'll lose any materials but the geometry round-trips losslessly. The slicer cares only about triangles.

Want to check the result? Drop the converted GLB into the Open3D viewer and confirm the geometry came over intact.