Skip to content

Image Erode

Shrink the bright parts of an image with morphological erosion. Each pixel takes the darkest value in a square neighborhood with a radius of 1 to 25 pixels, so white shapes become thinner, small bright specks vanish and dark lines and text grow bolder. Useful for cleaning up masks and scans, separating touching objects and making thin black strokes thicker.

Choose files or drag and drop them into the upload field. Maximum file size: 5 MB.

Reset

Frequently asked questions

What does erosion do to an image?

Each pixel is replaced by the minimum value inside a square window centered on it. Bright regions shrink by the radius on every side and dark regions grow. On a mask, white shapes get thinner and small white dots disappear.

What does the radius control?

The radius sets the window size from 1 pixel (3x3) to 25 pixels (51x51). A radius of 1 removes one pixel from the edge of each bright shape. Larger radii remove thin bright details completely.

How do I make black text or line art bolder?

Erosion grows dark areas, so black text and lines on a white background get thicker. A radius of 1 or 2 is usually enough for scanned documents and faint drawings. Larger values start to fill letter counters and merge strokes.

How do I remove small white noise?

Erode with a small radius to remove the specks, then dilate with the same radius to restore the size of the real shapes. This sequence is called an opening. The second step is done with the Image Dilate tool.

Does it work on color photos?

Yes, the minimum is taken for each color channel separately. On photos dark details spread out and highlights shrink, giving a heavy, inked look. For precise mask work, use black and white images.

Can erosion separate touching objects?

Yes, eroding a mask often breaks thin bridges between shapes so they can be counted or selected individually. Choose the smallest radius that splits them, because the shapes also shrink by that amount.

Is transparency affected?

No, the alpha channel is copied unchanged and only the colors are eroded. Transparent backgrounds keep their shape. The output is a PNG.

Which formats can I upload?

Upload JPEG, PNG, GIF, WebP, TIFF or AVIF images up to 5 MB. Animated files use their first frame and images over 4000 pixels on a side are scaled down to fit.

What happens at the image edges?

The nearest border pixels are repeated outside the image, so the frame does not turn dark from missing neighbors. The result has the same dimensions as the input.

How is erosion computed?

The tool runs a separable minimum filter, rows first and then columns, with the van Herk and Gil Werman algorithm. The time per pixel does not grow with the radius, so large radii stay fast and the result is exact.

About OneClick Pro

OneClick Pro is a free collection of more than 150 web tools for everyday work: converting images and units, formatting and validating code, checking domains and SEO, and working with text, dates and numbers. Every tool runs without registration or subscription, and what you enter is only used to calculate your result and is never stored. Use it as a quick toolbox for one-off tasks, or bookmark the tools you rely on every day.