SVG feMorphology Filter
feMorphology thickens or thins a shape's edges, commonly used to create outline effects or adjust apparent stroke weight.
Drop your image here
Supports PNG, JPG, BMP, WEBP up to 5MB
Dilate and Erode Operator Modes
feMorphology's operator attribute accepts dilate, which expands a shape's filled area outward to make it appear thicker or bolder, and erode, which shrinks the filled area inward to make it appear thinner, with the radius attribute controlling how much expansion or shrinkage is applied in each direction.
- dilate expands a shape's filled area outward, making it appear bolder
- erode shrinks the filled area inward, making it appear thinner
- radius attribute controls the amount of expansion or shrinkage applied
Common Uses for Morphology Effects
feMorphology with dilate is a popular technique for creating a solid outline effect around text or icons without manually adding a stroke, since dilating a shape and layering the original on top produces a clean outline silhouette, while erode is useful for subtly thinning bold icon strokes without editing the original path data.
- Dilating and layering the original shape on top creates a clean outline effect
- Avoids manually adding or adjusting stroke attributes on the original path
- erode is useful for subtly thinning bold strokes without editing path data
Frequently Asked Questions
Is feMorphology a good substitute for manually setting stroke-width?
For a true stroke effect, standard stroke and stroke-width properties are usually simpler — feMorphology's dilate/erode is more specifically useful for creating an outline silhouette effect distinct from a traditional path stroke.
Does feMorphology work well combined with other filter primitives?
Yes, it's commonly chained with feFlood, feComposite, or feGaussianBlur within a larger filter to build more complex text-outline or glow-style effects from a dilated base shape.
Related guides
Ready to Convert Your Image to SVG?
Free online converter — no sign-up, no watermarks, results in under 3 seconds.
Try It Free — Convert Image to SVG