Guides ·
How to convert STEP to GLB for a website or AR
You have a product as a STEP file and want it turning on a web page, or standing on a table in augmented reality (AR). Browsers can't read STEP, but nearly every web 3D viewer reads GLB. This post explains what the conversion changes, how to keep the file small, and walks through it on a 16-part 3D printer extruder.

Why a web viewer wants GLB
A STEP file stores exact geometry: a hole is a cylinder with a radius, a fillet is a curved surface with a formula. To draw it, a program first turns those surfaces into small flat triangles, a mesh. That takes a CAD kernel, a large piece of software a web page would rather not load.
GLB is the binary form of glTF 2.0, a format from the Khronos Group made for showing 3D. It holds the mesh, ready for the graphics card, plus colours and part names, all in one file. Google's model-viewer, a common way to put 3D on a page, accepts only glTF and GLB.
What changes in the conversion
Curves become triangles. Each solid in the STEP file becomes its own mesh with its name, and each colour becomes a simple material.
Units and axes change too. The glTF specification says all distances are in metres and +Y is up. CAD files are usually in millimetres with Z up. A good converter fixes both, so the model stands upright at its real size instead of lying on its back 1,000 times too big.
Detail decides the file size
More triangles follow curves more closely and make a bigger file. The converter's Smoothness of curves menu shows each level's triangles and the expected file size. On the sample extruder: Coarse 8,294 triangles (≈ 268 KB), Normal 10,946 (≈ 335 KB) and Fine 24,994 (≈ 678 KB). The STEP file itself is 3,234,890 bytes.
On a screen, Normal already looks smooth; the extra triangles of Fine only help when the mesh will be printed. For a page that people open on phones, Coarse cuts the download by another fifth.
Hide what nobody will see
Screws inside a housing, a motor behind a cover, the back of a fan: hidden parts still cost triangles and download time. Untick them in the parts list before downloading; the GLB holds only what is visible.
On the extruder, unticking the 40 mm fan took Normal from 10,946 to 8,418 triangles and the downloaded GLB from 355,640 to 279,564 bytes, about a fifth less. The size line changed from 80.5 to 70.5 mm long, a quick check that the right part went.
Check the GLB before you publish
Open the result in a GLB viewer and compare it with the STEP. Our Normal file opened in the unmake GLB viewer with 16 parts, 10,946 triangles, the same colours and a volume of 104.88 cm³, as in the converter.
The size now reads 80.5 × 74 × 52 mm instead of 80.5 × 52 × 74 mm. Nothing moved: the height, 74 mm, is now the second number because Y is up. The part names came along too, straight from the CAD model: Nema-17-motor-40mm-final, fan-40x40mm-final and feature names such as Pad006.

Put it on a page or in AR
With model-viewer, one tag shows the file: <model-viewer src="MK8.glb" camera-controls ar></model-viewer>, after loading its script as its documentation describes. Visitors can turn and zoom the model.
The ar attribute adds an AR button on phones that support it. On Android it can open Scene Viewer; on an iPhone it opens Quick Look, for which model-viewer makes a USDZ file from your GLB on the fly. Because the GLB is in metres, the extruder appears at its real size, about 8 cm long.
Want a polished look, with brushed metal instead of flat grey? Open the GLB in Blender, which imports and exports glTF, change the materials and export again.
A worked example: the MK8 extruder
- Download MK8.step from the FreeCAD library (Electrical Parts, Hotend): a 3,234,890-byte STEP AP214 file of an MK8 extruder with a NEMA 17 motor, heatsink and fan, 16 solids.
- Drop it on the STEP to GLB converter. It opens with 16 parts, 80.5 × 52 × 74 mm and 104.88 cm³, in its own colours: grey motor, yellow bracket, black fan.
- Leave Smoothness of curves on Normal (10,946 triangles, ≈ 335 KB) and press Download GLB: MK8.glb, 355,640 bytes, about a ninth of the STEP.
- Drop MK8.glb on the GLB viewer: 80.5 × 74 × 52 mm, 16 parts, 10,946 triangles, colours and names kept.
- For a lighter phone version, untick the fan (8,418 triangles, 279,564 bytes) or choose Coarse (8,294 triangles, 286,600 bytes).
Common mistakes
- Exporting at Fine for a web page. On the extruder it doubles the file (706,540 bytes against 355,640) for curves nobody can see on a screen.
- Scaling the model a second time. The GLB is already in metres; dividing by 1,000 again in a game engine or page makes it 1,000 times too small.
- Leaving hidden parts in. Internal screws and covered parts still download; untick them first.
- Sending the GLB to a machine shop. It holds triangles, not exact surfaces; keep the STEP for manufacturing.
- Expecting realistic materials. The converter carries plain colours; add metal, plastic or texture finishes in Blender afterwards.
Questions
Will the AR view show the model at its real size?
Yes, when it first appears: the GLB is in metres, so model-viewer places the extruder at about 8 cm. Visitors can then pinch to resize it; add ar-scale="fixed" to the tag to keep it at 100%.
Will the GLB work in AR on an iPhone?
iPhones use Quick Look, which reads USDZ. If you show the GLB with model-viewer, it creates the USDZ for Quick Look when the AR button is pressed.
Does the GLB keep part names and colours?
In our test, yes: the extruder's 16 solids became 16 meshes and 16 coloured materials, all carrying their STEP names, and the scene is named MK8 after the file.
Can I convert the GLB back to STEP?
No. A GLB holds triangles only. If a supplier needs the part, send the STEP; the GLB is for showing it.
Sample file: MK8.step · CC BY 3.0, Daniel Stauffer (FreeCAD library)
Sources
- Khronos Group: glTF 2.0 Specification (metres, +Y up, GLB container)
- model-viewer documentation: src (glTF/GLB only), ar-modes, ios-src, ar-scale
- Blender Manual: glTF 2.0 import and export
- FreeCAD library: MK8 extruder (Electrical Parts, Hotend)