STL to glTF

Your model never leaves your browser, and nothing is downloaded to make this work. A mesh is a list of points and a list of triangles; reading one and writing the other is arithmetic your browser can already do.

…or drop one anywhere on this page.

Into readable JSON, self-contained: the numbers are written into the document itself rather than into .bin files beside it, because a download is one file. That costs about a third in size against a GLB, which is exactly why GLB exists.

An STL is triangles and nothing else, and it writes every corner out once per triangle rather than saying that two triangles share one. Coming out of it, those duplicates are welded back together, which is usually a large drop in file size and is what turns a soup of unconnected faces into something a modeller can work with.

None of these formats has units

This is the single most common reason a model comes out wrong, and no converter can fix it, because there is nothing in the file to read. Both of these formats are lists of numbers. Whether 10 means ten millimetres, ten inches or ten of something else is a convention between whoever exported the file and whatever opens it next — it is not written down. That is why models arrive at twenty-five times their intended size, or a twenty-fifth.

So the dimensions are shown above as three bare numbers. If your object is meant to be about 60 long and it says 2.36, somebody wrote it in inches and something else is about to read it as millimetres. The numbers are yours to recognise; nothing here can do it for you. If you want the size recorded in the file, convert it to 3MF instead — that is the one format here that stores it.

Telling a binary STL from a text one

An STL comes in two spellings: a text one beginning with the word solid, and a binary one beginning with an eighty-byte header its writer may put anything in. A great many writers put the word solid in it.

So a reader that sniffs the first five characters calls a large minority of the world's binary STLs text files, finds no triangles in them, and reports a perfectly good model as empty or damaged. The reliable test is arithmetic and it is what is used here: a binary STL is exactly 84 + 50 × the count in its header bytes long, and nothing else is. That is checked before the word is looked at.

Welding the corners back together

An STL has no way to say that two triangles share a corner, so each carries its own three points and a corner where six triangles meet appears six times. Every other format here stores each corner once and points at it, so coming across, those duplicates are joined back up. That is usually a large drop in file size, and it is what turns a soup of unconnected faces into a model a modeller can work with.

Only bit-for-bit identical corners are joined. Most tools weld within a tolerance — anything closer together than a thousandth of a millimetre becomes one point — and that quietly fuses surfaces somebody meant to keep apart: two parts of an assembly touching at a face become one solid, and nobody finds out until it prints wrong. Exact welding cannot do that. It also cannot join two corners that floating-point rounding put a millionth apart, so the number actually welded is reported above rather than assumed.

What does not come across

Materials, textures, animation and the scene. The result is one mesh in one node with no material, and a viewer will show it in its default grey. The numbers are written into the document as base64 rather than into .bin files beside it, which makes it one file you can actually keep — at about a third more size than the same model as a GLB.

Whether it is watertight is reported above, because that is what a slicer is about to ask: a closed solid has every edge shared by exactly two triangles, and one that does not leaves the slicer guessing what is inside. This is measured after welding — straight off an STL no two triangles share a corner by index, so every model on earth would look full of holes. Nothing here repairs a mesh; it tells you, and repairing is a different job.

Nothing is rotated. glTF is Y-up by its specification, COLLADA records an up axis of its own, and STL, OBJ and PLY say nothing at all — in practice arriving Z-up from CAD tools. What a file declares is reported rather than acted on, because a silent rotation is far worse than a model you can turn yourself. If your object arrives lying on its side, that is why, and it is one rotation in whatever opens it next.

Where to go next