Reduce the size of an STL file
Most large STL files are large for one reason: far more triangles than the shape needs. Drag the slider and watch the model beside the original. When the right-hand one still looks right, that is how far you can go.
The reduction runs on your own machine. The file is never uploaded, which is also why there is no size limit and nothing to wait for.
What actually makes an STL big
An STL has almost nothing in it but triangles. A binary one spends fifty bytes on each: twelve for a normal nobody reads, thirty-six for three corners, two wasted. There is no compression, no shared vertices, and no header worth speaking of. So the size of the file is the triangle count times fifty, near enough, and the only way to make the file smaller is to have fewer triangles.
That is why the usual advice — zip it, or re-export it — misses. Zipping helps once and then you have a zip your slicer will not open. Re-exporting at a coarser setting works if you still have the original CAD file, and most people arrive here because they do not.
Where the triangles came from decides how many you can lose. A part exported from CAD at a fine tolerance has flat panels carved into hundreds of triangles that describe a plane three would describe exactly; that reduces enormously with no loss you could measure. A 3D scan has triangles that each carry a little genuine surface detail, and it reduces much less before it starts to look soft.
How the triangles are chosen
This is quadric edge collapse — the method Blender’s decimate modifier and MeshLab both use. It works by asking, for each pair of joined points, how far the surface would have to move if they became one point, and it always merges the pair whose answer is smallest.
The consequence is the useful part. A point in the middle of a flat panel has every surrounding triangle lying in the same plane, so merging it away moves nothing and it goes first. A point on a sharp edge has two planes pulling in different directions, so it survives. A point at a corner has three and survives longest. Reduction therefore eats the places where nothing is happening and keeps the places that make the shape recognisable — which is exactly backwards from what happens if you simply throw away every other triangle.
Two things are protected outright. The rim of an open model is held in place, so a model with holes does not come back visibly shrunk. And any merge that would turn a triangle inside out, or fuse two parts of the surface that only touch at a point, is refused however cheap it looks — because either one produces a model that still renders and can never be made watertight again.
How far to go
Start at fifty per cent. On almost any model that came out of CAD, fifty is invisible: the volume changes by a fraction of a per cent and the bounding box does not move at all. Keep dragging while the right-hand model still matches the left, and stop when a curve starts to show flats or an edge starts to wander.
Watch the volume figure in the measurements as you go. It is a more sensitive instrument than your eye for this: a reduction that has started to damage the shape shows up as a volume drifting away from the original well before anything looks wrong on screen.
For a part you are about to print, the printer imposes its own floor. A 0.4 mm nozzle cannot reproduce detail finer than about a fifth of a millimetre, so triangles finer than that are describing something the print cannot show. For a part going into a game or a web viewer, go much further than you would think: real-time renderers care about triangle count far more than printers do.
Reducing before writing a STEP file
There is one conversion where reduction is not an optimisation but a necessity. A STEP file has to describe every triangle as a face with its own edges, curves and vertices, so a mesh of half a million triangles becomes a STEP file that a CAD program opens in minutes rather than seconds, if at all.
If you are heading for STEP, reduce first and watch the number. The mesh-to-STEP converter also merges triangles that share a plane, which handles the CAD-exported case; reduction is what rescues a scan, where no two triangles share a plane and merging has nothing to work with.
What is lost besides triangles
Texture coordinates. They belong to corners of triangles that no longer exist, and there is no honest way to carry them across a decimation. If your model is textured and the texture matters, reduce it in a program that can re-project the texture onto the simplified mesh, not here.
Nothing else. The units, the size, the position and the orientation all come through untouched, and the result is still closed if it started closed.
Questions
- How much smaller will the file be?
- Almost exactly in proportion to the triangles. An STL is triangles and nothing else, so keeping thirty per cent of them gives you a file about thirty per cent of the size. The panel shows both counts as you drag.
- Will it still be printable?
- Yes. A model that was closed before is still closed after — the method refuses any merge that would open it up. The measurements panel confirms it on your particular file.
- Is 50% safe?
- On a part that came out of CAD, almost always: the volume typically moves by less than half a per cent and the bounding box not at all. On a 3D scan, look carefully before accepting it. That is what the two viewports are for.
- Can I set a target number of triangles instead of a percentage?
- Not directly, but the count beside the slider updates as you drag, so you can drag until it reads what you want.
- Why has my file not got smaller?
- Check that the count on the right has actually dropped. A model already near its minimum — a plain box, say — cannot lose triangles without losing corners, and the method will refuse rather than damage it.
- Does this work on OBJ and 3MF as well?
- Yes, and on PLY, OFF, GLB, COLLADA and FBX. The reduction works on the mesh, not on the file format. Note that 3MF and OBJ are both much more compact than STL to begin with, so converting may save you more than reducing does.
Convert it while you are here
Where to go next
Other tools for the same file
- Repair an STL that will not sliceClose the holes and separate the bad edges so a slicer accepts it
- Check whether an STL is ready to printFind out what is wrong with a model before you print it
- Gridfinity generatorBins and baseplates, any size, built in the browser
- 3D printing cost calculatorThe real cost of a print, and whether to print it or order it
- Turn text into an STLType a word and print it, without drawing anything