# GLB Inspector

> Drop a GLB or glTF and see triangles, textures, GPU memory and compression, checked against a web budget, with the fixes.

- Page: https://codethatmoves.com/tools/webgl/glb-inspector/
- Site: Code That Moves
- Category: WebGL and 3D
- Free, runs in the browser, nothing is uploaded (files you drop in stay on your device)
- Last checked: 2026-11-03

## What it does

- Reads GLB, VRM and glTF 2.0 in the browser without decoding, so large files open at once
- A .gltf with its .bin and texture files (select them together), or with embedded data: URIs
- Triangles drawn, vertices, draw calls, GPU instancing, skins and bones, cameras
- Meshes sorted heaviest first, animations with their length, textures with format, GPU memory and the materials that use them
- Detects Draco, Meshopt, KTX2 and WebP, counts only the image a viewer loads, and shows where the weight sits
- Three web budgets in the URL, concrete fixes, a report to copy, download or paste into an AI assistant

## How to use it

1. Pick the budget nearest your use: a product viewer, a hero scene or a mobile-first page.
2. Drop the .glb or .gltf file, or try one of the two samples. For a .gltf with separate files, select the .gltf, the .bin and the textures together.
3. Read the checks from the top. Each failed one has the change that fixes it. The mesh table shows which mesh to simplify first. Copy or download the report when you are done.

## What it checks and why

A glTF file can be small on disk and still hurt a page. A 2 MB JPEG texture becomes tens of megabytes on the GPU, because the GPU needs raw pixels, and a model with a few hundred thousand triangles can stall a phone. The inspector shows both numbers: what the file weighs and what the device has to hold.

It reads the GLB container, the JSON that describes the scene and the headers of the images. The geometry is not decoded, so the triangle count comes from the accessor counts. Meshes used by several nodes, or instanced with EXT_mesh_gpu_instancing, are counted once for what is stored and once for each use for what is drawn.

Files packed by gltfpack are read as they are: Meshopt views count their compressed size, and the uncompressed fallback buffer is ignored. When a texture has a KTX2 or WebP image and a PNG fallback, only the image a viewer actually loads counts towards GPU memory.

The budgets are working defaults for a web page, not a standard. They give a verdict you can argue with: change the budget when your page has more room, or less.

## Reference data

| Budget | File size | Triangles | Texture side | Texture GPU memory | Draw calls | For |
| --- | --- | --- | --- | --- | --- | --- |
| Product viewer | 5.00 MB | 100,000 | 2048px | 128.00 MB | 50 | One object on a product page, shown on phones and laptops. |
| Hero scene | 15.00 MB | 500,000 | 2048px | 256.00 MB | 150 | A full-width 3D scene that loads on desktop first. |
| Mobile first | 3.00 MB | 50,000 | 1024px | 64.00 MB | 30 | Runs smoothly on a mid-range phone on mobile data. |

## Specs and sources

- [Khronos: glTF 2.0 specification](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html)
- [KHR_draco_mesh_compression](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_draco_mesh_compression)
- [EXT_meshopt_compression](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_meshopt_compression)
- [KHR_texture_basisu (KTX2)](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_texture_basisu)
- [glTF-Transform](https://gltf-transform.dev/)
- [gltfpack (meshoptimizer)](https://meshoptimizer.org/gltf/)
- [Khronos glTF Validator](https://github.khronos.org/glTF-Validator/)

## Limits

- It is an inspector, not a viewer: it does not draw the model.
- Triangle counts come from the file's own accessor counts. A Draco or Meshopt file is not decoded, so a count can differ from what a viewer reports.
- Texture GPU memory is an estimate with a full mip chain: 4 bytes a pixel for PNG, JPEG and WebP; for KTX2, about half a byte a pixel for ETC1S and 1 byte for UASTC.
- Only glTF 2.0 is read. A .gltf whose .bin or textures were not dropped with it shows what the JSON states, and the file-size check counts the declared buffer sizes.
- It is not a full spec validator. For every rule of the spec, use the Khronos glTF Validator.

## Questions

### How many triangles is too many for the web?

It depends on the device and the scene. As a starting point, 50 000 for a mobile-first page, 100 000 for one product, 500 000 for a desktop hero scene. The budget selector uses those numbers, and you can judge the result against your own target.

### Why is my texture memory so much bigger than the file size?

A PNG or JPEG is compressed on disk but is expanded to raw pixels when the GPU uses it. A 2048 by 2048 texture is about 22 MB with its mip chain, however small the file is. KTX2 textures stay compressed on the GPU.

### What is the difference between Draco and Meshopt?

Both compress geometry. Draco usually gives the smaller file; Meshopt decodes faster and also compresses animation. Both are glTF extensions that three.js and Babylon.js can load.

### How do I make a GLB smaller?

Run it through glTF-Transform or gltfpack: compress geometry with Meshopt or Draco, convert textures to KTX2 or WebP, resize them to what the screen shows, and merge meshes that share a material.

### How do I check the polygon count of a GLB?

Drop it here. Triangles drawn is the number the GPU renders for the default scene; the mesh table splits it per mesh, heaviest first, so you know which one to simplify.

### Why is the triangle count different in Blender?

Blender counts faces, and a quad is one face but two triangles. A mesh used by several objects, or drawn with GPU instancing, is also drawn several times while it is stored once. This tool shows both the stored and the drawn count.

### Can I inspect a .gltf with a separate .bin and textures?

Yes. Select or drop the .gltf together with its .bin and image files. They are matched by file name. Without them, the tool reports which files are missing and judges the size from the JSON.

### What is KHR_mesh_quantization?

It stores positions, normals and UVs as 8- or 16-bit integers instead of 32-bit floats, which makes geometry smaller. gltfpack uses it by default. The node scale turns the integer positions back into metres, so mesh bounds here are in quantized units.
