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.
| Measurement | OBJ | Binary STL |
|---|---|---|
| Triangles after reading | 4 | 4 |
| Sample size | 105 bytes | 284 bytes |
| Stored physical unit | None | None |
| Separate material file from this writer | None | Not 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.
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.
- Ten-millimetre tetrahedron; STL itself stores no unit. (STL, 284 bytes)
SHA-256
7d98ff53aa7c0ac15350e51fc0adf77ebd39df597cac09f07269e1ff3fff9aa4 - Ten-millimetre tetrahedron in 3MF. (3MF, 1,594 bytes)
SHA-256
432c2b72aa07fadacfa24f77b1750fda16822303fd96dd268d64d617a06f6d88 - Ten-millimetre tetrahedron in OBJ; no MTL file is emitted. (OBJ, 105 bytes)
SHA-256
1c10d5664480df567f096cb27889c3ef9489c9c75a96ca807b3d6d67bd6b71c4
See the measurement method, exact files, and reproduction details