Home/Developer Tools/CSS Glassmorphism Generator
🪟

CSS Glassmorphism Generator

FREE

Frosted-glass panels with backdrop-filter, tint and border

Free · No sign-up required
Loading...

What the glassmorphism generator does

Glassmorphism is the frosted-glass look: a translucent panel that blurs whatever sits behind it, with a faint border and a soft shadow so it reads as a sheet of glass floating over the page. It became mainstream with macOS Big Sur and Windows 11 and is now a standard card and modal style. This generator lets you set the blur, transparency, tint colour, border and corner radius with a live preview and gives you the CSS to paste. Everything runs in your browser.

The CSS behind the effect

.glass { background: rgba(255, 255, 255, 0.15); /* translucent tint */ backdrop-filter: blur(12px) saturate(140%); /* blur what is behind */ -webkit-backdrop-filter: blur(12px) saturate(140%); border: 1px solid rgba(255, 255, 255, 0.3); /* light edge */ border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); /* lift off the page */ }

backdrop-filter does the real work: it applies a filter to the content behind the element rather than to the element itself. The translucent background lets the blurred backdrop show through; the light border simulates the refracted edge of glass; saturate keeps the blurred colours from going grey.

Settings that look right

PropertyTypical rangeNotes
blur()8–20 pxUnder 6 px looks smeared rather than frosted; over 30 px hides the backdrop entirely
Background alpha0.1–0.3 (light glass), 0.2–0.5 (dark glass)Higher alpha means more contrast for text, less glass
Border1 px, white at 0.2–0.4 alphaEssential — without it the panel has no edge
Border radius12–24 px
Shadow0 8px 32px rgba(0,0,0,.1–.2)Soft and large; a hard shadow breaks the illusion
saturate()120–180%Optional; compensates for blur desaturation

It only works over something

Glass over a flat white page is invisible — there is nothing to blur. The effect needs a colourful, varied backdrop: a photo, a gradient, blurred blobs, or other UI elements scrolling beneath a fixed header. The generator's preview uses a gradient background for this reason; on your page, make sure the element sits over content with some variation, and test on both the lightest and darkest areas it can appear over.

Readability and accessibility

  • Text on glass has variable contrast because the backdrop changes. Check contrast against the worst region of the backdrop, and raise the background alpha or add a subtle text shadow if it fails WCAG 4.5:1.
  • Keep glass for containers — cards, navbars, modals — not for body text areas that must be read at length.
  • Respect prefers-reduced-transparency: give those users a solid background.
  • Dark glass (black tint at 0.3–0.5) is usually easier to read on than light glass over busy images.

Browser support and performance

  • backdrop-filter is supported in all current browsers; Safari needs the -webkit- prefix, which the generator includes. Firefox added it in version 103 (2022).
  • Provide a fallback for browsers without support: inside @supports not (backdrop-filter: blur(1px)), give .glass a nearly opaque background such as rgba(255,255,255,.85).
  • Blur is GPU-intensive. A few glass panels are fine; dozens, or large panels over animated content, can drop frame rates on low-end phones. Avoid animating the blur radius.
  • Sticky or fixed glass headers over scrolling content are the classic use and perform well.

Frequently asked questions

Why doesn't the effect show on my page?

Usually the element is over a flat colour, or a parent has overflow/transform properties that create a new stacking context and block the backdrop. Check that the panel actually overlaps varied content.

Can I use it on images or buttons?

Yes — any element. Buttons and pills with glass over a hero image are common. Keep the text contrast in mind.

Is glassmorphism dated?

It peaked as a trend around 2021–2022 but has settled into a standard technique for overlays, navbars and cards. Used sparingly it still reads as current.

How is it different from neumorphism?

Neumorphism uses soft inner and outer shadows on an opaque surface to look extruded; glassmorphism uses transparency and blur to look layered. They are often confused because both were 2020-era trends.

Does it work in email?

No. Email clients do not support backdrop-filter. Use a pre-rendered image.

Can I export the preview as an image?

Not from this tool. Screenshot the preview or build the element on a page and capture it.

More tools in this category

🌈
CSS Gradient Generator
Build linear, radial and conic gradients and copy the CSS
CSS Clip-Path Generator
Circle, polygon, star and custom shapes as clip-path values
📈
CSS Cubic-Bezier Generator
Drag handles to design easing curves for transitions
CSS Loader Generator
Spinner, dots, bars, pulse and bounce loaders in pure CSS
🖱
CSS Button Generator
Design buttons with hover, active and focus states
🔺
CSS Triangle Generator
Arrows and carets with the border trick or clip-path