How to repair an STL file for 3D printing.

Open a model your slicer refuses, let Mesh Repair fix it, and export a file that slices. The repair runs in your browser and never uploads your model.

You need
An STL or OBJ
Runs in
Your browser or MeshPit Desktop
Cost
Free, no account
MeshPit Mesh Repair showing the holes and flipped triangles it found in an STL file

1Open the file

Open Mesh Repair and drop in an STL or OBJ file. It checks and repairs the model straight away, with every repair turned on.

2Check what it fixed

  • The Problems table lists what it found and what is left after the repair.
  • Switch between Original and Repaired above the preview.
  • Tick Show problems to mark open edges, non-manifold edges and self-intersections. The inside of the surface shows dark red, so holes and flipped triangles stand out.

3Export the repaired file

When the result reads Repaired, ready to slice, click Export STL or Export OBJ.

In MeshPit Desktop, Repair Mesh in a model's details opens the same tool, and the repaired copy saves beside the original.

Why an STL file won't slice

An STL file is a list of triangles, and to print they have to enclose a solid. Every edge must be shared by exactly two triangles, and every triangle must face outwards. When they don't, a slicer may refuse the file, leave out walls or fill spaces that should be empty.

Sculpted models, 3D scans, parts merged together and some downloaded files often break these rules.

The problems it fixes

ProblemWhat it isWhat Mesh Repair does
Duplicate verticesCorners at the same place that should be one, which leave cracks between triangles.Welds corners closer than the weld distance, which closes the cracks. Leave the distance blank and MeshPit picks one from the size of the model.
Degenerate trianglesTriangles with no area, from a repeated corner or three corners in a line.Removes them, and splits a neighbouring triangle where needed so no gap opens.
Duplicate trianglesTriangles on the same three corners as another.Removes the copies. Two copies facing opposite ways form a wall with no inside, and both go.
Non-manifold edgesEdges shared by more than two triangles.Pairs up the triangles round the edge, so two cubes touching along an edge become two closed cubes. Where solids overlap rather than touch, it leaves the edge alone.
Non-manifold verticesPoints where separate parts of the surface touch.Gives each part its own copy of the point.
Flipped trianglesTriangles facing the opposite way from their neighbours.Turns them to match the rest of their shell.
Inside-out shellsClosed parts whose every triangle faces inwards.Turns them the right way out, unless another shell encloses them, since the inner wall of a hollow should face in.
HolesLoops of open edges, which have a triangle on one side only.Closes each hole with new triangles. It refuses a patch that would cut through the model, and leaves that hole open and reports it.
Self-intersectionsTriangles in one part that pass through each other.Cuts out the crossing triangles and closes the gap. Separate parts that overlap are left alone, because slicers merge them.

If a repair makes things worse

Mesh Repair compares every result with the original. If the result has more open edges, more non-manifold edges or more crossing triangles, or a closed model's volume changed, it runs again without the fixes that can open the surface. If that is still worse, it fixes only the normals. The notes under the preview say when this happened.

When to go back to the original model

If problems remain after the repair, the model may be too broken to fix automatically. A hole whose patch would cut through the model stays open, for example. Export the model again from the program it was made in, then run it through Mesh Repair once more.

Questions

What does non-manifold mean in an STL?

A non-manifold edge is shared by more than two triangles, and a non-manifold vertex is a point where separate parts of the surface touch. A slicer can't tell which side of such a surface is inside, so it may leave out walls or fill gaps. Mesh Repair pairs up the triangles round each of these edges and points, so two parts that only touch become two closed parts.

How do I fix flipped normals in an STL?

Open the file in Mesh Repair with Fix flipped and inside-out normals ticked, which it is by default. It turns each flipped triangle to match the rest of its shell, and turns a closed part that faces inwards the right way out.

Can I repair an OBJ file?

Yes. Mesh Repair opens STL and OBJ files and saves the repaired model as either.

Is my model uploaded when I repair it?

No. Mesh Repair reads, repairs and saves the model in your browser, so it never leaves your computer, and you don't need an account.

Can I post a model I changed in MeshPit?

Only if the original license allows it. Adding holes or repairing a model doesn't change its license, so credit the original designer, link to their model and post yours as a remix where the site allows it. If the license doesn't allow changes, sharing or selling, don't. Credit MeshPit too.

MeshPit

Fix the model that won't slice.

It's free, it needs no account, and your files never leave your computer.