CSS Glassmorphism Generator

Free toolNo sign-up
Surface:
Glass surface
Tune blur, saturate, brightness, and tint — the four knobs that turn flat plastic into refractive glass.
Blur20px
Sat160%
Bright100%
TintNone
⚠ 2.3:1

About this generator

Most CSS glassmorphism generators give you a blur slider, a transparency slider, and a copy button. The output looks like flat plastic, not glass — and on a busy background, your text becomes unreadable. This generator was rebuilt to ship the full vibrancy formula Apple uses: blur, saturation, brightness, and tint, all tunable in real time on nine different surface presets.

Four things make this different from every other free glass generator. Saturation + brightness controls — the missing knobs that turn flat glass into refractive glass. Background-aware WCAG contrast scoring — every background sample is alpha-blended through your glass and the resulting effective surface is checked against your text color, so contrast failures get flagged before you ship. Reduced-transparency fallback — the export includes a @media (prefers-reduced-transparency: reduce) block that swaps the glass for a solid surface when the user has accessibility transparency reduction enabled. Seven framework exports — CSS, SCSS @mixin, Tailwind arbitrary classes, CSS Modules, styled-components, React inline-style, and Vue scoped CSS.

Curated preset library covers the full glassmorphism timeline: Frosted Card and Subtle Pane for the 2020-era flat aesthetic; Crystal Modal and Heavy Frost for stronger blur applications; Tinted Violet and Tinted Rose for brand-color glass; Liquid Glass for the iOS 26 / macOS Tahoe Apple style; Vibrancy Pane for the macOS app-window classic.

Permalink: every adjustment encodes into the URL hash, so you can bookmark a tuned glass or send it to a teammate. No login, no watermark, no paywall. Free and MIT-licensed.

Why use this Glassmorphism Generator?

Nine live backgrounds
Glass needs vivid backdrop to read as glass. Switch between aurora, sunset, mesh, tide, editor, photo still, plain, white, and pastel to verify your design holds up everywhere — including light backgrounds where most glassmorphism tools fall apart.
Full vibrancy formula
Blur + saturate + brightness + tint — the four knobs Apple uses for iOS / macOS vibrancy. Saturate > 100% bleeds the color underneath through brighter; brightness adds the highlight that mimics real refraction. Most generators ship blur-only and produce flat plastic.
Seven export formats
CSS, SCSS @mixin, Tailwind arbitrary classes (v3.3+), CSS Modules, styled-components, React inline-style, Vue scoped CSS. Skip the manual conversion; copy what your stack uses.
Reduced-transparency fallback
Toggle the accessibility option and the export includes a @media (prefers-reduced-transparency: reduce) block that swaps glass for a solid surface when the user has the OS accessibility setting on. Roughly 4-8% of users need it.
A
WCAG contrast scoring
Every background sample is alpha-blended through your glass and contrast-checked against your text color. Worst-case ratio surfaced live; AA / AAA badges flip green or red as you tune.
Share via URL
Every recipe encodes into the URL hash. Copy the link to send a tuned glass to a teammate — they open it and see the exact same surface, no account needed.

How to use this generator

01
Pick a preset to start
Eight curated recipes covering the full glassmorphism timeline — Frosted Card (2020 flat), Crystal Modal, Subtle Pane, Heavy Frost, Tinted Violet / Rose, Liquid Glass (iOS 26 / Tahoe), macOS Vibrancy. Pick one as a starting point and tune from there.
02
Choose a surface
Click a Surface pill above the preview — nine backdrops including light, dark, vivid mesh, code editor, and pastel. Glass without color behind it looks like a faint outline; verify your design against the worst-case background you expect.
03
Tune the vibrancy
Blur is the depth of the frost. Saturate (100-250%) is what turns flat plastic into refractive glass — the higher, the more the colors underneath bleed through brighter. Brightness (80-130%) adds a subtle highlight that mimics real light catching the surface.
04
Add a tint
Optionally tint the glass with violet, rose, cyan, teal, or amber. Tinted glass works well for color-coded categories or brand-aligned chrome.
05
Verify contrast
Watch the AA / AAA score in the right rail as you adjust. Failing samples turn red — raise bg alpha, change tint, or switch text color until every sample passes 4.5:1. The worst sample is what determines accessibility, not the average.
06
Enable reduced-transparency
Toggle the Accessibility option. The export then ships a @media (prefers-reduced-transparency: reduce) block that swaps glass for a solid surface for users with the OS accessibility setting on. This satisfies WCAG 2.2 1.4.3 and 1.4.11 trivially.
07
Export and ship
Switch the export tab to your stack (CSS, SCSS, Tailwind, Modules, styled, React, Vue) and copy. Or use the Share button in the topbar to send the URL.

Glass property reference

PropertyTypical valueWhat it does
backgroundrgba(TINT, ALPHA)Translucent tint sits on top of the page background — alpha 0.05–0.18 is the sweet spot for "frosted" rather than "ghost" or "milk". Tint defaults to white (255,255,255) but accepts any brand color.
backdrop-filterblur(N) saturate(N%) brightness(N%)Blurs the pixels behind, then re-saturates and re-brightens them. Saturate > 100% is the secret ingredient that turns flat glass into refractive Apple-style glass; brightness adds the subtle highlight.
-webkit-backdrop-filtersame as backdrop-filterSafari required the prefix until ~Safari 17. Always include both for cross-browser support.
border1px solid rgba(255,255,255,ALPHA)A hairline rim catches light at the glass edge. 0.18–0.32 alpha; thicker for "premium" weight, thinner for subtle.
border-radius10–22pxSoft corners read as polished glass. Sharp corners (0–4px) read as architectural panels. iOS Liquid Glass uses 22px+ for prominent pills.
box-shadow0 8px 32px rgba(0,0,0,0.18)Floats the glass off its background. Keep it soft and dark — competing color shadows fight the glass effect.
@media (prefers-reduced-transparency: reduce)fallback solid colorDetects when a user has the OS accessibility transparency-reduction setting on. The generator emits a fallback block that swaps glass for a solid tinted surface — ~4-8% of users need this for readability.

Common glass patterns

Frosted card
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
Tinted violet glass
.glass-violet {
  background: rgba(139, 92, 246, 0.18);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 22px;
}
Heavy frost (modal)
.glass-modal {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  border-radius: 16px;
  padding: 26px;
}
Liquid Glass (iOS 26 / macOS Tahoe)
.glass-liquid {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(30px) saturate(220%) brightness(110%);
  -webkit-backdrop-filter: blur(30px) saturate(220%) brightness(110%);
  border: 1.5px solid rgba(255, 255, 255, 0.40);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

@media (prefers-reduced-transparency: reduce) {
  .glass-liquid {
    background: #2a2238;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

Pro tips

01
Glass needs vivid backdrop
On a flat grey or white background, glass is invisible. Place glass over photos, gradients, or busy mesh — the more color behind, the more "glass" reads as glass.
02
Blur is GPU-accelerated, but layered
backdrop-filter is GPU-friendly, but stacking 4+ blurred surfaces compounds cost. On large surfaces (full-screen overlays) consider reducing blur to 12–16px.
03
Always set saturate too
Pure blur drains color from the underlying pixels. Adding saturate(160–180%) pumps the chroma back up — the difference between "drab fog" and "premium frost".
04
Test on real content
Glass on a static gradient looks fine. Glass over scrolling video, dark code, or a UI screenshot reveals contrast issues. Use the contrast checker against your worst-case background.
?

Frequently asked questions

01

Why does this glassmorphism generator have saturation and brightness controls when most don't?

Because real glass refracts color. The classic CSS glassmorphism recipe — backdrop-filter: blur(20px) — produces a flat, washed-out glass that looks lifeless on vivid backgrounds. The macOS / iOS vibrancy effect Apple ships uses an additional saturate(180%) to amplify the color behind the glass so the surface picks up brand identity from whatever it's sitting over. Brightness adds a subtle highlight that mimics real refraction. Generators that ship blur-only produce plastic glass; this one ships the full vibrancy formula (blur + saturate + brightness + tint + border-light) so the output feels like Apple's, not 2020's flat-blur trend.

02

What is prefers-reduced-transparency, and why should I care?

It's a CSS media query — set when a user enables 'Reduce transparency' in their OS accessibility settings (macOS Accessibility > Display, iOS Settings > Accessibility > Display & Text Size > Reduce Transparency, Windows Settings > Accessibility > Visual Effects). About 4-8% of users — primarily those with low vision, vestibular sensitivity, or migraine triggers — enable it because glass effects make text harder to read. The generator's export includes a @media (prefers-reduced-transparency: reduce) block that swaps your glass for a solid background using your chosen tint — so accessibility-conscious users get a readable surface instead of broken glass. WCAG 2.2 1.4.3 (Contrast) and 1.4.11 (Non-text Contrast) become trivially satisfiable when this fallback ships.

03

How does the Tailwind glassmorphism export work? Tailwind has backdrop-blur — why arbitrary values?

Tailwind v3.3+ ships backdrop-blur-{sm,md,lg,xl,2xl,3xl} (named scales) and backdrop-saturate-{50,100,150,200}. Those cover ~80% of cases. The arbitrary-value syntax — backdrop-blur-[22px] backdrop-saturate-[185%] — is for the other 20% where you need a specific value like 22px instead of one of the named scales. The Tailwind export emits arbitrary values for everything customizable so the output stays accurate to your slider position; if you'd rather use named utilities, the CSS export gives you the raw declaration you can paste into a Tailwind @layer components block.

04

Why are some preset backgrounds gradients and some look like 'photos'? Real photos behind glass would look better.

The preview canvas uses CSS-only backgrounds (gradients, mesh, repeating patterns) for three reasons: (1) zero asset weight — the generator works offline, no image downloads, no DPI banding; (2) reproducibility — what you see is exactly what ships, no 'we picked a stock photo with different colors'; (3) compatibility — every modern browser renders these surfaces identically, so the preview matches the real-world result. For users testing on actual product photography: build the glass with the gradient preset, then drop the exported CSS into your site over your real photo — the glass effect renders identically regardless of what's underneath.

05

Can I save my glass to my project as a CSS class, or do I have to copy it every time?

Both work. Quick path: copy the CSS export and paste under your .glass class. Tokenized path: copy the SCSS export which provides a @mixin glass you can include from any component. Tailwind path: paste the class string into your component template. The URL hash also encodes the full state — bookmark a tuned glass card for your design system docs, link to it from your Storybook story, share it with a teammate.

06

Does the saturation control work in Safari? backdrop-filter has had spotty support.

Yes, fully. Safari has shipped backdrop-filter since version 9 (2015) and saturate() since the same release — the export includes the -webkit-backdrop-filter prefix automatically. The single browser to watch was Firefox: it didn't ship backdrop-filter until version 103 (July 2022). Older Firefox gracefully degrades to your chosen background color without breaking the layout. If you need a Firefox <103 fallback that LOOKS like glass, the SCSS export's @supports query path swaps in a slightly-tinted solid surface instead — fully covered.

07

How is this different from the Glassmorphism.com generator or the dozens of others?

Glassmorphism.com (the first viral glass generator) ships blur + bg alpha + radius and nothing else — no saturate, no brightness, no contrast checker, no accessibility fallback, no multi-format export. This generator adds saturate, brightness, contrast scoring against every background sample, the prefers-reduced-transparency fallback, seven framework export targets (CSS, SCSS, Tailwind, CSS Modules, styled-components, React, Vue), URL-hash persistence, and a curated preset library spanning glassmorphism + neo-glassmorphism + iOS liquid-glass aesthetics. For users coming from Hype4's glassmorphism playground or ui.glass: same baseline, plus six features they don't ship.

08

What's the 'liquid glass' aesthetic? Is that different from regular glassmorphism?

Liquid glass — popularized by iOS 26 and macOS Tahoe — is glassmorphism plus three extra cues that make the surface feel like real glass rather than a blurred photo: (1) higher saturate (180-220%) so the color underneath BLEEDS through brighter, (2) a subtle inner border-light that mimics light catching the top edge, (3) very low background alpha (0.05-0.10) so the glass is mostly transparent. The 'Liquid Glass' preset in this generator is calibrated to those Apple-published values. For 2020-era flat glassmorphism (blur + 15-20% alpha + no saturate), use the 'Frosted Card' or 'Subtle Pane' presets.

See it used in real designs

Browse hand-coded collections that put this tool to work.

Search CodeFronts

Loading…