CSS Filter Playground

Apply blur, brightness, contrast, hue-rotate, and more. Combine filters and copy the CSS.

Preview
Generated CSS
filter: none;
Adjust sliders to apply CSS filters.

How to Use the CSS Filter Playground

  1. Choose a mode — Combined lets you stack multiple filters, Single focuses on one filter, Backdrop demonstrates the frosted glass effect, and Presets give you instant Instagram-style filters.
  2. Drag the sliders — Each slider controls a filter function. Changes apply instantly to the preview.
  3. Reset individual filters — Click the ↺ icon next to any filter label to reset just that value.
  4. Copy the CSS — Click Copy to get the filter property declaration. For backdrop mode, you also get the backdrop-filter value.

CSS Filter Functions Explained

The filter property accepts one or more filter functions that are applied sequentially from left to right. Each function modifies the visual output of the element. They work on any element including images, videos, divs, and SVGs.

Available Filter Functions

  • blur(px) — Applies a Gaussian blur. Higher values create a more out-of-focus effect. Best used on background decorations, not on text.
  • brightness(%) — 100% is normal. 0% = black, 200% = double brightness. Useful for hover effects on images and dark mode adjustments.
  • contrast(%) — 100% is normal. 0% = flat gray, 200% = very high contrast. Useful for creating graphic poster effects.
  • grayscale(%) — 0% = full color, 100% = completely grayscale. Often used for disabled states or hover effects that reveal color.
  • hue-rotate(deg) — Rotates the hue of all colors in the element. 0deg = original, 180deg = opposite hues. Cycling 0-360 creates a rainbow animation.
  • invert(%) — 0% = normal, 100% = fully inverted colors (like a photo negative). 50% produces a flat grey.
  • opacity(%) — Similar to the opacity property, but composited differently. When used inside filter, it is applied after other filters.
  • saturate(%) — 0% = grayscale, 100% = normal, 200% = double saturation. Great for dramatic color effects and hover reveals.
  • sepia(%) — 100% gives a warm brown-tone vintage photo look. Combine with brightness and contrast for authentic film effects.

Creating Instagram-Style Presets

Vintage: filter: sepia(0.4) brightness(1.1) contrast(1.1) saturate(0.8);
B&W: filter: grayscale(1) contrast(1.1);
Warm: filter: sepia(0.25) saturate(1.4) brightness(1.05);
Cool: filter: hue-rotate(200deg) saturate(0.9) brightness(1.05);

Backdrop Filter and Frosted Glass

backdrop-filter applies filter effects to the area behind an element. The element itself must have a semi-transparent or transparent background for the effect to show through. This is the technique behind iOS-style frosted glass modals, nav bars, and card overlays. Example: backdrop-filter: blur(10px); background: rgba(255,255,255,0.2);. Add -webkit-backdrop-filter for Safari support. For more CSS design tools, explore the CSS Animation Generator or the CSS Clip Path Editor.

Filter vs. SVG Filters

CSS filter functions are shorthand for common SVG filter effects. Under the hood, blur maps to feGaussianBlur, brightness maps to feComponentTransfer, and so on. For advanced effects not covered by CSS filters — such as drop shadows that follow element shape (not bounding box), color matrix transformations, displacement maps, or morphology — use the filter: url(#svg-filter-id) syntax referencing an SVG filter definition. CSS filters cover 95% of common design needs with much simpler syntax.

Frequently Asked Questions

CSS filters are visual effects applied to elements using the filter property. They include blur, brightness, contrast, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Multiple filters can be combined in a single filter declaration and are applied in order.
The filter property applies effects to the element itself and all its contents. backdrop-filter applies effects to the area behind the element — visible through semi-transparent backgrounds. Backdrop-filter is commonly used to create frosted glass effects on cards, modals, and navigation bars.
CSS filters are GPU-accelerated but can be costly depending on complexity. Blur is the most expensive filter, especially at large radii. For best performance, apply filters to smaller elements or use will-change: filter to promote the element to its own GPU layer.
Yes. CSS filters are animatable using transitions and keyframe animations. You can transition from grayscale(100%) to grayscale(0%) on :hover for a color-reveal effect, or animate hue-rotate from 0deg to 360deg for a rainbow cycling effect.
Use backdrop-filter: blur(10px) combined with a semi-transparent background: background: rgba(255,255,255,0.2). The backdrop-filter blurs whatever is behind the element. Add -webkit-backdrop-filter for Safari compatibility.