Toolvist

CSS Filter Generator

Adjust grayscale, sepia, blur, brightness, contrast and more, then copy the CSS filter.

Preview

Filter preview

Free CSS Filter Generator

The CSS Filter Generator lets you build image filter effects visually and copy the exact CSS. Adjust grayscale, sepia, blur, brightness, contrast, saturation, hue rotation, and more.

Filter effects pair with the CSS Box Shadow Generator and the Glassmorphism CSS Generator, which use the same properties. To apply a filter to a whole image rather than a preview, the Image to Grayscale Converter is the tool.

How to use the CSS Filter

  1. 1 Drop an image in, or apply the sliders to any element previewing on the page.
  2. 2 Adjust each function independently: grayscale, sepia, saturate, brightness, contrast, hue-rotate, blur, invert and opacity.
  3. 3 Watch the generated `filter:` declaration build up as you go, listing only the functions you actually changed.
  4. 4 Copy the CSS and paste it into your stylesheet.

The functions and what they do

Each function takes either a percentage or a number. Values above 100% for grayscale, sepia or invert are clamped, but saturate, brightness and contrast happily accept values outside the normal range — which is why `saturate(200%)` produces a genuine boost rather than a no-op.

Order matters when the functions interact. `grayscale(1) sepia(1)` produces a sepia tone applied to a grey image, whereas `sepia(1) grayscale(1)` ends up grey again, because the grayscale pass removes the tone the sepia introduced. Read the chain left to right as a pipeline through which the pixels pass.

  • `opacity(50%)` is cheaper than `filter: opacity()` on some browsers but the visual result is identical.
  • `hue-rotate()` is not a colour-space round trip; it rotates in a linear approximation, so results are approximate.
  • Combining `brightness()` and `contrast()` is how you fake an exposure adjustment without touching the image.

Frequently asked questions

What is the difference between `filter` and `backdrop-filter`?

`filter` transforms the element itself, including its children and its text. `backdrop-filter` transforms whatever is painted behind the element, while leaving the element's own content untouched — which is how the frosted-glass effect is built. They take the same function list, so the values you tune here transfer directly.

Why does a blur look different from a filter on the same radius?

A blur is a convolution: it samples neighbouring pixels and averages them, so its cost scales with the radius and with the element size. The other functions are per-pixel colour operations with a fixed cost. A large blur radius on a full-screen element is one of the more expensive things you can ask a browser to composite.

Does applying a filter affect performance?

It can, and the reason is worth knowing. A filter forces the browser to promote the element to its own compositing layer and then composite the result, which costs GPU memory. Applying one filter to a container is far cheaper than applying the same filter to fifty small elements inside it.

Related Image & Color Tools

Browse all Image & Color Tools →

You might also need

Tools from other categories that people pair with the CSS Filter:

Browse the full tool directory →