Guide

Clean up an imported STL or OBJ in Blender

Clean up an imported STL or OBJ in Blender: merge by distance, fix normals, find non-manifold edges, fill holes, delete loose geometry and dissolve triangles.

Tested by Pavel at Mendbox Studio

In Blender 4.2 and 5.2 · Updated 16 November 2026

To clean up an imported STL or OBJ mesh in Blender, work in this order in Edit Mode: Merge by Distance to weld split vertices, Delete Loose to remove stray geometry, Recalculate Normals to fix inside-out faces, Select Non Manifold to find the holes, then fill them and simplify the triangles. Each step is a menu entry, and the order matters because the later steps depend on the mesh being welded.

I ran everything here on test meshes in Blender 4.2.23 and 5.2.2, and the numbers come from those runs. Shortcuts use Ctrl and Alt: on a Mac that means the Control and Option keys.

Step 1: import the file

Choose File > Import > STL (.stl), or File > Import > Wavefront (.obj) for an OBJ. In Blender 4.2 and later the STL importer is built in, there is nothing to enable. Its options include Scale, Scene Unit, the forward and up axes, and Validate Mesh. If the model arrives far too large or small, change the Scale option.

Then select the object, press Tab, and press A to select everything. Turn on Overlays > Statistics so you can watch the vertex, edge and face counts change.

Step 2: Merge by Distance (M > By Distance)

Press M in Edit Mode and choose By Distance, or use Mesh > Merge > By Distance. The same operator is also in Mesh > Clean Up under the name Merge by Distance. It welds vertices that are closer together than Merge Distance (0.0001 by default).

What it does depends on the file:

  • A clean STL may need nothing. In my test, Blender's importer already welded vertices that sit at exactly the same position: 503 triangles arrived as 260 vertices, and Merge by Distance removed 0.
  • A file whose triangles do not share exact positions arrives unwelded. I nudged every vertex of a test mesh by up to 0.0005 before exporting it. After import it had 1509 vertices (three per triangle) and every edge counted as open. Merge by Distance at the default 0.0001 removed only 14 vertices. Raising Merge Distance to 0.002 in the Adjust Last Operation panel removed 1235 and left 260 vertices, with only the real hole still open.
  • The distance is measured in the object's own units, before object scale. In my test, two vertices 0.001 apart on an object scaled 100 times were merged with a Merge Distance of 0.01.

Raise the value in small steps. Too large a distance will collapse small details together.

Step 3: Delete Loose (Mesh > Clean Up > Delete Loose)

Scans and CAD exports often carry stray vertices and edges. Mesh > Clean Up > Delete Loose removes them, with the options Vertices, Edges and Faces. In my test, 3 stray vertices and 1 stray edge added to the mesh were removed, and nothing else changed.

A floating triangle that is not connected to the model is not loose in this sense. With Faces off, nothing was removed. With Faces on, the triangle and its vertices were deleted. Turn Faces on only if you are sure those pieces are junk, since a separate shell can also be a real part.

Step 4: Recalculate Normals (Shift+N)

Open Mesh > Normals > Recalculate Outside or press Shift+N. Select the whole mesh first. In my test, I flipped the top faces of a closed 503-face mesh, so only 292 faces pointed outward. After Shift+N, all 503 did. Use Recalculate Inside only for a mesh you want to see from the inside.

Recalculating only works on welded faces, which is why Step 2 comes first. I tested it on an unwelded triangulated sphere, where every face had its own vertices, with the top faces flipped: 312 of 528 faces pointed outward before Shift+N and 259 after, so it fixed nothing. After Merge by Distance, Shift+N made all 528 point outward. Turn on Overlays > Face Orientation to check: blue faces point outward, red faces point inward.

Step 5: find the holes with Select Non Manifold

  1. Press 1 for vertex select mode or 2 for edge select mode.
  2. Choose Select > Select All by Trait > Non Manifold, or press Shift+Ctrl+Alt+M.
  3. In the Adjust Last Operation panel, keep Boundaries ticked, which selects the edges around open holes. The other options (Wire, Multiple Faces, Non Contiguous, Vertices) find other kinds of damage.

In my test, a mesh with one 15-edge hole selected exactly 15 edges. On the unwelded version, every edge was selected, which is the sign that you skipped Step 2.

The Non Manifold entry is not available in face select mode. The menu hides it and, in my test, calling the operator in face mode failed with an error. Switch to vertex or edge mode first.

Step 6: fill the holes

You have three built-in choices.

  • Mesh > Clean Up > Fill Holes. It only fills holes up to the Sides value, which defaults to 4. The 15-edge hole was not touched at the default, and with Sides set to 64 it was closed by a single 15-sided n-gon.
  • Select the hole's edges and press F. The result is the same n-gon.
  • Face > Grid Fill for quads, which only works on a loop with an even number of edges.

Selecting one edge of the hole and then using Select > Select Loops > Edge Loops picks the whole hole's loop. How to fill a hole with quads in Blender explains Grid Fill, Bridge Edge Loops and the odd-edge-count problem in detail.

Step 7: simplify with Limited Dissolve

STL files are all triangles. Mesh > Clean Up > Limited Dissolve merges flat neighbouring faces whose angle is below Max Angle (5 degrees by default). On a cube whose sides were subdivided and triangulated (192 triangles), it left 6 quads and 8 vertices. On a triangulated UV sphere (528 triangles) it produced 240 quads and 12 n-gons with 5, 6 or 7 sides in Blender 5.2.2. In 4.2.23 the same test gave 248 quads and 8 six-sided n-gons. Flat areas become clean faces, but curved areas can end up with n-gons.

Run Face > Tris to Quads (Triangles to Quads in 5.x, Alt+J) afterwards for the remaining triangles, and see turning n-gons and triangles into quads for what to do with leftover n-gons.

The order in one list

  1. Import the file and select everything.
  2. Merge by Distance, raising the distance if the surface is still open everywhere.
  3. Delete Loose.
  4. Recalculate Normals.
  5. Select Non Manifold, then fill the holes.
  6. Limited Dissolve, then Tris to Quads.

Methods compared

ProblemBuilt-in stepWhat it givesLimit
Unwelded verticesMerge by DistanceShared verticesDistance must match the gap
Stray vertices, edgesDelete LooseCleaner meshFaces option can delete real shells
Inside-out facesShift+NConsistent normalsNeeds connected faces
HolesFill Holes, F, Grid FillN-gon, or quads on even loopsFill Holes stops at Sides, Grid Fill needs even loops
Triangle soupLimited Dissolve, Alt+JQuads and some n-gonsCurved areas keep triangles or n-gons

What can go wrong

  • Everything is selected as non-manifold. The mesh is unwelded. Go back to Merge by Distance with a larger distance.
  • The model collapses after merging. The distance is too large for the model's scale.
  • Shading is dark in patches. Check Face Orientation, then run Shift+N.
  • Fill Holes does nothing. The hole has more sides than the Sides setting.

Faster with QuadFix

QuadFix has a Clean & Quad (Boolean Prep) button that runs the cleanup in one go: merge doubles, remove degenerate and loose geometry, limited dissolve, tris to quads. I tested it on Blender 4.2.23 and 5.2.2.

  1. Press Tab, open the QuadFix tab in the sidebar (N), and press Select Non-Quads & Holes to see how many non-quad faces and boundary edges the mesh has.
  2. Select the whole mesh and press Clean & Quad.
  3. Press Fill Holes with Quads for the openings.

On a test mesh made of 528 separate triangles with a stray vertex (1585 vertices), Clean & Quad brought it to 266 vertices and 264 quads with no triangles left, and the report showed the before and after counts. It also recalculates normals: on a closed sphere with its top faces flipped, only 168 of 288 faces pointed outward before the button and all 288 after. Merge Distance (0.0001 by default), Dissolve Angle (5 degrees) and Keep Sharp Edges are on the panel.

Know the limits. Fill Holes keeps the patch triangular when the surrounding mesh is all triangles (Match Triangle Meshes, on by default). On a fully triangulated mesh with a 15-edge hole, the default added 23 triangles and 1 quad. With the option off the result had 13 quads and 194 triangles. It repairs the mesh you have and is not a retopology tool. The panel reference lists every option and the workflows page shows the import cleanup flow. The free QuadFix Lite includes Clean & Quad and N-gons to Quads, but not hole filling.

QuadFix — $12
QuadFix is a Blender add-on that fills holes with quad grids, bridges edge loops, converts n-gons and triangles to quads and cleans Boolean and imported meshes.