How to Use CSS Filter Effects (Blur, Grayscale, Sepia & More)
CSS filters apply visual effects to elements โ blur, grayscale, brightness, contrast, and more โ without modifying the source image. They're processed by the GPU, work on any element (not just images), and can be animated for interactive effects like hover-to-color or scroll-driven transitions.
- Apply visual filters to images and elements with CSS filter.
- Covers available css filters.
- Covers combining multiple filters.
- Covers popular hover effects.
- Covers backdrop-filter for glass effects.
Available CSS Filters
blur(px) โ Gaussian blur. blur(4px) for a light defocus, blur(20px) for a heavy background blur. brightness(%) โ adjusts light level. 100% is normal, 150% is brighter, 50% is darker. contrast(%) โ adjusts difference between light and dark. 100% is normal. grayscale(%) โ removes color. 100% is fully desaturated. sepia(%) โ applies a warm brown tone. 100% is full sepia. hue-rotate(deg) โ shifts all colors around the color wheel. saturate(%) โ adjusts color intensity. 200% is oversaturated, 50% is muted. invert(%) โ inverts colors. 100% is full negative. drop-shadow() โ like box-shadow but follows the element's alpha shape (works on transparent PNGs and SVGs).
Combining Multiple Filters
Chain filters in a single declaration:
-webkit-backdrop-filter alongside backdrop-filter for Safari support. Without the prefix, the effect is invisible to roughly 25% of mobile users.img:hover {
filter: brightness(1.1) contrast(1.05) saturate(1.2);
}
Filters are applied in order โ the output of one feeds into the next. A common pattern for image hover effects: slightly increase brightness, contrast, and saturation to make the image 'pop' on hover.
Popular Hover Effects
Grayscale to color: filter: grayscale(100%) on the image, filter: grayscale(0%) on hover. Blur to sharp: filter: blur(2px), hover removes blur. Sepia vintage: filter: sepia(80%) brightness(0.9). Dark overlay alternative: filter: brightness(0.6), hover restores brightness(1). The CSS Filter Playground lets you adjust all filter values with sliders and see the effect on a live preview.
backdrop-filter inside a position: fixed element can cause severe scroll performance issues. Test thoroughly on real iOS devices.backdrop-filter for Glass Effects
backdrop-filter applies filters to the area behind an element rather than the element itself:
.glass {
backdrop-filter: blur(16px) saturate(180%);
background: rgba(255, 255, 255, 0.05);
}
This creates a frosted glass effect โ the background content is blurred and slightly color-boosted, while the element's own content stays sharp. Used for navigation bars, modals, and card overlays.
Frequently Asked Questions
What CSS filters are available?
Can I animate CSS filters?
What is the difference between filter and backdrop-filter?
Use the CSS Filter Playground โ free, no signup required.
โก Open CSS Filter Playground