CSS Filter Generator

Generate CSS filter with 10 functions including drop-shadow, backdrop-filter mode, 8 preset combinations. Live preview with image upload. Free.

Build CSS filters with 10 functions including drop-shadow(). Switch to backdrop-filter mode for frosted-glass effects. 8 preset combinations (vintage, dramatic, neon-glow, Instagram-style). Test on your own uploaded image.

🖼️ Preview
0px
100%
100%
0%
0%
100%
0%
100%
0px
4px
8px

CSS


      

HTML


      

How to Use CSS Filter Generator

  1. Pick a preview source: gradient swatch (fast), sample image, or upload your own.
  2. Adjust any of the 9 filter sliders OR pick a preset (vintage, dramatic, Instagram-style, etc.).
  3. Toggle drop-shadow for color-aware shadows (different from box-shadow - drop-shadow respects transparency, ideal for icons).
  4. Switch output mode to backdrop-filter for frosted-glass effects (blur whatever's BEHIND the element, not the element itself).
  5. Set CSS selector. Copy CSS / HTML or download as filter.css.

Frequently Asked Questions

Can I animate filters on hover?

Yes, and it is one of the smoothest ways to add hover feedback. Put transition: filter 0.3s ease; on the element, then change the filter list in the :hover rule, for example from grayscale(100%) to grayscale(0%) for the classic color-on-hover photo grid. Keep the same functions in the same order in both states so the browser can interpolate each value instead of jumping.

What’s the difference between filter and backdrop-filter?

filter: applies to the element itself. An img with filter: blur(5px) is blurry. backdrop-filter: applies to whatever’s RENDERED BEHIND the element. A semi-transparent div with backdrop-filter: blur(20px) blurs the content behind it – the glassmorphism effect. Requires a transparent or semi-transparent background to be visible.

drop-shadow vs box-shadow?

box-shadow: shadow follows the element’s bounding box. Rectangular shadow even on an irregular shape. drop-shadow: shadow follows the alpha channel of the content. For a transparent PNG icon, the shadow matches the icon’s actual silhouette, not its rectangular bounds. Drop-shadow is GPU-accelerated; box-shadow is CPU-rendered.

Does the order of filter functions matter?

Yes. blur(5px) grayscale(100%) blurs first then desaturates. grayscale(100%) blur(5px) desaturates first then blurs. Different visual results. The tool emits filters in a consistent order; rearrange manually if you need a specific composition order.

Are filters performant?

Most filters (brightness, contrast, opacity, grayscale, sepia, invert, saturate, hue-rotate) are very cheap – GPU-accelerated, runs at 60fps on any modern device. blur is the expensive one: each pixel samples nearby pixels. Large blur values + large elements = potential lag. drop-shadow internally blurs the alpha channel, so it has the same caveat.

Why does hue-rotate sometimes look wrong?

hue-rotate uses HSL-style hue rotation, not perceptually-uniform rotation. Colors near pure red rotate visibly differently than colors near pure green, even with the same angle. For perceptually-uniform color shifts, use the LCH color space (CSS Color 4) or post-process in a color editor.

What’s the deal with the Instagram presets?

Instagram’s actual filters use sophisticated multi-pass color grading that CSS filter can’t fully replicate. These presets approximate the “look and feel” of Clarendon and Gingham using just CSS – they’re 80% there but not pixel-identical. For exact replication, use a server-side image processor with lookup tables (LUTs).

Why is there an opacity filter when CSS already has the opacity property?

The opacity() filter does the same thing as the opacity property – but combines with other filters in a single declaration. Useful for animating multiple effects simultaneously without juggling two properties.

Can I use filters with -webkit prefix for older Safari?

For filter: no prefix needed since Safari 9 (2015). For backdrop-filter: Safari requires -webkit-backdrop-filter as well, even in current versions. The tool emits both when backdrop-filter mode is selected.

Is anything uploaded?

No. The image you upload to test stays in your browser. Pure browser-side CSS generation.