Glassmorphism CSS Generator
Design a frosted-glass card the modern way. Adjust blur, transparency, saturation, border, and shadow, preview it live over vivid backgrounds, and copy production-ready backdrop-filter CSS.
Glass Settings
Border & Shadow
Card Text Color
Background
CSS Code
Glassmorphism in CSS: The Complete Guide
Glassmorphism is the frosted-glass UI style popularised by macOS Big Sur and Windows 11 Acrylic. A panel looks like translucent, blurred glass floating above a colourful background, with a faint light border catching the edge. The whole effect is achieved in CSS with just a few properties β most importantly backdrop-filter.
The Five Ingredients of Good Glass
- Translucent background β a semi-transparent fill such as
rgba(255,255,255,0.18). The lower the alpha, the more "glassy" and the more the background bleeds through. - Backdrop blur β
backdrop-filter: blur(12px)frosts whatever sits behind the element. 8β16px reads as glass; too much looks like fog. - Saturation boost β adding
saturate(160%)to the backdrop-filter makes the blurred colours behind the glass pop, which is what sells the realism. - Light inner border β a 1px
rgba(255,255,255,0.3)border simulates the bright edge where light hits real glass. - Soft shadow β a large, low-opacity
box-shadowlifts the panel off the page so it appears to float.
Why backdrop-filter Needs a Background Behind It
Unlike a normal filter, which blurs the element's own content, backdrop-filter blurs the pixels behind the element. That means glassmorphism only looks like glass when there's something colourful or detailed behind the card β a gradient, a photo, or overlapping shapes. Over a flat white page it just looks slightly grey. This generator gives you several vivid backgrounds (and an image upload) so you can see the effect exactly as your users will.
Accessibility & Performance Notes
Text on glass can fail contrast checks because the background shows through. Keep body text on a sufficiently opaque area, or pair light text with a darker tint. backdrop-filter is GPU-accelerated but still costly β avoid animating it or stacking many glass layers on low-end devices. For older browsers, always declare a fallback solid or semi-transparent background so the panel stays readable even when the blur isn't supported.
Browser Support
backdrop-filter is supported in all current versions of Chrome, Edge, Firefox, and Safari. Safari has long required the -webkit-backdrop-filter prefix, which this tool always includes in the output, so your glass renders correctly across the board.
Frequently Asked Questions
backdrop-filter: blur() and a light border.-webkit-backdrop-filter prefix. This generator always outputs both the prefixed and standard properties so it works everywhere.