Switches the output to backdrop-filter, which is how frosted glass panels are made.
Your image stays in the browser. Nothing is uploaded.
Tone, blur and recolor an image without opening an editor.
Switches the output to backdrop-filter, which is how frosted glass panels are made.
Your image stays in the browser. Nothing is uploaded.
The filter property runs graphics operations on an element as the browser paints it. Blur, brightness, contrast, saturation, hue rotation, grayscale, sepia, invert and drop shadow are all built in, and they work on anything, not just images. The catch is that they stack into one long value where order changes the result, so writing them by hand means guessing.
This tool gives every function a slider and applies them to a real element as you drag. You can load your own image, since a filter that looks right on a sample rarely looks the same on a photo. There's also a switch that turns the output into backdrop-filter, which applies the same effects to whatever sits behind the element rather than the element itself. That's the property behind every frosted glass panel you've seen.
box-shadow, this one follows the actual shape of a transparent PNG or SVG.Filters replace a surprising amount of image editing, and they stay editable in code.
Working with images? The CSS Glassmorphism Generator builds the whole frosted panel, and the CSS Box Shadow Generator covers rectangular shadows. Or browse all our free developer tools.
Yes. Filters run left to right, each one receiving the output of the last, so grayscale(100%) saturate(200%) gives you a gray image, because saturating gray does nothing. Reverse them and you get a vivid image turned gray, which looks different. This tool emits a consistent, sensible order, so the preview always matches the code.
filter processes the element and its contents. backdrop-filter leaves the element alone and processes everything visible behind it. For frosted glass you want the second one, plus a semi-transparent background color on the same element, because a fully opaque background means there's nothing showing through to blur.
box-shadow always draws a rectangle, following the border radius. The drop-shadow() filter follows the element's actual alpha channel, so a transparent PNG of a leaf casts a leaf-shaped shadow rather than a square one. It also applies to the shape of an SVG icon. The tradeoff is that it has no spread value and it is more expensive to paint.
Static ones are usually fine. Blur is the expensive one, because the browser samples a wide area of pixels for every pixel it paints, and cost rises with the blur radius and the size of the element. A blurred full-screen background is noticeably heavy on low-end phones, and animating a blur is worse. Grayscale, sepia and hue rotation are cheap by comparison.
Yes, on any element. A filter applies to the element and everything inside it, so blurring a container blurs its text and children too. That is often what you want for a loading state or a modal backdrop, but it also means you cannot filter a background and leave the text sharp on the same element. Use a separate positioned layer for that.
filter is supported everywhere and needs no prefix. backdrop-filter is also widely supported now, but Safari has needed the -webkit- prefix for a long time, so this tool emits both lines when you switch to backdrop mode. If a browser does not support it the panel simply shows its background color with no blur, which is a reasonable fallback if you pick a color that stands on its own.