Glassmorphism Generator
Build frosted-glass cards with blur, translucent fill, border glow and copied CSS, Tailwind or React.
Card and style
1 line · 13 chars · 12 px blurDouble-click a slider label to restore its default.
Scene
Filter
Border and card
Shadow and highlight
Preview and code
CSS · 35 linesBlur 12 px, saturation 1.4, brightness 1, rgba(255, 255, 255, 0.12) overlay, radius 16 px, 0 by 8 px shadow, text #ffffff.
/* Place the card over the preview scene: .glass-scene { background: linear-gradient(135deg, #1b2744 0%, #4f6ea8 45%, #b58cc9 100%); } */
.glass-card {
--glass-blur: 12px;
--glass-saturate: 1.4;
--glass-brightness: 1;
--glass-fill: rgba(255, 255, 255, 0.12);
--glass-border: 1px solid rgba(255, 255, 255, 0.25);
--glass-radius: 16px;
--glass-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
--glass-text: #ffffff;
--glass-font-size: 16px;
width: 360px;
min-height: 180px;
box-sizing: border-box;
padding: 24px;
color: var(--glass-text);
font-size: var(--glass-font-size);
border-radius: var(--glass-radius);
background: var(--glass-fill);
border: var(--glass-border);
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
box-shadow: var(--glass-shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.glass-card {
/* Fallback alpha 12% -> 56% (always higher without blur). */
--glass-fill: rgba(255, 255, 255, 0.56);
--glass-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
}
Details
The Glassmorphism Generator composes the complete frosted-glass stack — backdrop blur, saturation, brightness, a translucent tint, a 1 px gradient border and a layered shadow — into one copyable component. Tune each value with sliders and color pickers, watch the card update over a bundled gradient, a solid color or your own uploaded image, then copy plain CSS, Tailwind arbitrary-value utilities or a React inline-style object. The CSS flavor emits the real -webkit-backdrop-filter declaration and an @supports fallback that checks both prefixed and unprefixed properties, so Safari doesn't get a needlessly opaque fallback on top of a working blur. Everything runs in your browser; uploaded images stay as local object URLs and are never uploaded.
More examples
Classic frosted card
Blur: 12px · Saturation: 1.4 · White fill: 12% → .glass-card with backdrop-filterThe default look: enough blur to read the scene behind the card without washing out the text.
Gradient fill
White 16% → 8% at 120° → linear-gradient overlayA directional overlay mimics real glass, where the top edge catches more light.
Border glow
border: 1px solid transparent + two background layers (padding-box / border-box)The two-layer technique gives a rounded gradient border; border-image would ignore border-radius.
Fallback for older browsers
12% → 56% overlay inside @supports not ((backdrop-filter …) or (-webkit-backdrop-filter …))Without blur the overlay must carry contrast; the fallback alpha is always higher than the requested one.
Examples
Classic frosted dashboard card
Blur 12 px · Saturation 1.4 · White 12% · Radius 16 px · Aurora gradientbackground: rgba(255, 255, 255, 0.12); backdrop-filter: blur(12px) saturate(1.4) brightness(1); border: 1px solid rgba(255, 255, 255, 0.25);The default look balances readable text with a visible scene behind the card.
Warm gradient fill
Gradient overlay on · White 16% → 8% at 120° · Sunset backgroundbackground: linear-gradient(120deg, rgba(255, 244, 230, 0.16), rgba(255, 244, 230, 0.08));A directional fill reproduces the brighter top edge of real frosted glass.
Border glow over a photograph
Upload photo.jpg · Gradient border on · Border alpha 55% · Highlight alpha 35%background: <fill> padding-box, linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.14)) border-box;The two background layers create a rounded gradient border without border-image losing the radius.
About this tool
Glassmorphism is the look of a translucent panel placed over a colorful or photographic background: the panel blurs and saturates what sits behind it, a faint tint carries the brand color, a thin bright edge catches the light, and a soft shadow lifts the card off the scene. The Glassmorphism Generator assembles that whole stack from individual controls — blur radius, saturation, brightness, tint color and alpha, optional gradient fill, radius, border, shadow and inset highlight — into one CSS class you can copy into a project.
The preview renders a real card over a bundled gradient, a solid color, or an image you choose from your device. Uploaded images stay in the browser as object URLs: nothing is sent to a server. The preview card is decorative, and a screen-reader summary announces the key values; every slider and color input is labeled, and double-clicking a slider label restores its default.
Three output flavors cover common workflows. Plain CSS emits a single .glass-card class whose tunables are custom properties, the actual -webkit-backdrop-filter declaration, and an @supports fallback. Tailwind emits arbitrary-value utilities plus a companion CSS block, because utilities alone do not reliably carry the Safari prefix or the fallback. React emits a style object with WebkitBackdropFilter and the same companion CSS, since inline styles cannot express @supports at all.
The fallback deliberately uses a higher overlay alpha than the main design. The generator increases alpha by at least 15 percentage points and at least half of the remaining headroom, capped at 100%, so a 12% overlay becomes 56% when blur is unavailable. That keeps text legible, and unlike a fixed 85% cap it never makes the fallback weaker than the design it replaces. The @supports gate checks the prefixed property too, so Safari 9–17 — which supports only -webkit-backdrop-filter — does not receive an opaque fallback over a working blur.
What this tool does not do
- Exports one component's CSS, not a full page layout; a separate scene element supplies the background.
- Uploaded images are previewed locally and never uploaded, so the image itself cannot be embedded in shared CSS — only its file name is kept.
- The fallback simulates browsers without backdrop-filter by raising alpha; it cannot reproduce the exact appearance of a filtered backdrop.
- No image-editing, palette extraction or saved custom presets; the six bundled looks and URL-shared settings are the supported workflow.
How to use this tool
Choose a scene
Pick one of six gradient presets, a solid background color, or upload a PNG, JPG, WEBP or GIF up to 5 MB. The preview uses a CSS background with background-size: cover.
Tune the glass
Set blur, saturation and brightness under Filter, then choose a tint color and fill alpha. Turn on Gradient overlay for a directional white-to-transparent fill.
Shape the card
Adjust corner radius, border width, border color and alpha under Border and card. Turn on Gradient border for a rounded 1 px highlight border, then set text color and size to check legibility.
Add shadow and fallback
Set the shadow offsets, blur, spread, color and alpha, optionally keep the inset highlight, and leave Include fallback on for browsers without backdrop-filter.
Copy or download
Switch between CSS, Tailwind and React tabs and use the panel's copy or download action. Settings are mirrored into the URL without the uploaded image, so a look can be shared safely.
Use cases
Dashboard panels
Design a translucent sidebar or metric card over a branded gradient, then paste the finished class into a component with values already tuned for the target card size.
Hero sections and landing pages
Try a dark photographic scene with a white glass panel, adjust text color and fill alpha against the image, and export the CSS once the copy is legible.
Teaching backdrop-filter
Turn on Simulate fallback to show students exactly what disappears when backdrop-filter is unsupported and how a higher-alpha overlay compensates.
Output flavors and what each one carries
| Flavor | What you get |
|---|---|
| CSS | One .glass-card class with custom properties, -webkit-backdrop-filter, and an @supports fallback rule |
| Tailwind | Arbitrary-value utilities such as backdrop-blur-[12px] plus companion CSS for the prefix and fallback |
| React | Inline style object with WebkitBackdropFilter plus companion CSS, because @supports cannot be inline |
| Fallback gate | @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) |
| Fallback alpha | max(alpha + 15, alpha + (100 − alpha) / 2), capped at 100% — always higher |
| Image scene | background: url(...) center / cover no-repeat; only the file name is kept in shared state |
Gradients and colors are in-browser presets; no fonts, scripts or images are fetched from third parties.
Common mistakes
Mistake:Forgetting the -webkit- prefix for Safari.
Fix:The generated CSS emits both backdrop-filter and -webkit-backdrop-filter, and Tailwind/React flavors include a companion CSS block; copying only a utility class can lose the prefix.
Mistake:Using a fallback gate that checks only the unprefixed property.
Fix:Safari 9–17 supports only the prefixed form. The generator's gate ORs both properties so the higher-alpha fallback never stacks on a working blur.
Mistake:Expecting object-fit: cover to work on a CSS background.
Fix:object-fit applies to replaced elements like <img>. For an exported .glass-scene background use background-size: cover, which the generated comment explains.
Mistake:Using a very low fill alpha over a busy image.
Fix:Raise fill alpha or choose a darker overlay; without enough contrast, text over a photograph becomes unreadable even with blur. The tool warns when this combination is detected.
Mistake:Assuming a flat 1 px border can be a gradient with border-image.
Fix:border-image ignores border-radius. The gradient-border option layers a fill clipped to padding-box over a gradient clipped to border-box, preserving rounded corners.
Frequently asked questions
Does backdrop-filter work in all browsers?
It works in current Chrome, Edge, Safari and Firefox, but the history matters. Safari supported only -webkit-backdrop-filter through version 17, and older Firefox had no support at all. The generated CSS therefore emits both the standard and the -webkit- declaration, and its @supports fallback checks both properties so Safari never gets an unnecessary opaque overlay on top of a working blur.
Why is my glass card not blurring?
Check three things. The element behind the card must actually have content or a background — a completely blank parent gives nothing to blur. The card needs a translucent fill, such as rgba(255, 255, 255, 0.12), because a fully opaque background hides the backdrop. Finally, the browser must support backdrop-filter (or its -webkit- prefixed form); use the tool's Simulate fallback switch to see what the no-support case looks like.
How do I add a fallback for browsers without backdrop-filter?
Leave Include fallback on. The CSS flavor adds an @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) block that replaces the translucent fill with a more opaque one. The alpha increases by at least 15 percentage points and at least half of the remaining headroom, so a 12% overlay becomes 56% and text stays readable without blur. Tailwind and React outputs include the same CSS block as companion CSS because utilities and inline styles cannot express @supports.
What alpha should the overlay use?
For white text over a mid-tone gradient, 10–20% white with 10–30 px of blur is a good starting point. Over a busy photograph, raise the fill alpha toward 25–40% or darken the image; the tool warns when a low alpha is combined with an image background. If the card becomes invisible because alpha and blur are both at zero, raise either value. Alpha is a percentage here and is converted to a 0–1 rgba value in the exported CSS.
Can I use an image background?
Yes. Choose Image and upload a PNG, JPG, WEBP or GIF up to 5 MB; you can also drag one onto the upload control. It stays in your browser as an object URL and is never uploaded. The exported CSS includes a .glass-scene comment with background: url("your-image.webp") center / cover no-repeat — use background-size: cover, since object-fit: cover applies to <img> elements rather than CSS backgrounds. Only the file name is kept in URL-shared settings, never the image data.
Can I copy Tailwind or React instead of plain CSS?
Yes — switch the output tabs. Tailwind emits arbitrary-value utilities like backdrop-blur-[12px] and backdrop-saturate-[140%]; React emits an inline style object with WebkitBackdropFilter. Both include a companion CSS snippet for the vendor declaration and @supports fallback, because neither utilities nor inline styles can guarantee those on their own. Paste that block into your global stylesheet once and give the element the glass-card class.
References & standards
Related tools
Aspect Ratio Calculator
Calculate dimensions and ratios for images and videos.
Border Radius Generator
Visually craft CSS border-radius values — including the advanced 8-value slash syntax for organic blob shapes — with a live preview and one-click copy.
Box Shadow Generator
Visual CSS box-shadow generator. Create beautiful shadows with live preview and copy the CSS code.
CSS :has() Selector Playground
Try the CSS :has() parent selector on live editable HTML and CSS, with ten patterns, dropped-rule detection and specificity notes.
CSS Button Generator
Design buttons with hover, active, focus-visible and disabled states — gradients, shadows, borders, icons — and copy clean CSS or Tailwind.
CSS Clip-Path Generator
Draw clip-path shapes visually: drag polygon points, tune circle/ellipse/inset presets, paste an SVG path and copy responsive CSS.