Skip to content
STLBench

Free online OBJ to GLB converter

OBJ to GLB — from several files to exactly one

Drop an .obj and download a .glb, repackaged in the browser with nothing sent to a server. The point of the exercise is packaging: an OBJ is a text file that leans on a .mtl, which leans on image files, all of which have to travel together and usually do not. A GLB is one binary file that a web page loads directly. So hand over the whole set — the files together, the folder, or a zip — and this is the conversion that makes them one thing. The scale changes on the way, since OBJ is effectively millimetres and glTF is metres by specification, so coordinates are multiplied by 0.001 and the factor is stated rather than hidden.

  • 100% free
  • No signup
  • One binary file
  • Metres out
  • Nothing uploaded
Convert to

Drag a file anywhere on this page to open it. F fits the view, W switches shading, G the grid, R spins it.

How to convert OBJ to GLB

Three steps, and one number that looks wrong until it is explained.

  1. Drop the .obj

    The geometry, the named groups and the UV coordinates are read. Drop the .mtl and the texture images with it — select them together, or drag the folder, or drag a zip — and those are read too, which is the whole point of packing a GLB.

  2. Watch the model shrink by a thousand

    OBJ states no unit and is millimetres by habit; glTF states metres by specification. So a 42 mm part is written as 0.042 and that is correct. Every glTF viewer expects it. The factor appears in the panel so the small numbers can be verified rather than doubted.

  3. Download the .glb

    One binary file, self-contained, ready to hand to model-viewer, three.js, Babylon or a marketplace upload form. No companion files, nothing to keep together.

Technical specifications

Reads.obj — text, with named groups and UV coordinates
Writes.glb — binary glTF, self-contained
UnitMillimetres in, metres out — factor ×0.001, printed in the panel
KeptGeometry, UV coordinates, group names as node names
Sibling filesThe .mtl and its textures, packed in when you drop them alongside
Loads inmodel-viewer, three.js, Babylon, Godot, and every browser 3D library
File sizeNo fixed limit — past 100 MB you are told what it will cost this tab, then it opens

Frequently asked questions

Why GLB rather than OBJ on a web page?

Because OBJ is a text format from 1992 that has to be parsed line by line, splits its materials into a second file, and has no notion of a scene. GLB stores vertex data in the layout a GPU consumes directly, packs textures and materials inside the same file, and is what every browser 3D library loads first. On a page, the difference is a model that appears immediately versus one that takes a visible moment to assemble.

What happened to my .mtl and textures?

They were never in the .obj — but they can travel with it. The format keeps materials in a separate .mtl, which itself points at image files by relative path, and if you hand those over along with the .obj they are read and written into the GLB. Convert the .obj on its own and the geometry, the groups and the UV coordinates still convert; the material simply arrives as a plain surface, and the surviving UVs make re-attaching a texture afterwards a small job.

Is 0.042 the right number?

Yes, if your OBJ was in millimetres — which is the usual assumption, since the format states nothing. glTF units are metres, so millimetre coordinates are multiplied by 0.001. If your OBJ was authored in metres already, the output will be a thousand times too small, and the tell is the size shown before conversion: a part measured in hundredths rather than in tens.

Do the group names survive?

Yes. Each named group becomes a named node in the GLB, so a model split into body, lid and handle stays legible in the scene tree of whatever opens it. What does not survive is nesting: each ancestor transform is multiplied into the vertices it governs, leaving the parts as siblings at the right coordinates rather than as a tree.

Will this work with model-viewer?

That is what the output is for. The file is a standard binary glTF, which is exactly what Google's model-viewer element, three.js GLTFLoader and Babylon's SceneLoader all expect. Drop it next to your page, point src at it, and it loads without a build step.

Is my file uploaded?

No. The OBJ text is parsed and the binary container assembled in this tab, so nothing crosses the network.

About a format designed before the thing it is now used for

OBJ was published by Wavefront in the eighties for a workstation renderer, and its design shows its age in a way that is charming until it is inconvenient. Vertices are written as decimal text, one per line. Materials live in a companion file with its own syntax. There is no unit, no compression, no scene, and no way to say that these two files belong to each other beyond a filename written inside one of them. It survives because it is simple enough that anyone can write a parser in an afternoon, and because every package has had one for thirty years.

What it was never designed for is being downloaded. A page that shows a model has to fetch the geometry, discover the .mtl reference, fetch that, discover the texture references, fetch those — a chain of round trips before anything appears. glTF was built for exactly this case, which is why the conversion is worth doing once rather than asking every visitor to pay for the format's history.

If you want the text form instead of the binary one — to read it, to edit a node by hand — the .gltf route writes the same scene as JSON. Coming the other way, GLB unpacks into OBJ when a modelling package is the destination.

Where the conversion happens

Every number on this page is worked out by JavaScript running in the tab you are reading it in. The model you open is read straight off your own disk — it is never uploaded, logged or kept, which is also why these tools carry on working after you disconnect from the network.

Worth adding here: a file being packed for delivery is a file somebody is about to publish, and the version before publication is the one worth keeping private. It stayed private: no copy of it exists outside your own machine.