OBJ File: What an .obj Stores, With MTL and Textures
Add to Chrome
EnglishEN
Home › Guides › OBJ file

OBJ file

An OBJ file is a plain-text 3D mesh: lines of vertex positions, texture coordinates and normals, then faces that point to them. Colors and textures live in a companion .mtl file and image files kept beside it.

Drop STL, OBJ, 3MF, STEP or G-code here

or click to browse

Also GLB / glTF, PLY, IGES, OFF, 3DS, FBX, DAE, WRL, AMF · several files at once (OBJ + MTL, glTF + BIN)

🔒 Files are opened by your browser and never leave your device

Reading an OBJ file line by line

OBJ was developed by Wavefront Technologies for its Advanced Visualizer animation software in the 1980s. The file is plain text, and every line starts with a short keyword:

KeywordMeaningExample
vvertex positionv 10.0 0.0 5.0
vttexture coordinate (UV)vt 0.5 1.0
vnnormalvn 0 0 1
fface built from vertex indicesf 1/1/1 2/2/1 3/3/1
o, gobject or group nameg lid
mtllib, usemtlmaterial library and material switchusemtl red_plastic

Indices start at 1, and a negative index counts back from the latest vertex. A face may have four or more corners, so quads from modeling tools survive intact.

MTL files and textures

The line mtllib model.mtl names a second text file. In it, each newmtl block sets a diffuse color with Kd and may point to an image with map_Kd. Paths are relative, so the OBJ, the .mtl and the images must travel together. When you zip a textured model to send, keep the folder layout the .mtl expects, because renaming one image breaks its link.

Send only the .obj and the model shows plain gray. In our viewer, open the set together:

  1. Press Open File and select the .obj, the .mtl and the image files in one go, or drag them onto the viewer together.
  2. Check the colors on screen; a gray part means a file is still missing.
  3. Open Info for the size, triangle count and separate parts.

OBJ + MTL + textures is supported by the engine we use but has not been through our own tests yet, so compare the result with the sender's render.

No units and a different up axis

OBJ stores bare numbers, like STL. The viewer reads them as millimeters, and Inches → mm multiplies by 25.4 when a part was modeled in inches. A model built for a game engine may be in meters, so a 0.2 reading usually means 200 mm.

Many animation tools write OBJ with Y pointing up, while slicers expect Z up. A model that lies on its back in the slicer needs a turn. When you convert, the option Rotate Y-up model to Z-up does that turn for OBJ, glTF and FBX files.

OBJ vs STL vs GLB

OBJSTLGLB
Encodingtexttext or binarybinary, one file
Facestriangles and polygonstrianglestriangles
Color, texturesthrough .mtl and imagesnoneembedded
Unitsnonenonemeters (glTF 2.0)

GLB packs mesh, materials and images in one file, which is easier to send than an OBJ folder. Our converter keeps raw numbers in GLB, so a 20 mm part shows as 20 m in viewers that assume meters. The GLB viewer covers that format.

Get an OBJ ready for printing

Open it in the OBJ viewer first. The file stays in your browser while Info reports size, triangles, separate parts and the mesh check; models made for rendering are often open shells that need Repair. Then OBJ to STL splits polygons into triangles and saves a printable file. That pair was tested, and the result re-opened with the same size, volume and triangle count.

Typical OBJ problems for 3D printing

Models built for rendering only need to look right from the camera. They often have open shells, single-sided planes for leaves or glass, and faces with normals pointing inward. The mesh check lists those as holes, open edges and flipped triangles.

Groups and objects in the OBJ come in as separate parts, so a character may arrive as twenty overlapping pieces. Booleans and cuts in our editor want one closed mesh, so join them with union first. Text OBJ files also grow fast, because every coordinate, UV and normal is written out as digits, so a dense scan is heavier as OBJ than as binary STL.

Questions and answers

What opens an OBJ file?

3D modeling programs, game engines, many slicers and browser viewers. Opening it in the tab needs nothing installed; Chrome is the tested browser.

Why does my OBJ show up gray?

The .mtl file or the texture images are missing or sit in another folder. Open the .obj together with its .mtl and images.

Can I 3D print an OBJ file?

Many slicers accept OBJ directly. If yours does not, or the mesh is open, repair it and convert to STL or 3MF.

Is OBJ the same as STL?

Both are meshes without units. OBJ adds UVs, normals, polygons, groups and materials; STL keeps only triangles and normals.

Does an OBJ file have units?

No. Check the dimensions after opening and rescale if the size is 25.4 or 1000 times off.

Who created the OBJ format?

Wavefront Technologies developed it in the 1980s for its Advanced Visualizer animation software. Materials sit in a separate .mtl file, and the format has no field for units.

Why is my OBJ file so large?

Every number is written as text, and UVs and normals add lines of their own. Converting to GLB or binary STL stores the numbers as packed binary instead, which makes the file smaller.