CSS Glassmorphism Generator

How to use 3 steps
  1. Adjust the Blur, Tint opacity, Saturation and Tint colour.
  2. Set the Corner radius and Border strength; the preview updates as you go.
  3. Press Copy Glassmorphism CSS and paste it into your stylesheet.

Read the full guide

Glass Panel Preview
Generated CSS Code

Loading the tool… 0 of 3 parts

Getting the tool ready. On a slow connection this can take a few seconds.

How this tool works

The effect is one property doing the work: backdrop-filter applies a filter to whatever is behind an element rather than to the element itself. Blur that background, lay a partly transparent tint over it, and the panel reads as frosted glass. The saturation boost is the part usually left out and the part that matters most — without it the blurred backdrop turns muddy and the result looks like fog rather than glass.

The tint is a colour and an opacity combined into an rgba value, and a faint light border sells the edge of the pane. The one hard requirement is that something has to be behind the panel: over a flat colour there is nothing to blur and the effect is invisible, which is far and away the commonest reason a copied glassmorphism rule appears to do nothing.

The costs, which are real

  • Nothing behind it means nothing to blur: the parent needs an image, a gradient or overlapping content. On a plain background the panel is just a tinted rectangle.
  • Text contrast is measured against the blurred backdrop: and that backdrop changes as the page scrolls, so a heading readable at the top may fail further down. Raise the tint opacity until the worst case passes.
  • It is expensive to paint: backdrop-filter is recalculated whenever anything behind it moves. A few panels are fine; a scrolling list of them will stutter on mid-range hardware.
  • Safari has needed the prefix for a long time: the prefixed property is emitted alongside the standard one, and dropping it is the other common reason the effect fails for some visitors and not others.

Full guide

4 min read

Glassmorphism: why it does nothing on a flat background

backdrop-filter blurs what is behind the element, so it needs something back there. The saturation boost everyone omits, why text contrast changes as the page scrolls, and what it costs to paint.

Read the guide

Frequently Asked Questions

Specific to the CSS Glassmorphism Generator. Broader questions about this category are answered on the category page.

There is nothing behind the panel to blur. backdrop-filter needs an image, gradient or overlapping content in the parent; over a flat colour it is invisible.
It boosts the colour of the blurred backdrop. Without it the blur washes colours out and the panel reads as fog rather than glass.
Only if you check it. Contrast is against the blurred backdrop, which changes as the page scrolls — raise the tint opacity until the worst case passes.
Yes, more than most effects. It repaints whenever anything behind it moves, so keep it to a few panels rather than a scrolling list.
The prefixed one is for Safari, which needed it for a long time. Dropping it is why the effect works for some visitors and not others.

Subscribe to receive notifications about new tools, features, and productivity tips.