Tools / Image Erode

Image Erode

Shrink the shapes in an image back from their edges, free.

🖼️ Scaling millions of product images? 💡Automate, optimize, and deliver faster. 👉 Talk to a Media Expert

Image Erode

Erode or dilate an image to thicken lines, shrink highlights or clean up specks.

Or drag your image here

JPG, PNG, WebP, HEIC and more. Max 20MB

No image?
Try one of these

Stock image 1
★★★★★
4.8 (29 reviews)

Looking to erode an image at scale?

Sign up to use our API in your next project and erode an image at scale.

Free Online Image Erode

Morphological erosion without writing a line of code.

Why use our Image Erode tool?

Erosion normally lives in an image processing library and a Python script. Here you upload the image, set how far the edges pull back, and download.

Built for the browser

Works right in your browser, free, with no software to install and no watermarks.

Edges pulled inward

Shapes shrink evenly from their outline, which thins strokes and trims stray pixels.

Cleaner masks and line art

Ragged edges, speckles and halos around a cut out shrink away with them.

Quality preserved

Cloudinary keeps your output crisp and true to the original.

Do it at scale

Process one file or thousands with our free API and erode an image automatically, with no manual steps.

Format versatility

Works with all major formats, so your result fits right into your workflow.

How to erode an image in 3 steps

Erode your image in 3 simple steps. Upload it, set the amount, and download.

Upload your image

Drag and drop your image into the browser, or upload it from your device.

Set the amount

Choose how far the edges pull back.

Download

Save your result, with no watermarks.

Go beyond erosion

Shape your images with more free tools: Image Dilate, Photo Outline Generator, Sharpen Image.

A woman and a golden retriever in the mountains. They're sitting, facing away from the camera while the dog noses the woman. They're surrounded by natural splendor including majestic mountains, puffy clouds, and evergreen-studded hills.
An un-cropped image overlaid with a cropping window showing how it would be cropped by Cloudinary.
An arrow pointing from the original asset to the cropped asset
A woman and a golden retriever in the mountains. They're sitting, facing away from the camera while the dog noses the woman. They're surrounded by natural splendor including majestic mountains, puffy clouds, and evergreen-studded hills.
The same asset cropped using the following settings: Aspect Ratio: 1:2. Crop Mode: Content-Aware.
Images
Videos
Crop Mode
Aspect Ratio
Original
18 MB

We’re showing a resized version of the original asset to avoid slow loading speeds. View the original.

The original asset:
JPEG
135 KB
WebP
135 KB
AVIF
90 KB
JPEG XL
94 KB
The image after being optimized using the following settings: Quality: Auto. Width: 1000px.
Original
18 MB

We’re showing a resized version of the original asset to avoid slow loading speeds. View the original.

The original asset:
JPEG
135 KB
WebP
135 KB
AVIF
90 KB
JPEG XL
94 KB
The image after being optimized using the following settings: Quality: Auto. Width: 1000px.
Images
Videos
Quality
Width
An un-cropped image overlaid with a croppingai window showing how it would be cropped by Cloudinary.
An arrow pointing from the original asset to the cropped asset
The same asset cropped using the following settings: Aspect Ratio: 1:1. Crop Mode: Content-Aware.
Images
Videos
Crop Mode
Aspect Ratio
The original image:
An arrow pointing from the original asset to the transformed asset.
The personalized image:
The original image:
The personalized image:
Product Photos
Backgrounds
Overlays
Duration
Full length video: Surfing Trip
An arrow pointing from the original video to the AI-generated preview.
Duration
A shorter video preview generated by Cloudinary's AI using the following settings: Duration: 15 seconds. Max Clips: 9. Min Clip Length: 1 second.
Videos
Duration
Max Clips
Min Clip Length

Frequently Asked Questions

Erosion is a morphological operation that pulls the edges of bright shapes inward, so lines get thinner and small specks disappear entirely. It is one half of a classic pair, the other being dilation, which pushes edges outward. Together they are the standard way to clean up masks, line art and scanned text before anything else reads them.

Use erode when there is too much shape, for example a cut out with a pale halo left around the subject, a scan with ink bleed that has fattened the letters, or a mask speckled with stray white pixels. Use dilate when there is too little, such as a broken line that needs reconnecting. Running erode and then dilate removes noise while keeping the shape roughly its original size.

Yes, it is free to use online, with no watermark and nothing to install. Upload the image, choose how strong the erosion is and download the result. The usual route to the same operation is an image processing library such as OpenCV, which means setting up an environment and writing a script before you can see what a given kernel size even looks like.

High contrast material: masks, logos, line drawings, scanned text and anything black on white. Erosion works on the difference between light and dark, so a soft photograph with gentle gradients will simply look slightly eaten rather than cleaned. Save the output as PNG, because JPEG artefacts around a hard edge are exactly the kind of noise you were trying to remove.

Yes. Cloudinary applies transformations on delivery through its API, so preprocessing steps can run across an incoming set of images rather than one at a time. That matters in any pipeline that feeds another system, OCR, vectorising or shape detection, where consistent clean edges on every file decide whether the next stage works.

Get Free API Get Free API