What is glassmorphism in CSS?
Glassmorphism is the frosted glass look: a translucent panel that blurs whatever sits behind it, with a thin light edge and a soft shadow. It is built with the backdrop-filter property, which applies effects such as blur() and saturate() to the area behind an element instead of the element itself. Pair it with a semi-transparent background color and you get a card that lets the page show through, softly out of focus.
This generator builds that recipe from sliders. You choose the glass color and its opacity, how much to blur and saturate what is behind, the corner radius, the edge opacity and the shadow opacity. The preview shows the card over a colorful background, in light and in dark, and the tool writes the CSS including the -webkit-backdrop-filter line that older Safari needs. It can also output Tailwind classes. It runs in your browser and nothing is sent anywhere.
How to make a glass card
- Pick a starting point under "Starting points": Frost, Smoke, Tint or Clear.
- Set the "Glass color" with the color picker or by typing a hex value.
- Move "Glass opacity". Low values (8 to 30) are very see-through, high values hide the background.
- Adjust "Blur of what is behind" (0 to 40 px) and "Saturation of what is behind" (0 to 300%, where 100% leaves colors unchanged).
- Set the "Corner radius", the "Edge opacity (0 = no border)" and the "Shadow opacity (0 = no shadow)".
- Check the preview on both backgrounds. Under "Format" pick CSS or Tailwind and copy with "Copy CSS". "Reset" brings back the default Frost values.
Examples
The default frost card
With the default values (white, 25% opacity, 12 px blur, 160% saturation, 16 px radius, 30% edge, 10% shadow) the tool writes:
background: rgba(255, 255, 255, 0.25);
border-radius: 16px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(12px) saturate(160%);
-webkit-backdrop-filter: blur(12px) saturate(160%);
border: 1px solid rgba(255, 255, 255, 0.3);The same card as Tailwind classes
Switch "Format" to Tailwind and the same settings become:
bg-[rgba(255,255,255,0.25)] backdrop-blur-[12px] backdrop-saturate-[160%] rounded-[16px] border border-[rgba(255,255,255,0.3)] shadow-[0_4px_30px_rgba(0,0,0,0.1)]A dark smoked panel
The Smoke preset uses the color #141413, 45% opacity, 16 px blur and 140% saturation:
background: rgba(20, 19, 19, 0.45);
border-radius: 20px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
backdrop-filter: blur(16px) saturate(140%);
-webkit-backdrop-filter: blur(16px) saturate(140%);
border: 1px solid rgba(20, 19, 19, 0.15);Nearly clear glass
The Clear preset sets the shadow to 0 and saturation to 100%, so those lines disappear from the output. Only a light blur and a bright edge remain:
background: rgba(255, 255, 255, 0.08);
border-radius: 24px;
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
border: 1px solid rgba(255, 255, 255, 0.4);Common mistakes
- Nothing behind the card. Blur needs content to blur. Over a flat white page the effect is invisible. Put an image, a gradient or colored shapes behind it, for example one from the gradient generator.
- Opaque background. If the glass opacity is high, or the background has no alpha, the blur has nothing to show through.
- Putting
overflow: hiddenor a transform in the wrong place. Some parent setups stopbackdrop-filterfrom working. Test inside your real layout. - Dropping the
-webkit-line. Safari before 18 only understands the prefixed property. Keep both lines. - Poor text contrast. A translucent card over a busy image can make text hard to read. Raise the opacity, add blur, or darken the glass, and check the contrast.
- Too much blur on a large area. Heavy
backdrop-filteron big or many elements can slow down scrolling on weak devices.
FAQ
Does backdrop-filter work in every browser?
It works in all current browsers. Safari before version 18 needs the -webkit-backdrop-filter line, which this tool always writes.
How do I change the color of the glass?
Use "Glass color". With a color other than white, the edge takes the same color. Pick a color from the color converter if you need it in a specific format.
Why does my card look flat?
Usually because the area behind it is a single color. Place the card over an image or a gradient, and raise "Saturation of what is behind" to make colors stand out.
Can I use the result in React?
Yes. Paste the CSS into the CSS to React style converter to get a style object. To add depth with more shadow layers, see the box-shadow generator.