Glassmorphism Generator: Frosted Glass CSS

Make the frosted glass effect in CSS: blur, tint, border and corners, with a live preview and code to copy.

Frosted glass
The background shows through, blurred.
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(12px) saturate(160%);
-webkit-backdrop-filter: blur(12px) saturate(160%);
border-radius: 20px;
border: 1px solid rgba(255, 255, 255, 0.3);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
12px
20%
160%
30%
20px

Make the frosted glass effect in CSS and see it over a bright background. Set the blur, the tint and how strong it is, the saturation, a thin light border and the corner radius, and add a soft shadow if you like; the card in the preview updates as you drag. Switch between three backgrounds to see how the glass looks over bright shapes, a smooth gradient and a busy pattern. The CSS uses backdrop-filter with the -webkit- version for Safari, a semi-transparent background and the border and radius you chose, ready to copy. The effect only shows when something sits behind the element, so put it over a picture, a gradient or other content. Your settings are saved in this browser. The CSS Gradient Generator makes backgrounds to put behind it.

Common use cases

  • Cards, navigation bars and pop-ups with a frosted look
  • Overlays on photos and video
  • Trying the effect before you build it
  • Learning how backdrop-filter works

How to use

  1. Set the blur and tint.
  2. Adjust saturation, border and corners.
  3. Try the three backgrounds.
  4. Copy the CSS.

FAQ

What is glassmorphism?

A design style where a panel looks like frosted glass: whatever is behind it shows through, blurred, with a light tint and a thin border.

Why doesn't the blur show on my page?

backdrop-filter blurs what is behind the element, so there must be something there and the element's background must be partly transparent. Some older browsers don't support it; they show the tinted background without the blur.

Why are there two backdrop-filter lines?

Safari used the -webkit- prefix until recently, so including both makes the effect work in older versions too.

Is glassmorphism readable?

It can be hard to read text over a busy background. Use a stronger tint, more blur or bolder text, and check the contrast.