The SVG <filter> element groups filter primitives (like <feGaussianBlur>) into a reusable effect. It is never drawn by itself — shapes reference it with filter="url(#id)" (or the CSS filter property).
Put filters in <defs>, give each an id, then apply that id to circles, rects, text, or groups.
Baseline · Widely available.
Core SVG filters (blur, offset, merge) are stable across modern browsers since about July 2015. Some newer primitives vary — keep demos simple and test targets.
Room for the effect.
Default filter region is roughly x/y = -10% and width/height = 120% so soft edges are not clipped.
Deprecated: xlink:href.
Do not reuse filters via xlink:href on <filter>. Define the primitives you need (or duplicate a short filter) instead.
Change the filter in one place to update all uses.
Ids must be unique inside the document.
Edge Cases & Pitfalls
Most filter bugs are ids, clipping, or missing primitives.
region
Blur or shadow looks cut off
Widen x/y/width/height on <filter> so the soft edge fits.
id
url(#id) must match
Typos or duplicate ids break the reference. Keep ids unique and exact.
perf
Heavy filters cost
Large blurs on big graphics can be slow. Prefer modest stdDeviation values.
defs
Filter is not painted alone
<filter> only affects elements that reference it. Nothing appears until you apply filter="url(#…)".
Compatibility
Browser Support
Core SVG <filter> primitives are supported in every modern browser.
✓ Baseline · Widely available
SVG <filter>
Widely available since about July 2015. Chrome, Firefox, Safari, Edge, and Opera support common primitives. feDropShadow is modern-browser friendly; Internet Explorer has limited filter support.
95%Global support (approx.)
Google ChromeAll modern
Full support
Mozilla FirefoxAll modern
Full support
Apple SafariAll modern
Full support
Microsoft EdgeAll modern
Full support
OperaAll modern
Full support
Samsung InternetAll modern
Full support
Internet Explorer10+
Partial
<filter>Widely supported
Bottom line: Safe for production blur and shadows in modern browsers. Prefer feGaussianBlur + merge for widest reach; use feDropShadow when targeting current engines.
Remember
Key Takeaways
Define in <defs> with a unique id.
Apply with filter="url(#id)".
Expand the region for blur and shadows.
Reuse one filter on many shapes.
One line: primitives in <filter>, apply with url(#id).
UA style
Default CSS Settings
<filter> itself has no painted look. The CSS filter property can also point at SVG filters:
defaults.css
/* Conceptual — filter defs are not painted */
filter {
/* region defaults ≈ -10% / 120% in SVG */
}
/* Optional: apply SVG filter from CSS */
.icon {
filter: url(#blur5);
}
Prefer the SVG filter attribute in these lessons so the effect stays inside the graphic.
Frequently Asked Questions
Define a <filter> (usually in <defs>) with an id and one or more primitives. Apply it with filter="url(#id)" on a shape, or with the CSS filter property.
Blur and shadows need extra space. Expand the filter region with x, y, width, and height on <filter> (defaults are already about -10% / 120%).
Use feDropShadow for a short form, or combine feOffset, feGaussianBlur, and feMerge for a classic pipeline.
Yes. Define it once with an id, then apply filter="url(#thatId)" to as many elements as you need.
No. <filter> is a definition only. Effects appear on elements that reference it.
CSS filter is great for whole HTML elements. SVG filters shine for reusable defs and multi-primitive pipelines inside the SVG.