CSS Filter Generator

Set the amount of each effect and get the filter line, with a preview on a sample picture. Effects left at their normal value are left out.

Use the tool

Loading the tool…

About CSS Filter Generator

Build CSS filter effects, such as blur, brightness and drop shadow, for an element or for the area behind it. You can add a drop shadow that follows the shape. A preview shows the effect, and the CSS is ready to copy.

Worked example

Add a drop shadow with a 4 pixel offset down and a blur of 8 pixels. Copy the CSS into your stylesheet.

Limits

Filters can be slow on large or animated elements, and some older browsers do not support all of them. Test on the devices your visitors use.

How to use CSS Filter Generator

  1. Choose filter or backdrop-filter.
  2. Set the amount for each effect you want.
  3. Add a drop shadow if you like.
  4. Copy the CSS line.

Good to know

  • Brightness, contrast, saturate and opacity are 100% by default. Values at the default are left out.
  • Filters apply in the order shown. A grayscale followed by a sepia looks different from the other way round.
  • drop-shadow follows the shape of the content, including transparent areas, unlike box-shadow.
  • backdrop-filter blurs what is behind the element, so the element needs a see-through background.

Frequently asked questions

How do I make a frosted glass effect?

Use backdrop-filter with a blur of 10 to 20 px, and give the element a semi-transparent background colour.

What is the difference between filter and backdrop-filter?

filter changes the element and its content. backdrop-filter changes only what is seen behind the element.

Does it change my image file?

No. The filter is applied by the browser when the page is shown. The picture itself is not changed.