Back to blog

3D Printing File Formats: STL vs 3MF vs OBJ

Compare 3D printing file formats: STL, 3MF, OBJ, PLY, GLB and STEP. What each one stores, the best file format for 3D printing, and how to convert them.

ImgToSTL TeamBy ImgToSTL Team
3D Printing File Formats: STL vs 3MF vs OBJ

Every slicer opens STL, so it is tempting to think STL is the only format that matters. For most jobs it is no longer the best one. 3D file types differ in what they remember about a model: its real size, its colors, how many separate parts it has and, in some cases, the exact print settings you used. Picking the right one saves you from tiny models, lost colors and redoing slicer work.

Here is what each common format stores, when to use it, and how to move between them.

The quick comparison

FormatGeometryUnitsColor and textureMultiple objectsPrint settings
STLTrianglesNone (read as mm)NoNoNo
3MFTrianglesStored in the fileYesYes, with positionsYes, in slicer projects
OBJPolygonsNoneYes, via .mtl and image filesGroupsNo
PLYPolygons or points onlyNonePer-vertex colorNoNo
GLB / glTFTrianglesMetersYes, PBR texturesYes, as a sceneNo
STEPExact CAD surfacesStored in the fileBasic colorsYes, as assembliesNo

STL: the universal fallback

STL dates back to 1987 and the first stereolithography machines from 3D Systems. It stores a list of triangles, each one as three corner points plus a normal vector that says which side is outside. That is all it stores.

What it lacks:

  • No units. An STL holds plain numbers, and every slicer reads them as millimeters. A part drawn in inches arrives 25.4 times too small, and a model built at meter scale in Blender can arrive 1000 times too small.
  • No color or materials. A few programs once squeezed color into a spare field of binary STL, but slicers ignore it.
  • No separate objects. Several bodies in one STL load as a single object, and you split them apart in the slicer.
  • Large files. Each triangle stores its own three corners, so shared points are repeated. Binary STL uses 50 bytes per triangle, which makes a one-million-triangle model about 50 MB. ASCII STL, the text version, is several times larger again.

When to use STL: sharing a single-color part with anyone, on any slicer. That universal support is why most model sites still offer it. Converting to STL is also the usual last step before slicing a file from another program: the STL converter turns OBJ, GLB, PLY and 3MF into STL in your browser.

3MF: the best file format for 3D printing today

3MF (3D Manufacturing Format) was released in 2015 by the 3MF Consortium, an industry group founded by Microsoft together with printer and software companies, specifically to fix STL's gaps. A 3MF file is a ZIP archive with XML inside that describes the model, plus optional thumbnails and extra data.

What it adds:

  • Declared units (micron, millimeter, centimeter, inch, foot or meter), so size is never a guess.
  • Multiple objects with their positions on the build plate.
  • Colors and materials, including per-triangle colors used for multi-material painting.
  • Smaller files. Points are shared between triangles and the whole package is compressed, so the same mesh is usually much smaller than a binary STL.
  • Slicer data. Bambu Studio, PrusaSlicer and OrcaSlicer save their projects as 3MF, with print profiles, painted supports, modifiers and plate layouts inside. Cura saves its projects as 3MF too.

Two caveats. Slicer settings live in each slicer's own extensions, so a Bambu Studio project opened in PrusaSlicer keeps the geometry but not necessarily every setting. And Bambu Studio's sliced output, .gcode.3mf, is a 3MF that wraps G-code for the printer, not a model you can edit.

When to use 3MF: your own projects, multi-part and multicolor prints, and anything you want to reopen later with the same settings. If you need a plain mesh out of a project file, use 3MF to STL. To go the other way and give an STL real units and structure, use STL to 3MF.

OBJ: textured models and modeling software

OBJ comes from Wavefront Technologies in the 1980s and is a plain text format. It stores vertices, texture coordinates, normals and faces, and faces can be quads or larger polygons rather than only triangles. Materials and textures live next to it in a .mtl file and image files, which are easy to lose when someone shares only the .obj.

OBJ has no units either. Models from scanning apps, sculpting tools and many AI 3D generators can be exported as OBJ.

When to use OBJ: moving a textured model between modeling programs. For printing, most slicers open OBJ geometry directly, or you can convert it with OBJ to STL, which splits polygons into triangles.

PLY: 3D scans and point clouds

PLY, the Polygon File Format, came out of Stanford University in the 1990s to store data from 3D scanners. It can be text or binary, and each vertex can carry extra properties, most often a color. That makes it a common output of scanners and photogrammetry software.

The catch: a PLY can be a point cloud with no faces at all. A point cloud has no surface, so it cannot be printed until it is turned into a mesh, for example with surface reconstruction in MeshLab or CloudCompare. A PLY that already has faces converts directly with PLY to STL.

GLB and glTF: the web, AR and AI generators

glTF 2.0 is a Khronos Group standard from 2017, built for showing 3D on screens: in browsers, AR viewers, game engines and most AI 3D generators. GLB is the binary, single-file version. A .gltf file is JSON that may point to separate .bin and image files.

It stores triangle meshes with PBR materials and textures, a scene hierarchy, animations, skeletons, cameras and lights. Two details matter for printing:

  • Units are meters. A model 0.12 units tall is meant to be 120 mm. A converter that copies the raw numbers produces a model 1000 times too small.
  • Y is up. Slicers use Z as up, so an unconverted model lies on its back.

The GLB to STL converter handles both, turning meters into millimeters and Y-up into Z-up, and drops the textures, which a single-filament print cannot use anyway.

STEP: when the part may need to change

STEP (ISO 10303, files ending in .step or .stp) is the standard exchange format between CAD programs like Fusion, SolidWorks, Onshape and FreeCAD. Unlike every format above, it does not store triangles. It stores exact geometry: true circles, cylinders and spline surfaces, with units and assemblies.

That has two benefits. Someone can open the file in CAD and change a hole size or a wall thickness, which is very hard to do with a mesh. And because curves are exact, the slicer can turn them into triangles at whatever resolution it needs, so round holes come out round instead of faceted.

Recent versions of Bambu Studio, PrusaSlicer and OrcaSlicer import STEP directly and turn it into a mesh on load. If your slicer does not, export STL or 3MF from your CAD program. For functional parts that someone may want to modify, share the STEP next to the STL.

Files that are not models: G-code

G-code (.gcode, or Prusa's binary .bgcode) is what the slicer produces: a list of moves and temperatures for one specific printer, nozzle and filament. You cannot meaningfully scale or edit it, and G-code sliced for a Prusa MK4 should not be sent to a Bambu Lab printer. Share models, not G-code, unless the other person has exactly the same setup.

So which format should you use?

  • For your own prints: 3MF. It keeps units, parts, colors and settings together.
  • For sharing a single-color part: STL, plus a 3MF if you have tuned settings worth passing on.
  • For parts that might need edits: STEP, plus an STL for people without CAD.
  • For textured or scanned models: keep the GLB, OBJ or PLY as the source file, and convert to STL or 3MF when you print.

Converting between formats

Converting toward STL always works, because every format here can hold a triangle mesh. What gets lost is everything STL cannot hold: textures, colors, animations and slicer settings. Converting from STL to 3MF adds units and structure, but it cannot bring back colors that were never in the file.

Two habits prevent most surprises. Before you convert, open the file in the STL viewer to confirm its size and whether the mesh is watertight. After you convert, check the dimensions in your slicer before you hit print. A model that is 25.4 or 1000 times off is a units problem, not a broken file. All the converters linked here run in your browser, so your files are never uploaded.