๐ง Glassmorphism Generator: Build Frosted Glass CSS in Seconds
By Shihab Mia ยท Updated 2026-07-17
Drag the sliders or pick a color. The preview and CSS update live.
A glassmorphism generator builds the frosted-glass CSS for you: a translucent panel that blurs and tints whatever sits behind it. The effect needs exactly three lines working together, and this tool writes all of them. Move the sliders for blur, tint opacity, tint color, saturation, border and shadow, watch a live glass card update over a vivid gradient, then copy CSS like this: background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.3). The -webkit-backdrop-filter prefix is included automatically for older Safari, and every value is generated in your browser, so nothing is uploaded and there is no sign-up.
What is the Glassmorphism Generator?
Glassmorphism, named by Michal Malewicz in 2020 after Apple leaned into translucent panels in macOS Big Sur and iOS, is built from three ingredients that only work as a set. First, a background color with low alpha, written as an rgba value, so the panel is see-through. Second, backdrop-filter: blur(), which blurs whatever sits behind the panel rather than the panel content itself, creating the frosted texture. Third, a thin, nearly-white, semi-transparent border with a soft drop shadow, which reads as the lit edge of a piece of glass. Remove any one of these and the illusion collapses: tint alone looks like a flat overlay, blur alone looks like a smudge, and border alone looks like an ordinary outlined box.
The key property, backdrop-filter, only does anything when there is something visually busy behind the element to blur, such as a gradient, a photo or overlapping shapes. Over a flat, solid background you will see the tint but no frosting, because there is nothing varied to soften. That is why this glassmorphism generator previews your card over a colorful gradient: it is the only honest way to judge the effect. A saturate() value is usually added alongside blur() because averaging pixels together pulls colors toward grey, so saturate(150%) to saturate(200%) restores the punch that the blur washed out. You can stack more functions in the same declaration, for example blur(12px) saturate(180%) brightness(110%) contrast(105%), and they apply left to right.
A detail that trips up almost everyone: backdrop-filter creates a new stacking context and only samples what is painted behind the element inside its own containing context. If an ancestor has overflow: hidden, its own filter, a transform, or certain opacity values, the blur can silently sample only that ancestor's background instead of the page behind it, so your card looks tinted but never frosted. The usual fixes are to move the glass panel out of the clipped parent (a portal or a sibling absolutely positioned element), or to remove the filter or transform on the ancestor. Rounded corners also need care: put border-radius on the same element that carries the backdrop-filter, not only on a wrapper, or the frosted area will spill past the curve in some engines.
Browser support is now broad. Chrome has supported backdrop-filter unprefixed since version 76, Edge since 79, Firefox since version 103 (July 2022, when it was enabled by default), and Safari since version 9 behind the -webkit- prefix, with unprefixed support arriving in Safari 18. Because a meaningful share of installed iOS devices still run older Safari builds, keep the prefixed line. Check current figures on caniuse.com (https://caniuse.com/css-backdrop-filter) and the property reference on MDN (https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter) rather than trusting any number quoted in a blog post. Where support is missing, the panel simply falls back to its rgba background with no frosting, so choose a tint opacity that still looks deliberate on its own. You can gate enhancements with @supports (backdrop-filter: blur(1px)).
Performance is the real cost. backdrop-filter forces the browser to snapshot the region behind the element, run a blur over it, and recomposite on every frame in which anything underneath changes, which is why a sticky frosted header over a scrolling page is one of the most expensive things you can ask a low-end phone to do. A couple of glass surfaces are fine. Dozens of overlapping ones, or a large blurred region that repaints during scroll, will drop frames. Keep the blurred area small, avoid animating the blur radius (animate opacity or transform instead), and profile on a real mid-range device rather than a desktop.
Accessibility deserves equal weight. Text sitting on a translucent panel inherits contrast from whatever happens to be behind it, which can change as the user scrolls, so a card that passes the WCAG 2.2 minimum of 4.5:1 for body text (3:1 for large text and UI components) over one part of a photo can fail badly a few hundred pixels down. Test against the worst-case backdrop, not the prettiest one. Raise the tint opacity, add a solid scrim behind text, or increase font weight until it passes. Heavy blur and transparency also cause discomfort for some users with vestibular or visual sensitivities, so respect prefers-reduced-transparency and prefers-reduced-motion by shipping a solid-background fallback. The Nielsen Norman Group guidance on glassmorphism (https://www.nngroup.com/articles/glassmorphism/) is a useful check before you commit to the style for critical UI.
When to use it
- Designing a frosted navigation bar or hero card that floats over a photo or gradient background.
- Building login modals, pricing cards or dashboard widgets in a modern glass UI style.
- Creating glass buttons and tooltips that sit on top of vivid imagery without hiding it.
- Prototyping a glassmorphism design quickly and exporting the exact CSS for your project.
- Matching a design handoff by dialing in the exact blur and tint opacity a mockup used, then copying the values back into Figma or your CSS file.
- Teaching or reviewing how backdrop-filter behaves, by changing one value at a time and seeing the result immediately over a busy backdrop.
How to use the Glassmorphism Generator
- Set the blur amount to control how frosted the glass looks. Start near 10px and adjust from there.
- Adjust transparency (tint opacity) so the background shows through to the degree you want, usually 10% to 25%.
- Pick a tint color and a background color, then raise saturation if the blurred backdrop looks washed out.
- Tune the border and shadow strength until the panel reads as a lit glass edge lifted off the page.
- Watch the live card update over the colorful backdrop, then press Copy to grab the generated CSS.
- Paste the CSS onto your element and confirm it has a gradient or image behind it, not a flat color.
Formula & method
Worked examples
A subtle white glass card with 10px blur, 20% tint opacity and a 30% border.
- Tint color white (255, 255, 255), opacity 20% gives background rgba(255, 255, 255, 0.2)
- Blur 10px and saturation 100% give backdrop-filter: blur(10px) saturate(100%)
- Border opacity 30% gives border: 1px solid rgba(255, 255, 255, 0.3)
- Shadow strength 25% gives box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25)
Result: A soft frosted card: rgba(255,255,255,0.2) background with a 10px backdrop blur and faint light border.
A cooler, more saturated glass panel with 18px blur and a colored tint.
- Tint color light blue (148, 187, 233), opacity 15% gives background rgba(148, 187, 233, 0.15)
- Blur 18px and saturation 180% give backdrop-filter: blur(18px) saturate(180%)
- Border opacity 40% gives border: 1px solid rgba(255, 255, 255, 0.4)
- Shadow strength 35% gives box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35)
Result: A vivid glass panel that keeps the colors behind it punchy thanks to the higher saturation.
A dark-mode glass panel that still passes contrast for white body text.
- Tint color near-black (17, 17, 17), opacity 45% gives background rgba(17, 17, 17, 0.45)
- Blur 20px and saturation 120% give backdrop-filter: blur(20px) saturate(120%)
- Border opacity 12% gives border: 1px solid rgba(255, 255, 255, 0.12), a hairline rather than a bright rim
- Check white text against the brightest patch of backdrop; at 45% tint the effective panel stays dark enough to clear 4.5:1
- Keep the -webkit-backdrop-filter line so older iOS Safari still frosts the panel
Result: A dark glass card: rgba(17,17,17,0.45) with a 20px blur, readable white text, and a subtle 12% rim.
Suggested glassmorphism settings by use case
| Use case | Blur | Tint opacity | Border opacity |
|---|---|---|---|
| Subtle card overlay | 6 to 10px | 15% to 25% | 20% to 30% |
| Strong frosted panel | 16 to 24px | 10% to 20% | 30% to 45% |
| Glass navigation bar | 10 to 16px | 30% to 50% | 15% to 25% |
| Glass button or tooltip | 4 to 8px | 20% to 35% | 30% to 50% |
| Dark-mode glass card | 16 to 24px | 40% to 55% (dark tint) | 8% to 15% |
| Full-screen modal scrim | 8 to 14px | 30% to 60% | 0% (no border) |
CSS properties used in glassmorphism
| Property | Role |
|---|---|
| background (rgba) | Semi-transparent tint that lets the backdrop show through |
| backdrop-filter: blur() | Frosts whatever sits behind the element |
| backdrop-filter: saturate() | Keeps the colors behind the glass from looking washed out |
| -webkit-backdrop-filter | Prefixed version needed by Safari before version 18 |
| border (rgba white) | Faint light edge that reads as a glass rim |
| border-radius | Rounds the panel and clips the frosted region to the same curve |
| box-shadow | Soft drop shadow that lifts the panel off the page |
| @supports (backdrop-filter: blur(1px)) | Gates the effect so unsupported browsers get a solid fallback |
Browser support for backdrop-filter (verify current data at caniuse.com/css-backdrop-filter)
| Browser | Unprefixed from | Notes |
|---|---|---|
| Chrome | 76 | Also on Android |
| Edge | 79 | Chromium-based builds |
| Firefox | 103 | Enabled by default in July 2022 |
| Safari (macOS) | 18 | Worked from Safari 9 with the -webkit- prefix |
| Safari (iOS/iPadOS) | 18 | Keep the -webkit- line for older devices |
| Opera | 64 | Chromium-based |
Common mistakes to avoid
- Using a solid or flat background behind the glass. backdrop-filter only frosts content that sits behind the element. Over a flat color there is nothing varied to blur, so you see the tint but no glass effect. Place glass panels over gradients, photos or overlapping shapes.
- Forgetting the -webkit- prefix. Safari needed -webkit-backdrop-filter until version 18, and plenty of installed iOS devices are still on older builds. Omitting it means the frosted effect silently fails for those users. This generator outputs both lines so you stay covered.
- Making the tint too opaque. If the background opacity is too high the panel becomes nearly solid and the see-through quality is lost. Keep tint opacity low (often 10% to 25% for light glass) and let the blur do the work.
- Ignoring text contrast against the worst-case backdrop. Light text on a translucent panel can fall below the WCAG 4.5:1 body-text minimum depending on what happens to be behind it, and that changes as the user scrolls. Test against the brightest and busiest part of the background, not the flattering part, then raise the tint or add a scrim behind text.
- Trapping the glass inside a clipped or filtered parent. An ancestor with overflow: hidden, a transform, or its own filter creates a stacking context, so the blur samples only that ancestor rather than the page behind it. The card looks tinted but never frosted. Move the panel outside the clipped wrapper or remove the ancestor filter.
- Blurring huge or animated regions. A large frosted area that repaints during scroll, or an animated blur radius, is one of the most expensive things you can render on a mid-range phone. Keep the blurred region small and animate opacity or transform instead of the blur value.
Glossary
- Glassmorphism
- A UI style using translucent, blurred panels with a light border to mimic frosted glass. Named around 2020 and popularised by macOS Big Sur and iOS.
- backdrop-filter
- A CSS property that applies graphic effects such as blur to the area behind an element, not its own content.
- filter
- The sibling property that applies the same effects to the element itself, including its text and children. Using it instead of backdrop-filter blurs your own content by mistake.
- rgba
- A color value with red, green and blue channels plus an alpha (opacity) channel from 0 (clear) to 1 (solid).
- Blur radius
- How far the backdrop blur spreads, in pixels. Higher values give a more heavily frosted look and cost more to render.
- Saturation
- A filter that boosts or reduces color intensity behind the glass, keeping colors lively at high blur.
- Stacking context
- An isolated painting layer created by properties like transform, filter, opacity or overflow. backdrop-filter can only sample what is painted behind it within its own context.
- @supports
- A CSS feature query that runs a block of rules only when the browser understands a given declaration, used to give unsupported browsers a solid fallback.
- prefers-reduced-transparency
- A media query that reports when the user has asked their system to reduce translucency, a signal to serve a solid panel instead of glass.
Frequently asked questions
What is glassmorphism in CSS?
Glassmorphism is a design style that makes an element look like frosted glass: a translucent, blurred panel over a colorful background, with a faint light border. In CSS it is created with a semi-transparent rgba background, the backdrop-filter blur property and a thin white border.
How do I create a frosted glass effect in CSS?
Give the element a low-opacity rgba background, add backdrop-filter: blur() so the area behind it is frosted, then add a 1px nearly-white semi-transparent border and a soft box-shadow. This glassmorphism generator builds all of those lines for you as you adjust the sliders.
Why is my backdrop-filter not working?
The most common reason is that there is nothing colorful behind the element to blur, so a flat background shows no effect. The next most common is a parent with overflow: hidden, a transform, or its own filter, which creates a stacking context so the blur samples only that parent. A missing -webkit-backdrop-filter prefix on older Safari is the third cause.
Do I need the -webkit-backdrop-filter prefix?
Yes, for the widest support. Safari only supported the unprefixed property from version 18, and many installed iOS devices still run older builds that need -webkit-backdrop-filter. This tool outputs both the standard property and the prefixed one.
Is glassmorphism bad for performance?
backdrop-filter is GPU intensive because the browser must snapshot, blur and recomposite the region behind the element whenever anything underneath changes. A few glass panels are fine. A large frosted header over a scrolling page, or dozens of overlapping panels, can drop frames on mid-range phones.
Does glassmorphism work in all browsers?
Not all, but nearly. backdrop-filter is unprefixed in Chrome 76+, Edge 79+, Firefox 103+ and Safari 18+, with prefixed support in Safari back to version 9. Older browsers fall back to the plain semi-transparent background with no frosting, so pick a tint opacity that still looks intentional without blur. Check caniuse.com/css-backdrop-filter for current figures.
What blur value should I use for glassmorphism?
Start at 10px. Use 4 to 8px for small elements like buttons and tooltips, 6 to 12px for cards and navigation bars, and 16 to 24px for a heavily frosted hero panel or modal. Above roughly 30px the backdrop turns into an undifferentiated wash and you lose the sense of glass.
Is glassmorphism accessible?
It can be, but it takes work. Text on glass must still meet WCAG 2.2 contrast minimums of 4.5:1 for body text and 3:1 for large text and UI components against the worst-case backdrop, not the best-case one. Add a scrim or raise the tint opacity behind text, and honour prefers-reduced-transparency with a solid fallback for users who find blur and translucency uncomfortable.
What is the difference between backdrop-filter and filter?
filter applies the effect to the element itself, including its own text and children, so blurring with it makes your content unreadable. backdrop-filter applies the effect only to whatever is painted behind the element, leaving the content on top sharp. Glassmorphism needs backdrop-filter.
How do I add a fallback for browsers without backdrop-filter?
Set a more opaque solid or rgba background as the default, then wrap the glass rules in @supports (backdrop-filter: blur(1px)) and lower the opacity inside that block. Browsers that understand the property get frosted glass; the rest get a readable solid panel instead of a washed-out one.
Can I use glassmorphism in Tailwind CSS?
Yes. Tailwind ships backdrop utilities, so a card is roughly bg-white/20 backdrop-blur-md backdrop-saturate-150 border border-white/30 rounded-2xl shadow-xl. If you prefer exact numbers, generate the values here and drop them into arbitrary-value classes such as backdrop-blur-[18px].
Is this glassmorphism generator free and does it upload my data?
It is free with no sign-up, and nothing is uploaded. Every value is computed in your browser as you move the sliders, and the CSS you copy is generated locally.