STL to GLB converter. Print files, web-ready.
Drop a binary or ASCII .stl file and get a GLB a web page or AR viewer can show, converted on your device with shared corners stored once and every normal checked.
Updated
No STL file at hand?
Getting models ready for a product page? We build the Three.js configurators they end up in, where the buyer sees the price and the order reaches production as a full spec: Three.js product configurator agency.
What an STL file is, and what it leaves out
STL is the triangle-only format 3D printers, slicers and CAD exports have shared since the 1980s; it stores the surface and nothing else, so a web page gets no names, colors or scale from it.
An STL file is a list of triangles. Each one is three corner points and a facet normal, written either as text (ASCII, starting with the word "solid") or as binary (an 80-byte header, a triangle count, then 50 bytes per triangle). Every CAD system, slicer and 3D scanner exports it, which is why a part is so often sent as one.
What it does not hold matters more online. STL has no unit, so the same numbers can mean millimeters or inches. The standard has no colors, materials, textures, names or parts: an assembly arrives as one surface. And every triangle stores its own copy of each corner, so a corner shared by six triangles is written six times.
GLB keeps what STL has and adds what a viewer needs: shared corners stored once and indexed, one binary file in meters, materials, named nodes and optional compression. A conversion cannot invent the colors or names an STL never had; it can only package the triangles well.
How to convert STL to GLB
Five steps take an STL to a GLB a viewer can show. This is the general method, and what this tool does at each step.
01Read the triangles
Tell binary from ASCII, then read every triangle: its three corners and its facet normal. An ASCII file may hold several solids one after another.
This tool: reads binary and ASCII STL with three.js's STL reader. A .stl that is neither is refused with a message, and several solids in one ASCII file become one mesh named after the file.
02Check the normals
glTF requires every normal to be one unit long, and many STL exporters write zero normals or leave them unnormalized. A converter has to repair those, or the lighting comes out wrong.
This tool: scales every facet normal to unit length, and replaces a zero or broken one with the triangle's own normal from its winding. Shading stays faceted, as in the STL: each triangle keeps its facet normal.
03Share the corners
An STL repeats a corner once for every triangle that touches it. Merging identical corners and indexing them stores each one once, which shrinks the file without changing its shape.
This tool: merges corners that match exactly, position and normal alike, then indexes the mesh. Corners where faces meet at an angle carry different normals, so they stay separate.
04Set the scale and the look
STL numbers have no unit and glTF reads meters, so a part modeled in millimeters has to be scaled by 0.001. Colors and materials have to be added afterwards, since the file never had them.
This tool: keeps the numbers as written, read as meters, and gives the mesh one neutral gray material. Scale and color it in your viewer, configurator or modeling tool.
05Optimize and write the GLB
Drop what nothing uses, reorder the mesh for the GPU and, where the viewer supports it, compress the geometry, then write one binary file.
This tool: removes what nothing uses, then applies Meshopt compression (Web preset) or writes plain glTF 2.0 geometry (Max compatibility).
STL and GLB, side by side
STL is built to hand a surface to a printer or a CAM program; GLB is built to put a model on a screen.
| Aspect | STL | GLB |
|---|---|---|
| Contents | Triangles and facet normals, nothing else | Meshes, materials, textures and a node tree |
| Encoding | Binary or ASCII text | Binary |
| Shared corners | Repeated in every triangle that uses them | Stored once, indexed |
| Units | None: whatever the export used | Always meters |
| Color | None in the standard; some binary exporters add one per triangle | PBR materials and textures |
| Parts and names | None: one surface | Named meshes and nodes |
| Compression | None | Optional Meshopt or Draco extensions |
| Made for | 3D printing, CNC and CAD exchange | Showing products on the web and in AR |
Before you export the STL
Three export settings decide whether the GLB comes out the right size and smooth enough.
Know the unit
This tool keeps the numbers as written and glTF reads them as meters. An STL exported in millimeters, as most CAD exports are, arrives a thousand times too big: export in meters, or scale by 0.001 from millimeters.
Pick the resolution in your CAD
CAD writes an STL at a chosen deviation or angle. A finer setting gives smoother curves and a heavier file; for a product page, the coarsest one that still looks round at viewing distance is right. This tool does not re-tessellate or simplify.
Export binary
A binary STL is a fraction of the size of an ASCII one with the same triangles, and both convert the same way here. Choose binary unless a program down the line needs text.
Questions about the STL to GLB converter.
What it does, what it leaves to you, and what it costs.
More free tools
GLB optimizer
Compress GLB, glTF, STL and OBJ models in the browser and see what makes them heavy.
STEP to GLB converter
Turn a CAD export (.step, .stp) into a web-ready GLB.
OBJ to GLB converter
Pack an OBJ mesh into a single, compressed GLB.
FBX to GLB converter
Convert an FBX export to GLB for web viewers and AR.
GLB to USDZ converter
Convert a GLB to USDZ for AR Quick Look on iPhone and iPad.
DWG viewer
Open an AutoCAD DWG in the browser: zoom, layers, measure.
DXF viewer
View a DXF drawing online, toggle its layers and save a PNG.
3D viewer with embed code
Upload a model, get a share link and an embed for your site.
AR QR code generator
A QR code that opens your product in AR on any phone.
Seamless texture generator
Make any photo a texture that tiles without visible seams.
PBR map generator
Normal, height, roughness, metalness and AO maps from one texture.
Product variant calculator
Count every combination your options make, and what that costs.
Configurator ROI calculator
Estimate what a configurator saves and earns, from your numbers.
Need your whole catalog web-ready?
SBFS turns CAD and scan data into fast 3D product configurators, with parts split and named, materials made for your finishes and files tuned to load on a phone. See configurator demos by industry.
Book a 20-min call