CSS Filter Generator

Free toolNo sign-up
Surface:
Aa 123
Original
Aa 123
Filtered
Active0
SurfaceSunset
Drop shadowoff

About this generator

Build CSS filter chains visually with live before/after preview. 9 filter functions — blur, brightness, contrast, grayscale, invert, saturate, sepia, hue-rotate, opacity — plus optional drop-shadow with full x/y/blur/color control. Identity values (brightness 100%, etc.) are auto-omitted from the output so the exported CSS stays short and intent-clear.

13 curated presets — none, B&W, vintage, warm, cool, dreamy, faded, cinematic, noir, pop, invert, blur, ghost. Pick one as a starting point, then tune. Compare toggle splits the canvas into original / filtered side-by-side so you can see exactly what the filter is doing.

Permalink: every adjustment encodes into the URL hash. No login, no watermark, no paywall. Free and MIT-licensed.

?

Why use CSS filters?

🎨
Photoshop in one CSS rule
Brightness, contrast, saturation, hue rotation, sepia, blur — every adjustment a photo editor offers, applied to any DOM element with a single line of CSS. No image processing, no extra requests.
GPU-accelerated effects
Filters run on the compositor thread, so they're fast. Stack multiple filters on hovers, scroll-driven animations, or theme transitions without dropping frames.
🪞
Perfect drop-shadows for non-rectangles
box-shadow follows the rectangular box. drop-shadow() follows the alpha channel — so transparent PNGs, SVGs, and clip-path shapes get shadows that match their actual silhouette.
🎯
One brand, infinite moods
Build hover states that desaturate, dark-mode previews that invert, hero images that shift hue with the time of day — all from one source asset, controlled entirely in CSS.

How to use this generator

01
Pick a preset or start fresh
Pick a curated look (BW, vintage, cinematic, noir, ghost) as a starting point, or hit none to begin from a blank state and dial in each value yourself.
02
Drag any slider
Brightness, contrast, saturation, sepia, blur, hue-rotate, opacity, grayscale, invert — all standard filter functions. Identity values (100% brightness, 0px blur) are auto-omitted from the output to keep the CSS tidy.
03
Toggle drop-shadow
Add an alpha-aware drop-shadow on top of every other filter. X / Y offset, blur, and an editable colour string — perfect for transparent SVG icons or clip-path silhouettes.
04
Compare and copy
The Compare toggle splits the canvas into Original vs Filtered. When the filtered version looks right, click Copy CSS and paste the rule onto any element.

Filter function reference

FunctionBeforeAfter
blur(8px)sharpsoft, frosted
brightness(150%)normal50% lighter
contrast(150%)normalpunchier blacks
grayscale(100%)colourfully desaturated
invert(100%)normalcolours inverted
saturate(200%)normalvivid pop
sepia(80%)normalwarm vintage tone
hue-rotate(90deg)redshifted toward green
opacity(50%)opaquehalf-transparent
drop-shadow(0 8px 16px rgba(0,0,0,.3))flatlifted, alpha-aware
=

Filter patterns

Hover
/* Hover: desaturate to grey */
.thumb {
  filter: none;
  transition: filter 250ms ease;
}
.thumb:hover {
  filter: grayscale(100%) brightness(0.9);
}
Stacked
/* Cinematic poster look */
.poster {
  filter:
    contrast(130%)
    saturate(130%)
    brightness(95%)
    sepia(5%);
}
Shadow
/* drop-shadow follows alpha — perfect for PNGs / SVGs */
.icon {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15))
          drop-shadow(0 1px 2px rgba(0, 0, 0, 0.10));
}

/* Compare with box-shadow on a transparent SVG —
   box-shadow draws around the bounding rect, drop-shadow follows the shape. */

Pro tips

01
Order matters
filter: blur(4px) brightness(120%) does not equal brightness(120%) blur(4px). The browser applies functions left-to-right; a tiny reorder can change the look entirely.
02
drop-shadow vs box-shadow
box-shadow draws around the rectangular box. drop-shadow respects the alpha channel — pick it for transparent images, SVG icons, and any element with a clip-path or border-radius beyond a simple rect.
03
Watch performance on large surfaces
Filters are GPU-friendly but still cost memory at the size they're applied to. Avoid blur(20px) on a fullscreen hero — apply it to a smaller layer or use backdrop-filter on a translucent overlay instead.
04
backdrop-filter for glass UI
filter blurs the element itself. backdrop-filter blurs whatever sits behind it — the right pick for translucent navbars, modals, and frosted overlays.
?

Frequently asked questions

01

What's the difference between filter: drop-shadow() and box-shadow?

box-shadow follows the element's rectangular bounding box. drop-shadow follows the element's actual alpha channel — including transparent regions. On an SVG icon with cutouts, a transparent PNG, or any element with an irregular silhouette, box-shadow draws a rectangle outline of the bounding box (visibly wrong). drop-shadow conforms to the visible shape. Use drop-shadow for: SVG icons, transparent PNGs, text effects, irregular shapes. Use box-shadow for: rectangular cards, buttons, panels — it's GPU-accelerated and cheaper to paint.

02

Are CSS filters GPU-accelerated?

Yes — filter, opacity, and transform all run on the GPU compositor thread. The browser promotes the filtered element to its own layer and renders the filter in a single GPU pass per frame. This makes filters cheap to animate (60fps blur transitions are common). The trade-off: each filtered element costs GPU memory for its compositor layer. Hundreds of filtered elements on one page can spike GPU memory — limit aggressive filters to interactive elements rather than applying them to every card on a long list.

03

Why do my filters look slightly different in Safari?

Safari and Chrome use different filter shaders for some functions, especially blur. Safari's blur is calibrated to look more like Apple's system blur (slightly softer, slightly cooler). Chrome's is more clinical. Differences are usually 1-3px equivalent — imperceptible at typical UI sizes. If pixel-perfect consistency matters (e.g., product photography overlays), test in both browsers. For all functional filters (grayscale, sepia, invert, brightness, contrast, saturate, hue-rotate, opacity), output is identical across browsers.

04

Can I animate CSS filters?

Yes. transition: filter 0.3s ease works on all evergreen browsers. Animating from one filter chain to another is well-supported but the chains MUST have the same filter functions in the same order — animating from blur(5px) to grayscale(100%) doesn't work (different functions). For correct animation, write filter: blur(5px) grayscale(0%) and filter: blur(0) grayscale(100%) so both states have both functions. The generator's exported CSS already includes all your tuned filters; pair with a transition declaration for the smooth effect.

05

What's the order of filter functions? Does it matter?

Yes, filters are applied in the order written — each function operates on the output of the previous one. blur(5px) saturate(150%) blurs first, then saturates the blurred result. saturate(150%) blur(5px) saturates first, then blurs the saturated result. The visual difference is subtle but real. The generator outputs filters in a deterministic order (blur, brightness, contrast, grayscale, invert, saturate, sepia, hue-rotate, opacity, drop-shadow) that produces the most intuitive result for most use cases.

06

Why are 100% and 0 considered 'identity' (no effect)?

Each filter function has an identity value that produces no visible change: blur(0), brightness(100%), contrast(100%), grayscale(0%), invert(0%), saturate(100%), sepia(0%), hue-rotate(0deg), opacity(100%). When you set a slider to its identity value, the generator omits that function from the output CSS — keeping the rule short and intent-clear. A 5-filter chain that's actually just 'brightness 110%' compiles down to filter: brightness(110%); not a 9-function chain mostly at identity.

07

Is this free for commercial use?

Free, MIT-licensed, zero attribution required, no watermark, no signup. Use on any project — personal, client, enterprise — without permission.

See it used in real designs

Browse hand-coded collections that put this tool to work.

Search CodeFronts

Loading…