CSS Glassmorphism Generator
Create frosted glass UI effects — blur, transparency, borders — live preview, copy CSS
Presets
Preview
Glassmorphism
A frosted-glass effect that creates depth and visual hierarchy. Adjust the controls below to customize the effect.
Background
Glass Effect
Border
Box Shadow
Generated CSS
background: rgba(255, 255, 255, 0.20);
-webkit-backdrop-filter: blur(16px) saturate(180%);
backdrop-filter: blur(16px) saturate(180%);
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.30);
box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.10);Browser Support
backdrop-filter is supported in all modern browsers. Safari requires the -webkit-backdrop-filter prefix (included in the generated CSS). Not supported in IE11 or older browsers. Firefox versions before 103 require enabling the flag in about:config.
You want that frosted glass card effect you’ve seen on Apple’s websites and modern dashboards — semi-transparent background, blurred backdrop, subtle border. The CSS involves backdrop-filter: blur(), background: rgba(), and careful layering. Getting the right balance of blur radius, opacity, and border brightness takes iteration. This generator lets you tune each parameter visually.
Why This Tool
Glassmorphism requires coordinating multiple CSS properties that interact with each other. Too much blur and the background is unreadable; too little transparency and there’s no glass effect. This tool provides sliders for each parameter with a live preview against a colorful background, so you can see exactly how your glass card will look over real content. Copy the CSS when you’re satisfied.
What Is Glassmorphism?
Glassmorphism is a UI design trend that mimics frosted glass. Key characteristics:
- Semi-transparent background using
rgba()orhsla()with low alpha - Background blur using
backdrop-filter: blur() - Subtle border (often 1px white at low opacity) to define edges
- Slight shadow for depth
.glass-card {
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
Key CSS Properties
backdrop-filter: blur()
Applies a Gaussian blur to the area behind the element. Values between 8px and 20px produce the best glass effect. Higher values create a more frosted/opaque look.
background: rgba()
The alpha channel controls transparency. Values between 0.05 and 0.25 work well for glass. Too high and you lose the frosted effect; too low and the element becomes invisible.
Border
A thin border with low opacity (rgba(255,255,255,0.2)) gives the glass panel its edge definition. Without it, the glass blends into the background and loses its shape.
Browser Support
backdrop-filter is supported in all modern browsers. Safari requires the -webkit- prefix. Always include both:
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
Design Tips
- Glassmorphism needs a colorful background to show the blur effect — plain white or black backgrounds won’t look glassy
- Don’t use glassmorphism for everything — reserve it for cards, modals, or overlays
- Check text readability — ensure text on glass panels has sufficient contrast
- Performance:
backdrop-filtertriggers compositing. Avoid applying it to many elements simultaneously
Frequently Asked Questions
Does backdrop-filter work in all browsers?
Yes, all modern browsers support backdrop-filter. Safari requires the -webkit- prefix. The generated CSS includes both prefixed and unprefixed versions automatically.
Why doesn’t my glass effect show on a white background? Glassmorphism blurs the content behind the element. On a plain white background, blurring white produces white — so there’s no visible effect. Use a colorful or image-based background for the glass to be visible.
How do I make glassmorphism accessible? Ensure text on glass panels meets WCAG contrast requirements (4.5:1 for normal text). Increase the background opacity or add a darker tint if text is hard to read.
Can I animate glassmorphism properties?
You can animate background opacity and blur() values with CSS transitions, but animating backdrop-filter may cause performance issues on lower-end devices.
Does this tool send data to a server? No. All rendering and CSS generation happens entirely in your browser.