Skip to content

Image Dilate

Grow the bright parts of an image with morphological dilation. Every pixel takes the brightest value found in a square neighborhood around it, with a radius from 1 to 25 pixels, so white shapes get thicker, small dark specks and gaps disappear and thin bright lines become bolder. Useful for cleaning masks, thickening scanned text or line art and preparing images for analysis.

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

Reset

Frequently asked questions

What does dilation do to an image?

Each pixel is replaced by the maximum value inside a square window centered on it. Bright regions therefore expand outwards by the radius and dark regions shrink. On a black and white mask, white shapes grow and small black holes are filled.

What does the radius control?

The radius sets the size of the square window, from 1 pixel (a 3x3 window) up to 25 pixels (a 51x51 window). A radius of 1 thickens shapes by one pixel on every side. Larger radii merge nearby shapes and round off detail.

Does it work on color and grayscale photos?

Yes, the maximum is taken for each color channel separately, which works on grayscale and color images. On photos this gives a soft, painterly look where bright details spread out. For clean masks, start from a black and white image.

How do I thicken thin black text instead?

Dilation grows bright areas, so it makes dark text thinner. To make black text or lines bolder, use the Image Erode tool, which grows dark areas. Alternatively invert the image, dilate it and invert it back.

What is dilation used for?

It is used to close small gaps in masks, connect broken strokes, remove dark speckle noise, expand selections before compositing and prepare binary images for counting or measuring objects. It is a basic building block of image morphology.

How do I remove small dark spots but keep the shape size?

Run a dilation and then an erosion with the same radius, which is called a closing. The dilation fills the spots and the erosion brings the outline back to its original size. Use the Image Erode tool for the second step.

Is transparency affected?

No, only the color channels are dilated and the alpha channel is copied unchanged. Transparent areas keep their exact shape. The result is saved as PNG.

Which file formats are supported?

JPEG, PNG, GIF, WebP, TIFF and AVIF images up to 5 MB can be uploaded. Animated files use their first frame and images larger than 4000 pixels on a side are scaled down to fit.

How are the image borders treated?

Beyond the border the nearest edge pixels are repeated, so the edges of the image do not darken or brighten artificially. The output keeps the input dimensions.

How fast is it with a large radius?

The tool uses a separable van Herk and Gil Werman maximum filter, so the cost per pixel stays the same whatever the radius. A 4000 pixel image with radius 25 is processed in a few seconds.

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.