— Free tool · no sign-up

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.

01— The format

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.

02— Method

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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).

03— Compared

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.

STL and GLB, side by side
AspectSTLGLB
ContentsTriangles and facet normals, nothing elseMeshes, materials, textures and a node tree
EncodingBinary or ASCII textBinary
Shared cornersRepeated in every triangle that uses themStored once, indexed
UnitsNone: whatever the export usedAlways meters
ColorNone in the standard; some binary exporters add one per trianglePBR materials and textures
Parts and namesNone: one surfaceNamed meshes and nodes
CompressionNoneOptional Meshopt or Draco extensions
Made for3D printing, CNC and CAD exchangeShowing products on the web and in AR
04— Checklist

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.

05— FAQ

Questions about the STL to GLB converter.

What it does, what it leaves to you, and what it costs.

No, because a standard STL has none to keep. Some binary exporters store a color per triangle in two spare bytes; this tool does not read them. The GLB gets one neutral gray material, which you can recolor in your viewer or configurator.

Both. The tool checks which one the file is before reading it: a binary STL is an 80-byte header, a triangle count and exactly 50 bytes per triangle; an ASCII one starts with the word "solid". A .stl that is neither is refused with a message rather than converted into something wrong.

No. The STL never leaves your browser: it is converted in a Web Worker on your device, and nothing is sent to SBFS or anyone else. Closing the tab discards it.

STL stores no unit. The numbers are kept as written and glTF reads them as meters, so a part exported in millimeters arrives a thousand times too big, and one exported in inches about 39 times too big. Export in meters, or scale on export.

Usually, against an ASCII STL: text becomes binary and each shared corner is stored once. A binary STL is already compact, so the gain is smaller and a small file can grow: the sample table, a 3.0 KB binary STL, comes out larger with Max compatibility, the default. With the Web preset, which also compresses the geometry with Meshopt, it comes out smaller. The table under your result shows both sizes.

No: an STL has no parts to keep. The whole file becomes one mesh named after the file, even when an ASCII STL holds several named solids. If you need separate, named parts in the GLB, export STEP or OBJ from your CAD and use that converter instead.

STL up to 100 MB, binary or ASCII, and STEP, OBJ, FBX, glTF and GLB through the same converter. It does not read 3MF, AMF or PLY: export STL or OBJ from the program that made them.

Yes. No sign-up, no email, no watermark and no limit on how many STL files you convert. Each file can be up to 100 MB, because it is read whole in your browser's memory.

More free tools

All free tools

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