STL to GLB Converter

Convert STL files to GLB right in your browser, in one step. glTF files are always in metres with Y up, while most STL files from 3D printing and CAD are in millimetres with Z up and have no unit inside. The converter asks what one STL unit is (millimetres by default), scales the model to metres and turns it to Y-up, so a 60 mm part shows as 6 cm in a web viewer, AR view or game engine instead of 60 metres. Matching corners are joined so round surfaces shade smoothly, with edges sharper than 30° kept sharp, or you can write flat facets. Each STL becomes its own mesh with a colour you pick, and you can stand the model on the floor, centred, for AR and product viewers. Every GLB is read back before you download it, and the 3D view shows the file as it reads back. Nothing is uploaded.

100% private — everything runs in your browser. Everything runs in your browser; your STL files are never uploaded.

100% private — runs in your browser
Drop STL files here or click to chooseBinary or ASCII STL. Add several files at once and each becomes its own part.

Loading the 3D engine…

Parts

STL details

The STL

The GLB

glTF files are always in metres with Y up, so the STL is scaled and turned to match.

Shape and colour

Runs in your browser: your STL files are read on your device and never uploaded. The 3D engine (three.js) loads from the jsDelivr CDN. You may use what you make here, including commercially, with no credit needed. The rights in your own models stay as they were.

How to convert an STL to GLB

  1. Drop one or more STL files on the box, or click Try a sample.
  2. Check what one STL unit is (millimetres for most 3D printing files) and which way is up.
  3. Choose the shading (smooth or flat), a colour and where the model stands.
  4. Read the check line, then click Download GLB.

What you can use it for

  • Show a 3D print model on a web page, in AR or in a product viewer
  • Get a millimetre STL into a glTF scene at its real size
  • Turn a Z-up print file into a Y-up model that stands upright
  • Put several STL parts into one GLB, each with its own colour
  • Give a faceted STL smooth shading without rounding its sharp edges
  • Make a small, single-file model to share instead of a large ASCII STL

What carries over from STL to GLB

In the STLIn the GLB from this converter
TrianglesThe same triangles, as one glTF mesh and node per STL file (zero-size triangles are left out and counted)
Numbers with no unitScaled to metres, as glTF requires (1 STL unit = 1 mm by default)
Z-up (3D printing, CAD)Turned to Y-up (glTF is always Y-up; a proper turn, so faces keep pointing outwards)
Facet normalsNormals per corner: smooth with sharp edges kept, or flat
Solid name (ASCII STL) or file nameThe mesh and node name
ColourSTL has no standard colour: one glTF material per part (base colour you pick, roughness 0.6, metallic 0)
Textures, UVs, animationNone in an STL, so none in the GLB

The glTF 2.0 specification sets metres as the unit for all distances and +Y as up, so a GLB has no unit setting to change: the numbers themselves must be in metres.

Units: what one STL unit becomes

1 unit in the STL isThe sample bracket (60 × 40 × 46 units) in the GLBScale
1 millimetre (default)0.06 × 0.046 × 0.04 m÷ 1,000
1 centimetre0.6 × 0.46 × 0.4 m÷ 100
1 metre60 × 46 × 40 m× 1
1 inch1.524 × 1.1684 × 1.016 m× 0.0254

Sizes are X × Y × Z after the turn to Y-up, so the 46-unit height is the second number.

What our test files give

Test fileWhat it checksTrianglesSTL sizeGLB size (m, Y-up)STL bytesGLB bytesRead back the same
bracket.stlBracket with two holes (binary, watertight)67260 × 40 × 46 mm0.06 × 0.046 × 0.04 m33,68421,440Yes
cube-ascii.stl20 mm cube (ASCII, solid name test_cube)1220 × 20 × 20 mm0.02 × 0.02 × 0.02 m1,3071,732Yes
cylinder.stlCylinder with 48 sides (binary; smooth sides, flat caps)18820 × 20 × 30 mm0.02 × 0.03 × 0.02 m9,4846,868Yes
padded.stl20 mm cube, binary with 7 stray bytes at the end1220 × 20 × 20 mm0.02 × 0.02 × 0.02 m6911,724Yes

Computed by the converter’s own writer from our own test files. Every GLB was read back by the three.js glTF reader, by our own GLB reader and by a third, independent glTF library with the same triangle count, size and colours, and every triangle’s normals point to the same side as its winding.

Smooth or flat normals

Cylinder with 48 sidesVertices in the GLBHow it shades
Smooth, edges sharper than 30° kept sharp192Round sides, flat caps, a sharp rim
Flat288Every triangle shows, as in a slicer

An STL stores each triangle with its own three corners, so a smooth surface needs matching corners joined first. The converter joins corners at exactly the same point by default, or within 0.01 mm or 0.1 mm for files with small gaps.

Next steps

Check a print model in the STL viewer, or make an STL from a picture with Image to STL. Going the other way? GLB to STL makes a print file from a GLB, and STL to 3MF packs STL parts for a slicer.

Sources

Sources: Khronos glTF 2.0 Specification (“The units for all linear distances are meters”; +Y is up); Library of Congress, STL File Format, Binary (80-byte header, triangle count, 50 bytes per facet); Library of Congress, STL (STereoLithography) File Format Family (“no standard support within STL for colors or textures”); three.js 0.186.1 GLTFLoader source.

More free tools

Working with 3D models?

View, convert and make 3D files with free tools that run privately in your browser, with no sign-up and no watermark.

See all free tools →

Frequently asked questions

Is this STL to GLB converter free?

Yes. There is no sign-up, no watermark and no limit on how many files you convert. The conversion runs in your browser, so your STL files never leave your device.

Why does my model come out huge (or tiny) in a GLB viewer?

glTF counts in metres, and an STL has no unit. If the numbers are copied across as they are, a 60 mm part becomes 60 metres. This converter asks what one STL unit is (millimetres by default) and scales the model, so the 60 mm part is 0.06 m in the GLB. If your STL was made in centimetres, metres or inches, choose that instead.

Why is my model lying on its side?

STL files from 3D printing and CAD are usually Z-up, and glTF is always Y-up. The converter turns the model from Z-up to Y-up by default. If your STL was made Y-up, choose Y-up under Up direction in the STL.

Smooth or flat normals: which should I choose?

Smooth joins the corners that match and shades round surfaces smoothly, while any edge sharper than the angle you choose (30° by default) stays sharp. Flat shades every triangle on its own, the way a slicer shows an STL. Flat files have more vertices, because each corner is written once per flat face.

Does the GLB keep colours or textures?

STL files have no standard colour or texture data, so each part gets one glTF material (base colour you pick, roughness 0.6, not metallic). There are no texture coordinates in an STL, so no textures are written.

Can I put several STL files into one GLB?

Yes. Add them together: each STL becomes its own mesh and node, named after the solid name in an ASCII STL or after the file name, with its own material. The parts keep their positions, and Centred, standing on the floor moves them together.

Is the GLB smaller than the STL?

Usually. A binary STL stores every corner of every triangle (36 bytes of positions per triangle); the GLB stores each joined corner once with an index list. In our tests a binary STL of 672 triangles became a GLB of about two thirds of its size, and ASCII STL files shrink much more.

How do I know the GLB is right?

Before the download is offered, the page reads the new GLB back with the three.js glTF reader and with our own GLB reader, and compares the triangle count, the size in metres, the colours and the normals with what was written. The 3D view shows that read-back model. If anything differs, the file is not offered. Our test files were also read by a third, independent glTF library.

Is my STL uploaded?

No. The STL is read and turned into GLB by JavaScript in your browser, so it never leaves your device. Only the 3D engine itself (three.js) is loaded from a public CDN.