OBJ vs STL for a geometry handoff

Send STL when the receiving side only needs the shape and you want the format nothing refuses. Send OBJ when the next application expects it, or when you want vertices shared rather than repeated. Neither carries a physical unit, so agree the scale separately whichever you pick. That is the decision. The measurements below are the reasons behind it.

Is OBJ more accurate than STL?

Not in the way the question usually means. Both files here hold the same triangles, so they describe the same shape to the same tolerance. What differs is how precisely each corner is written down.

Binary STL stores every coordinate as a 32 bit float, which is about seven significant digits, and it stores them whether or not that costs anything. This OBJ writer emits text with the fewest digits that survive a round trip, using up to twelve significant digits when a coordinate needs them. So an OBJ from here can preserve more of the original number than a binary STL can.

That rarely matters, and it is not what makes a model accurate. Accuracy comes from how finely the surface was tessellated, meaning how many triangles were used. A coarse mesh written to twelve digits is still coarse. If a curved part looks faceted, the fix is a finer tessellation at export, not a different container.

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 STL3MF
Triangles after reading444
Sample size105 bytes284 bytes1594 bytes
Stored physical unitNoneNoneMillimetres
Coordinate precision writtenUp to 12 digits32 bit floatText, package overhead
Separate material file from this writerNoneNot part of STLNone

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

Converting between them

Both directions run here, in the browser, with nothing uploaded. Use OBJ to STL when the receiving tool only accepts STL, and STL to OBJ when you need shared vertices or an application that expects OBJ. To look at an OBJ before converting it, open the OBJ viewer.

Converting does not add information. Going to STL rounds each coordinate to a 32 bit float and repeats shared vertices. Going to OBJ shares vertices again but cannot restore digits an earlier STL step already discarded.

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.

Where 3MF, glTF and STEP fit

3MF is the one of these that records a unit in the file, which is why it comes up for printing; see 3MF vs STL. glTF and GLB are delivery formats for graphics, built around scenes, materials and packaging rather than fabrication, compared in GLB vs glTF.

STEP is a different kind of file again. It describes surfaces rather than triangles, so a mesh converted into one does not regain curvature; see why an STL converted to STEP still has facets.

For a printing handoff the practical shortlist is STL and 3MF. OBJ earns its place when the receiving application is a graphics tool rather than a slicer.

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. The downloadable sample and its report let you compare the actual files first.

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

How can we help?