OBJ to GLB Converter

Turn an OBJ and its MTL material file and textures into one GLB, right in your browser. Drop the files together (or pick the folder) and the converter reads the OBJ’s faces, texture coordinates and normals, follows the MTL to its images, and packs everything into a single glTF 2.0 binary file that web viewers, AR and game engines open. If the OBJ or MTL asks for a file you did not drop, the page names it exactly, so you can add it. Each MTL material becomes a glTF PBR material, and the table shows how: diffuse colour to base colour, opacity to alpha, shininess to roughness. glTF uses metres, so you can say what unit the OBJ was made in, and turn a Z-up model to Y-up. Every GLB is read back straight after it is written to check its structure, triangle count and size. Nothing is uploaded.

100% private — everything runs in your browser. Everything runs in your browser; your OBJ, MTL and texture files are never uploaded.

100% private — runs in your browser
Drop the OBJ with its MTL and textures, or click to chooseSelect the .obj, .mtl and image files together (PNG or JPEG textures).

Size and direction

Parts

Runs in your browser: the OBJ, MTL and textures are read and packed into one GLB by our own code, with no upload and nothing saved. You may use what you make here, including commercially, with no credit needed. The rights in your own models and textures stay as they were.

How to convert an OBJ to GLB

  1. Drop the .obj with its .mtl and texture images, choose a folder, or click Try a sample.
  2. Check the file table: anything the OBJ or MTL needs but is missing is listed by name. Use Add missing files to add it.
  3. Choose the OBJ units and up direction, and whether to keep parts separate.
  4. Check the 3D view and the material table, then download the GLB.

What you can use it for

  • Put a model on a website, in AR or in a web 3D viewer that wants GLB
  • Bring an OBJ into a game engine as one file with its textures
  • Send a client one file instead of an OBJ, an MTL and a folder of images
  • Turn a millimetre CAD export into a metre-scale glTF scene
  • Check which textures an OBJ really uses before you share it
  • Get PBR materials from old MTL colours as a starting point

How MTL materials map to glTF

MTL settingIn the GLBNotes
Kd (diffuse colour)baseColorFactorSet to white when a diffuse map is used, so the texture shows its own colours
map_Kd (diffuse map)baseColorTexture, image embeddedPNG or JPEG; -clamp on gives clamped edges
d, or Tr (opacity)alpha in baseColorFactor, alphaMode BLEND below 1Tr is read as 1 − d
Ns (shininess 0–1000)roughnessFactor = 1 − √(Ns ÷ 1000)Pr, if present, is used as roughness directly
Pm (metallic, PBR MTL)metallicFactor0 when not given
Ke, map_Ke (emission)emissiveFactor, emissiveTexture
norm (normal map)normalTexturemap_Bump height maps are listed in the notes, not converted
Ka, Ks, map_Ks, illumNot usedNo matching setting in core glTF; specular maps are listed in the notes
Ns (shininess)Roughness in the GLB
01
100.9
1000.684
2500.5
5000.293
10000

What the sample crate gives

ItemResult
OBJ faces16 (16 with 4 or more sides, split into triangles)
GLB triangles40
Materials2 (crate_wood with an embedded PNG texture, post_red)
Textures embedded1
Size1.95 × 1.6 × 1 m
File5092 bytes: JSON chunk 2052 bytes, BIN chunk 3012 bytes
Read backPassed (glTF magic, version 2, 4-byte aligned chunks, indices in range)

Computed by the converter itself from its Try a sample files (an OBJ with two objects, an MTL with two materials and a PNG texture, all our own).

OBJ units and the size of the GLB

OBJ units chosen1 OBJ unit =The sample becomes
Metres: keep the numbers1 m1.95 × 1.6 × 1 m
Millimetres0.001 m0.00195 × 0.0016 × 0.001 m
Centimetres0.01 m0.0195 × 0.016 × 0.01 m
Inches0.0254 m0.04953 × 0.04064 × 0.0254 m

The glTF 2.0 specification sets metres as the unit and +Y as up. Most OBJ files from 3D apps are already Y-up; files from CAD or 3D printing are often Z-up, so the converter can turn them.

Next steps

Need a print file instead? OBJ to STL makes one from the same OBJ, and GLB to STL turns a GLB into an STL. Check a print model in the STL viewer, or make a flat image into a 3D model with Image to STL.

Sources

Sources: Library of Congress: Wavefront OBJ File Format; Khronos glTF 2.0 Specification (GLB binary file format, metres, +Y up, PNG and JPEG images); Library of Congress: glTF (GL Transmission Format) Family.

More free tools

Working with 3D models?

View, convert and make 3D files with free tools that run privately in your browser, with no sign-up and no watermark.

See all free tools →

Frequently asked questions

Is this OBJ to GLB converter free?

Yes. There is no sign-up, no watermark and no limit on how many files you convert. The conversion runs in your browser, so your files never leave your device.

Why is my GLB untextured or grey?

The textures live in separate image files named in the MTL, and the MTL is named in the OBJ. Drop all of them together. The page lists any file it was asked for but did not get, by its exact name, and the GLB is made without it until you add it.

How are MTL materials turned into glTF materials?

Diffuse colour (Kd) becomes the base colour, opacity (d, or 1 minus Tr) becomes alpha, and the diffuse map (map_Kd) becomes the base colour texture. Shininess (Ns) becomes roughness as 1 minus the square root of Ns ÷ 1000, emission (Ke, map_Ke) becomes emissive and a normal map given as norm becomes the normal texture. MTL files describe an older lighting model, so these are close approximations, not exact matches.

Which texture formats work?

PNG and JPEG, the two image types core glTF 2.0 allows. Other images (TGA, BMP, TIFF, DDS, WebP) are listed in the notes and left out; save them as PNG and drop them again.

Will the GLB be the right size?

glTF uses metres. OBJ files have no units, so by default the numbers are kept as metres. If your OBJ was made in millimetres, as most CAD and 3D printing exports are, choose Millimetres and the model is scaled by 0.001. The page warns when a model is over 100 m across.

Are objects and groups kept?

Yes. Each object (o) or, when there are none, each group (g) becomes a named part (glTF node and mesh), with one primitive per material. Choose Merge into one part for a single mesh.

Is the GLB compressed?

No. It is written without Draco or meshopt compression, so every viewer can read it without extra decoders. Textures are stored as the same PNG or JPEG bytes you dropped.

What about polygons with more than three sides?

They are split into triangles, which is what glTF stores. Concave polygons are split with an ear-cutting method so no triangle falls outside the shape.

Are my OBJ and textures uploaded?

No. The OBJ, the MTL and the images are read and packed into the GLB by JavaScript in your browser, so they never leave your device. There is no sign-up and no watermark.