CSS Free, no sign-up

CSS glassmorphism generator

Adjust backdrop blur, color saturation, glass opacity and subtle edge highlights — get clean, modern CSS glassmorphism code in seconds.

Result
Ready-made CSS
.glass-card {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

How to use it

  1. Select a preset (Frost White, Obsidian Dark, Neon, Cyber, Pearl) or fine-tune parameters manually.
  2. Use backdrop-filter: blur() to blur underlying layers and saturate() to make colors beneath the glass vibrant.
  3. Pick a glass tint and transparency (rgba(...)) — 10% to 25% opacity yields the most realistic frosted look.
  4. Add a delicate edge reflection via border and subtle depth via box-shadow, then click “Copy”.

How it works

What is Glassmorphism and how is it made?

Glassmorphism is a popular modern UI design style that simulates translucent frosted glass. The effect is created by balancing three CSS rules: background blur behind the element (backdrop-filter: blur), translucent background color (rgba), and a 1px border with a soft white or bright opacity that imitates light catching the beveled edge of glass.

.glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

filter vs backdrop-filter

A frequent mistake is writing filter: blur(). filter: blur() blurs the element itself, turning text and buttons into an unreadable smudge! backdrop-filter: blur() leaves all contents inside the card perfectly sharp, while only blurring whatever graphics lie underneath the card.

/* Correct: sharp typography, blurred backdrop */
backdrop-filter: blur(12px) saturate(160%);
-webkit-backdrop-filter: blur(12px) saturate(160%);

The Edge Highlight

Real glass catches light along its cut edges. In CSS, we emulate this reflection with border: 1px solid rgba(255, 255, 255, 0.3). Without this border, the glass card looks like a flat translucent wash; with it, it feels tangible and elevated.

Browser compatibility & the Safari prefix

backdrop-filter is supported in all modern browsers. However, WebKit (Safari on macOS and iOS) still requires the -webkit-backdrop-filter prefix. Always output both declarations for reliable cross-browser rendering.

FAQ

Why is my text blurry?

You used filter: blur() instead of backdrop-filter: blur(). The latter keeps all nested text and buttons crystal-clear.

Why does the glass look invisible on plain white?

Glass needs colorful elements, photos, or patterns underneath to be visible. On a solid flat background there is nothing to refract.

Is the -webkit- prefix still required?

Yes, for Apple Safari on iOS and macOS, -webkit-backdrop-filter is strictly required.

Does glassmorphism harm rendering performance?

Moderate blurs (12px–20px) run smoothly at 60fps on modern hardware. Avoid applying massive blurs (50px+) to dozens of simultaneously animated cards on mobile.

This topic in the HTML & CSS course

More CSS tools

CSS gradient generator Linear, radial and conic gradients: pick colors, angle and stops, then copy the code. Flexbox generator and playground Try flex properties on a container and its items: direction, alignment, gaps and ready-made CSS. CSS Grid generator Set columns and rows, gaps and alignment, then copy the ready-made grid code. CSS box-shadow generator Pick offset, blur, color and layers for a shadow, then copy the ready-made box-shadow code. Cubic-bezier generator Drag the control points of an easing curve and copy the ready-made CSS transition. SVG animation generator Pick a shape and an effect — get inline SVG and CSS keyframes ready to paste. CSS specificity calculator Type selectors to see their (a,b,c) weight, a color-coded breakdown and which rule wins. CSS box model visualizer See content, padding, border and margin as a DevTools-style diagram and copy the CSS. CSS transform generator Move, rotate, scale and skew an element, see its original position and copy the code. CSS clamp() calculator Enter min and max font size and viewport width — get a ready clamp() for fluid typography. Color contrast checker (WCAG) Check text and background contrast against WCAG AA and AAA, and fix a failing pair of colors. CSS clip-path generator Polygons, bevels, arrows and circles: drag control points on the live canvas and copy ready-made CSS. CSS border-radius (Blob) generator Organic shapes and 8-value border-radius: tune horizontal and vertical corner radii. CSS Stacking Context & z-index Visualizer Why z-index: 9999 fails! Explore CSS Stacking Contexts in interactive 3D exploded layers with transform, opacity and isolation triggers. CSS aspect-ratio & object-fit Generator Eliminate squished images & CLS layout jumps: live aspect-ratio proportions and interactive object-position focal point. CSS Filters Studio & Generator Photo effects without design tools: blur, contrast, hue-rotate, sepia, and trending Instagram-style presets. OKLCH Color Picker & Palette Generator Perceptually uniform brightness & vibrant Display P3 colors: OKLCH picker, design system scales, and fallbacks. CSS Scroll-driven Animations Generator Scroll-linked animations without JavaScript: animation-timeline scroll() & view(), reading progress bar & reveal on scroll. CSS Container Queries (@container) Generator Beyond viewport media queries: components adapt directly to their parent container width. Live resizer & @container rules.
WhatsApp