What Does Compressing a GLB File Actually Do?
Compressing a GLB means re-encoding its textures and geometry so the same model takes fewer bytes. Most of the saving comes from the textures: in eight Khronos sample models we measured, the images were the bulk of every file that had textures at all. This GLB compressor shrinks those images, cleans up the geometry and writes a new .glb, all in your browser.
A smaller GLB loads faster on a product page, fits under upload limits on 3D platforms and marketplaces, and uses less memory on phones. Nothing about the model's shape, materials or animations has to change for that to happen.
Where the bytes in a GLB go
A GLB holds three kinds of data: textures (the images wrapped around the model), geometry (vertex positions, normals and triangle lists) and animation. Textures are stored as complete image files inside the GLB, often 2048 × 2048 PNGs, which is why a model with only a few hundred triangles can still weigh 8 MB. Open your file in the GLB viewer to see its own breakdown before you compress it.
Lossless clean-up vs lossy compression
Some steps change nothing you can see: removing duplicate data, dropping materials and textures nobody uses, and merging vertices that are exactly the same. The bigger savings are lossy: smaller textures, textures re-encoded as WebP or JPEG, and vertex positions stored with fewer bits. Lossy does not mean visibly worse, but it is the part worth checking, which is what the Before / After switch is for.
How to Compress a GLB File in 3 Steps
Drop your .glb or .gltf
Click Choose 3D file or drop a .glb onto the stage. For a .gltf, select it together with its .bin and texture files, or drop the whole folder; the result is always a single .glb. The panel lists every texture with its size, format and bytes.
Pick Web, Compatible or Custom
Web makes the smallest file for browsers, Compatible keeps the file free of new extensions, and Custom lets you choose the texture size, format and quality. The texture table shows what each texture will become before you press anything.
Compare, then download
Press Compress GLB. When it finishes, the stage switches to After with the camera where you left it; press B or use the Before / After switch to compare, then download the compressed .glb.
Choose a .glb, or a .gltf with its files.
Pick the preset for where the model goes next.
Compare Before and After, then download.
Textures: Where Most of the Bytes Go
Every texture in a GLB is a full image file, and the GPU unpacks it to raw pixels once the model is shown: a 2048 × 2048 texture takes about 16 MB of graphics memory before mipmaps, however small its PNG was. So when you compress a GLB, the texture settings decide both how big the download is and how heavy the model is to display.
Resizing textures: 4096, 2048, 1024 or 512?
Halving a texture's width and height leaves a quarter of the pixels. On a web page, where a model usually fills part of the screen, 1024 px is enough for most products; 2048 px is worth keeping for hero shots and close-ups, and 512 px suits small props. This GLB compressor only ever scales textures down, never up, and keeps their proportions. To resize a single texture by hand, use the image resizer.
WebP vs PNG vs JPEG inside a GLB
PNG and JPEG are part of glTF itself, so every app that opens GLB files reads them. WebP usually makes the smallest files, but a GLB that uses it declares the EXT_texture_webp extension, and the app opening it has to support that. JPEG cannot store transparency, so this tool keeps a texture as PNG whenever its pixels are not fully opaque. For the trade-offs between the formats in general, see PNG to WebP.
Normal maps need gentler compression
A normal map stores surface directions in its colours, and the blocky artefacts that lossy compression leaves show up as lighting errors rather than colour noise. Both presets give normal maps a higher quality floor (0.9). WebP and JPEG also store colour at reduced resolution, which costs some precision in normal maps and in textures that pack roughness, metalness and occlusion into separate channels. If that precision matters, choose Custom and keep the original format.
Textures with transparency
Leaves, decals and glass often rely on an alpha channel. WebP keeps it; JPEG cannot, so a transparent texture headed for JPEG is saved as PNG instead. In our measurements, Lantern and ToyCar each kept one or two textures as PNG for this reason.
Geometry Compression: meshopt, Quantization and Draco
Geometry is usually the smaller part of a GLB, but in dense meshes, scans and animated characters it can be most of the file. The Web preset compresses it with meshopt; the other presets leave the encoding as it is and only clean it up.
What meshopt compression does
meshopt first reorders vertices and triangles so neighbouring data sits together, then stores positions, normals and texture coordinates as small integers instead of 32-bit floats (quantization, declared as KHR_mesh_quantization), and finally packs the result with EXT_meshopt_compression. It decodes very quickly in the browser, and three.js, model-viewer and Babylon.js all read it.
Welding and removing duplicates
Exporters often write the same vertex several times, duplicate whole accessors or leave behind materials and textures that nothing uses. Merging identical vertices and pruning unused data is lossless and runs in every preset; on its own it saved 32% on the small Fox model.
Why Draco models keep their geometry
Draco is another geometry compression extension, often tighter than meshopt. Writing Draco back requires its encoder, and decoding it and storing the geometry without Draco made a test mesh 4 to 13 times larger. So when a GLB already uses Draco, this tool re-encodes only its textures and leaves every other byte, the Draco geometry included, exactly as it was. The result card says when that happened.
Which Preset Should You Choose?
Before you compress your GLB, think about where the model goes next: the right preset depends on it, because the smallest settings rely on glTF extensions that not every app reads. The note under the presets lists the extensions the current settings will add.
For web viewers: three.js, model-viewer, Babylon.js
Choose Web. It scales textures to at most 1024 px, saves them as WebP and compresses geometry with meshopt. Browser-based viewers and engines built on three.js or Babylon.js read all three extensions it uses, and the files are the smallest this tool makes: 48% to 98.8% smaller on the Khronos samples.
For Blender, Unity and desktop viewers
Choose Compatible. It keeps textures up to 2048 px, writes opaque ones as JPEG and transparent ones as PNG, and adds no extensions at all. Desktop tools and game-engine importers support WebP and meshopt unevenly, so a file without them is the safe choice when you don't control the software on the other end.
When to use Custom
Use Custom to keep textures at their original size, keep their original format for precise data maps, raise or lower the quality, or turn meshopt off. The texture table updates as you change each setting, so you can see what will happen before compressing.
Real Results on Khronos Sample Models
To see how much you can expect, we used this page to compress GLB files from the Khronos glTF Sample Assets collection: eight originals, in Chrome on a desktop computer. With the Web preset the eight files came out 86% smaller on average and 96% smaller at the median; the largest saving was Avocado, from 7.73 MB to 0.09 MB, because its three 2048 × 2048 PNG textures made up almost the whole file. Each model took about a second.
Compatible saves less, since it keeps textures at 2048 px and avoids WebP, but it still cut four of the eight models by 83% to 93%. The models that saved least have the most geometry (ToyCar has about 109,000 triangles) or textures with transparency, which stay PNG.
Measured: Original vs Web vs Compatible
| Model | Original | Web preset | Compatible preset |
|---|---|---|---|
| Avocado | 7.73 MB | 0.09 MB (−98.8%) | 0.57 MB (−92.6%) |
| WaterBottle | 8.55 MB | 0.12 MB (−98.6%) | 0.88 MB (−89.7%) |
| BoomBox | 10.12 MB | 0.22 MB (−97.8%) | 1.12 MB (−89.0%) |
| Corset | 12.87 MB | 0.51 MB (−96.0%) | 2.15 MB (−83.3%) |
| Lantern | 9.12 MB | 0.36 MB (−96.0%) | 5.49 MB (−39.8%) |
| SheenChair | 3.93 MB | 0.97 MB (−75.3%) | 1.72 MB (−56.3%) |
| ToyCar | 5.17 MB | 1.30 MB (−74.9%) | 3.92 MB (−24.2%) |
| Fox | 0.16 MB | 0.08 MB (−48.0%) | 0.11 MB (−31.9%) |
Will Compression Break My Model?
Compressing a GLB changes how the data is stored, not what the model is. Meshes, materials, node names, animations and other glTF features carry over; the things to check are the extensions the new file requires and how the textures look up close.
Extensions the output may require
The Web preset can add EXT_texture_webp, EXT_meshopt_compression and KHR_mesh_quantization, marked as required so an app that cannot read them reports it instead of showing a broken model. Compatible adds none. A GLB that already used other extensions keeps them; if this tool doesn't recognise one, it switches to re-encoding textures only, so nothing it doesn't understand is rewritten.
Animations, skins and morph targets
Animations, skinned characters and morph targets come through compression. meshopt also compresses animation keyframes, and quantization keeps enough precision for normal-sized models; for very large scenes or engineering models measured in millimetres, compare the result with wireframe on, or turn meshopt off in Custom.
KTX2 textures are left as they are
Textures already stored as KTX2 (KHR_texture_basisu) are compressed for the GPU and stay small in memory. This tool keeps them unchanged rather than turning them back into ordinary images.
Why Your GLB Is Still Large After Compression
If you compress a GLB and the saving is small, the panel usually shows why. The file may already be compressed: textures that are already small WebP or JPEG images rarely shrink further, and the tool keeps an original texture whenever re-encoding it doesn't make it smaller. If the result would not be smaller at all, there is nothing to download, by design.
Dense scans and photogrammetry
Scanned objects and photogrammetry often carry hundreds of thousands or millions of triangles, and then geometry, not textures, fills the file. meshopt helps, but the real fix is fewer triangles: decimate the mesh in a 3D editor, such as Blender's Decimate modifier, then compress the result here.
Compressing .gltf with external files
A .gltf keeps its geometry and textures in separate files. Select them all, or drop the folder, and the tool packs everything into one compressed .glb. A .gltf that uses Draco has to be exported as .glb first, because Draco data is only kept unchanged inside a GLB.
The command-line equivalent
This page runs the open-source glTF Transform library in your browser. If you want to compress many files in a build pipeline, its command-line tool does a similar job, for example gltf-transform optimize input.glb output.glb --compress meshopt --texture-compress webp --texture-size 1024.
Your Model Never Leaves Your Device
Many online GLB compressors upload the file to a server, and some limit how many files you can compress each week. Here the whole job runs in a background worker inside your browser tab: the model is read from your disk, compressed in memory and saved straight back as a download. That matters for unreleased products, client work and anything under NDA. Close the tab and nothing remains. For other tools that work the same way, see all our free tools.