OBJ vs STL for a geometry handoff

STL is a straightforward triangle-surface handoff. OBJ can also describe attributes used by graphics applications, including texture coordinates and references to material files. Choose based on what the next application needs, then check what the actual converter carries through.

Small files can reverse a size assumption

Our four-triangle tetrahedron is 105 bytes as OBJ and 284 bytes as binary STL. The OBJ shares four vertex definitions between its faces. Binary STL repeats the three corners of every triangle and has a fixed header. On this particular tiny mesh, the text file is smaller.

MeasurementOBJBinary STL
Triangles after reading44
Sample size105 bytes284 bytes
Stored physical unitNoneNone
Separate material file from this writerNoneNot part of STL

Larger files, numeric precision, indexing, and writer choices change the comparison. Use the actual download size when deciding whether a conversion solved a storage problem.

Materials need more than an extension

An OBJ's material references can point to an MTL file, which may in turn refer to images. This site's OBJ writer does not emit an MTL or texture coordinates. Converting a GLB to OBJ here therefore cannot promise the original textured appearance. Conversely, selecting an OBJ without its associated resources does not give a reader those missing files.

The Library of Congress describes OBJ and STL as distinct exchange formats. Their format-level capabilities are broader than this site's supported subset. A visual resemblance in the viewer does not verify a complete material pipeline.

Before handing off the file

Check the expected scale because neither sample records a physical unit. If your task only needs the triangle surface, compare dimensions and topology in the output report. If it needs materials, use an application and export route that explicitly handle the accompanying material and image resources. Keep those files together when the format requires them.

Convert OBJ to STL

Try these files

These samples were created by this project and released under CC0. They contain no visitor files. Sizes and SHA-256 hashes identify the exact bytes measured in this experiment.

See the measurement method, exact files, and reproduction details