Skip to content

GLB, glTF, STL, OBJ and PLY: which 3D file format is which

By the CodingEagles Team 7 min read June 14, 2026 · Updated July 1, 2026 Reviewed by the Hivly studio
3dfile formatsgltfstl3d printing

Printing means STL. Web or a game means glTF or GLB. A scan is usually PLY. What the file stores tells you what it is for.

GLB, glTF, STL, OBJ and PLY: which 3D file format is which — Hivly

You downloaded a 3D model and got a .glb. The next one was a .stl. Then someone sent an .obj with a second file called .mtl, and a scanning app gave you a .ply. They are all “3D files”, yet they behave nothing alike. Open the wrong one in the wrong tool and you get an error, or a model with all its colour gone.

The extension is not random. Each format was built for a specific job, and once you know what each one stores, picking the right file is quick.

TL;DR: pick by the job. Printing means STL. The web or a game engine means glTF or GLB. Moving a model between two modelling tools means OBJ. A scan with colour is usually PLY.

Here is the short version before the details.

FormatWhat it storesMade for
STLGeometry only (a triangle mesh)3D printing
OBJGeometry, plus materials and textures via a companion .mtlExchange between tools
glTF / GLBGeometry, materials, textures, animationsThe web, games, AR
PLYGeometry, plus per-vertex colourScans and point clouds

STL stores the shape and nothing else

STL is the format almost every 3D printer and slicer speaks. It describes the surface of a model as a mesh of triangles, and that is all it holds. No colour. No texture. No materials.

That sounds like a limitation until you remember what a printer actually does. The machine lays down one material in one colour. It needs the shape and the size, and it has no use for anything else. So STL gives it the shape and the size, expressed simply enough that any slicer can read it. The simplicity is the whole reason STL became the standard for printing.

One thing to watch: because STL carries only geometry, the numbers it reports are the whole story for a print. Models are almost always saved in millimetres, so a size of 60 by 40 by 20 usually means 60 mm wide. If a downloaded model comes into your slicer at the wrong scale, the units are the first thing to check.

OBJ stores geometry, and keeps its look in a second file

OBJ is one of the oldest 3D formats still in daily use, and it survives because nearly every tool can read and write it. It stores geometry as plain text: vertices, faces, and texture coordinates. That makes it the go-to neutral format when you need to move a model between two programs that otherwise would not talk to each other.

The part that trips people up is where OBJ keeps colour. It does not keep it in the .obj file. Materials and surface properties live in a separate .mtl file, and the actual image textures sit in more files next to that. Open an .obj on its own, with the .mtl missing, and you see the geometry in a flat grey shade. The shape and scale are right. The look is somewhere else, in the files that did not come along.

So when someone sends you an OBJ, ask whether the .mtl and the texture images came with it. Without them you have the model, but not its appearance.

glTF and GLB are built for the web and real time

glTF, the GL Transmission Format, is the modern standard for 3D on the web. It was designed to load efficiently in browsers, games and AR, and it carries geometry, materials, textures and animations together, so a scene arrives ready to display. People call it “the JPEG of 3D” because, like JPEG, it is made for delivery rather than editing.

This is the format to reach for when a model needs to show up in a web page, a game engine, or an AR view on a phone. It packs the look and the motion into the file, so you are not chasing companion files the way you are with OBJ.

GLB is the same format in a different wrapper. A .gltf file is JSON text that often references separate files for its binary data and image textures, which means a plain .gltf can depend on files sitting next to it. A .glb bundles all of that into one self-contained binary file. That makes GLB the easier of the two to share or drop into a viewer, because there is only ever one file to move. If you get to choose, GLB is usually the friendlier handoff.

PLY carries scans and their colour

PLY, the Polygon File Format, is the one you meet when you start working with 3D scans and photogrammetry. Alongside geometry, it can store extra data on each vertex, and the value that matters most here is colour.

When you scan a real object, the scanner captures the colour off its surface. PLY can bake that colour into the vertices of the mesh, so the colour travels with the shape. That is why a scan often arrives as a .ply rather than an STL or OBJ. STL could never hold the colour, and OBJ would need its whole companion-file setup to.

There is a catch worth knowing. Not every PLY has colour in it. If the file includes per-vertex colour, a viewer can show the object close to how it looked in life. If it holds only geometry, it falls back to a plain shaded surface, same as any other bare mesh. PLY is also common for point clouds, where the file is a cloud of coloured points rather than a solid surface, which is another thing STL and glTF are not set up to store.

How to pick, by the job

Start from what you are doing and the format usually picks itself.

  • Sending a model to a 3D printer: STL.
  • Putting a model on the web, in a game, or in AR: glTF or GLB, and GLB if you want a single file.
  • Moving a model between two modelling programs: OBJ, and remember to bring the .mtl and textures.
  • Sharing a scan with its colour intact: PLY.

The format is really a label for what the file is meant to do. Once you read it that way, most of the confusion goes away.

If you just want to open one of these files and check it is the right model before you commit, the 3D model viewers open all five in the browser. You can rotate, measure and screenshot without installing anything heavy first.

Try the 3d model viewersOpen and inspect GLB, glTF, STL, OBJ and PLY models in your browser, orbit, zoom, wireframe and screenshot. Nothing uploaded.

Frequently asked questions

What is the difference between GLB and glTF?
They are the same format in two containers. A glTF file is JSON text that usually points to separate files for its binary data and textures. A GLB packs all of that into one binary file. GLB is easier to hand off because there is only one file to move.
Which 3D format should I use for the web?
Use glTF or its binary form GLB. It was built to load fast in browsers, games and AR, and it carries geometry, materials and textures in one place. People call it the JPEG of 3D because it is made for delivery, not editing.
Why does STL have no colour or texture?
STL stores only the surface as a mesh of triangles. No colour, no material, no texture. It was made for 3D printing, where the printer needs the shape and nothing else, which is why STL is so simple and almost every slicer reads it.
What format do 3D scans usually come in?
Scans and photogrammetry often produce PLY files, because PLY can store a colour value on each vertex alongside the geometry. That lets the colour captured off the real object travel with the mesh, which STL cannot do.
Can I convert an STL to glTF and get colour?
You can convert the geometry, but colour will not appear out of nowhere. STL never stored any, so the converted glTF shows a plain shaded surface until you add materials yourself. Conversion moves what the file has; it cannot recover what was never there.

Keep reading

Building something bigger?

Hivly is made by CodingEagles, a software studio that ships production web apps. If you have a real project, get in touch.

See what CodingEagles does →