Skip to main content

Convert STL to GLB — Show Your 3D Prints on the Web

You designed something, printed it, and now you want to show it off on your website. The problem: STL files are for printers, not browsers. No web viewer natively loads STL. No e-commerce platform accepts STL for product previews. And even if you hack something together, STL's flat face normals make everything look like a low-poly rock from 2003.

Last updated Mar 2026

1
Upload
2
Convert
3
Download

Drag STL file here, or click to upload

Supports .stl files up to 150MB

Usually under 3 seconds — depends on file size.

What You Should Know

From Flat Shading to Smooth: What the Converter Does

STL stores geometry as a list of triangles, each with a single face normal (perpendicular to the triangle surface). This produces flat shading — every triangle is a distinct flat plane, and you can see hard edges everywhere. Fine for slicer software, terrible for web display. The converter recalculates normals as per-vertex smooth normals: vertices shared between faces get averaged normals, creating the illusion of smooth curved surfaces. This is the same technique games and web viewers use to make low-poly models look acceptable. The threshold angle for smooth vs. hard edges is set at 80° — edges sharper than that (like the corner of a box) stay crisp, while gently curved surfaces (like a vase) look smooth. The output includes a default PBR material: base color #808080, metallic 0.0, roughness 0.5. This is a neutral starting point that responds well to environment lighting. You can change it later in gltf.report, Blender, or programmatically in Three.js.

File Size: STL vs GLB vs Compressed GLB

For Binary STL input, the GLB will be 20-40% larger due to scene graph metadata and material definitions. A 5 MB Binary STL → ~6.5 MB GLB. For ASCII STL input, the GLB will actually be smaller because binary geometry encoding beats text — a 15 MB ASCII STL → ~7 MB GLB. If the output is too large for web delivery (aim for <5 MB), two post-processing options: (1) Draco compression via gltf-transform — compresses geometry 60-80% with minimal visual loss. A 6.5 MB GLB → ~2 MB. (2) Mesh simplification — reduce triangle count in Blender (Decimate modifier) before converting. A 500K-triangle STL simplified to 100K triangles cuts file size by ~80% with barely visible difference at web resolution. For most web use cases, 50K-100K triangles is the sweet spot.

STL vs GLB: Quick Comparison
FeatureSTLGLB
GeometryTrianglesTriangles
NormalsFace normals (flat)Vertex normals (smooth)
MaterialsNot supportedPBR materials
AnimationsNot supportedSupported
Primary Use3D printingWeb3D, AR/VR
Web DisplayRequires preprocessingNative support

Use STL for 3D printing. Use GLB for web display, AR previews, and interactive 3D viewers.

When to Convert STL to GLB

Maker Portfolio with Interactive Preview

Showcase your 3D printing work with interactive models instead of static photos. Convert your STLs to GLB, embed with model-viewer (two lines of HTML, no JavaScript), and visitors can rotate, zoom, and inspect your work from every angle. For a portfolio, set shadow-intensity="1" and environment-image to a studio HDRI — the models look like professional product renders without any rendering software.

3D Print Sales with AR Try-On

Selling custom prints on your own site or Gumroad? Convert your STL to GLB and embed with model-viewer's AR mode. Mobile customers can place your product in their room at real-world scale before buying. This works on Android (Scene Viewer, native GLB) and iOS (Quick Look, needs USDZ fallback). Sellers with 3D previews report higher conversion rates because buyers can verify size and proportions.

Educational 3D Models

Anatomy models, engineering parts, architectural maquettes — many educational STL files are freely available on Thingiverse and Printables. Convert to GLB and embed on your course website or LMS. Students can explore the model interactively on any device (phone, tablet, laptop) without installing software. For anatomy models, edit the GLB in gltf.report to assign different colors to different organs or structures.

Sketchfab Upload

Sketchfab accepts GLB uploads directly and gives you a free hosted 3D viewer with embed codes, annotations, and sharing. Convert your STL here, upload to Sketchfab, add material colors and lighting in their editor, then embed the viewer on your blog, portfolio, or marketplace listing. Sketchfab's free tier allows up to 10 model uploads with up to 50 MB per file.

Frequently Asked Questions
Two options depending on how much control you need. Easiest: Google's model-viewer web component — one script tag and one HTML element, no JavaScript. Add <model-viewer src="model.glb" auto-rotate camera-controls shadow-intensity="1"> and you get 360-degree rotation, zoom, and built-in AR preview on mobile. More control: Three.js with GLTFLoader — you manage the scene, camera, lighting, and post-processing yourself. For a portfolio or Etsy listing, model-viewer is the right choice (5 minutes setup). For a custom product configurator, Three.js.
GLB files are typically 20-40% larger than Binary STL for the same geometry. The extra size comes from glTF's scene graph metadata, material definitions (even the default gray PBR material adds data), and JSON structure overhead. A 5 MB Binary STL becomes roughly 6-7 MB GLB. For ASCII STL, the GLB will actually be smaller — a 15 MB ASCII STL might become 7 MB GLB because binary encoding is more compact than text. If the GLB is too large for web delivery, apply Draco compression with gltf-transform: npx @gltf-transform/cli optimize model.glb compressed.glb --compress draco. This typically cuts geometry size by 60-80%, bringing a 7 MB GLB down to 2-3 MB.
Three things to fix, in order of impact: (1) Lighting — the single biggest difference. Add an environment map (HDRI) to your Three.js scene or use model-viewer's built-in environment-image attribute. Without proper lighting, PBR materials look dead. (2) Material — the converter adds a neutral gray PBR material (roughness 0.5, metallic 0.0). For filament-colored prints, change baseColorFactor to match your filament color. In Three.js: mesh.material.color.set("#2196F3") for blue PLA. In model-viewer, you'd need to edit the GLB first — use gltf.report (free, browser-based) to change the material color visually. (3) Shadow — add shadow-intensity="1" in model-viewer or a ground plane with shadow in Three.js. Shadows ground the model and make it look physical instead of floating.
Yes, and it's easier than you'd think. model-viewer supports AR natively on both platforms: Android uses Scene Viewer (opens a fullscreen AR view, native GLB support), iOS uses Quick Look (requires a USDZ file as fallback). For Android-only AR, just add the ar attribute to your model-viewer tag. For iOS too, you need a USDZ version — convert with Apple's Reality Converter (free Mac app) or the usdzconvert command-line tool. One gotcha: scale matters. If your original STL was in millimeters, the AR preview will show the model at correct real-world size. If it was in meters (some CAD tools), the AR model will be 1000x too large.
Not directly in Etsy (they don't support embedded 3D viewers in listings yet), but there are two workarounds: (1) Host the GLB on your own domain and link to it from your listing description — customers click the link and see the interactive 3D preview in their browser. (2) Use a service like Sketchfab (free tier allows 3D embeds with a link) — upload the GLB, get a shareable URL. For your own website/portfolio, you have full control: embed with model-viewer, add AR preview, and link from your Etsy shop. Sellers who add 3D previews to their product pages consistently report higher engagement — buyers spend more time and feel more confident about the purchase.
Each conversion handles one STL file. If you have a multi-part print model (e.g., 8 separate STL files for an articulated figure), you have two options: (1) Convert each STL separately, then combine the GLBs using gltf-transform: npx @gltf-transform/cli merge part1.glb part2.glb ... combined.glb. (2) Import all STLs into Blender, position them in the scene, and export as a single GLB. Option 2 is better if you want to add materials or adjust part positions. For a simple "show all parts together" preview, option 1 works.

Related Converters

What's Next? Try These Tools

Learn More

More STL Conversions

Step-by-Step Guides