CSS Glassmorphism Generator
Frosted Glass with a Contrast Check

Build a frosted glass card and copy the CSS. Tune blur, saturation, tint, border, radius and shadow over a gradient or your own image, get backdrop-filter with its -webkit- line, a fallback rule, a contrast warning and Tailwind classes. 100% client-side. Zero data stored.

A frosted glass card over blurred green, cyan and magenta circles above the code backdrop-filter: blur(12px);

CSS Glassmorphism Generator Tool

Make a Frosted Glass Card

Presets

16px
180%
15%
30%
20px
32px

Your image is read in this browser and never uploaded. It also cannot be saved in a link.

Frosted glass card

Text on glass has to stay readable over every part of the background. Check the contrast figure below as you change the tint.

Read more

This is an estimate. It lays the tint over each color of the background (for an image, 16 sampled areas) and reports the worst ratio. A real blur averages neighboring colors, and the decorative circles are not counted.

CSS
 

Keep both backdrop-filter lines: older Safari needs the -webkit- prefix and every other browser reads the unprefixed one.

Fallback rule
 

Where backdrop-filter is not supported the card would show only the faint tint, so this rule swaps in a solid color close to the look. The color is estimated from the background colors, so adjust it to your page.

Tailwind CSS
 

The supports-[backdrop-filter] variant applies the tint only where blur works, and the plain background is the fallback. Tailwind 3.2 and later, including 4.

Common Use Cases

Cards and Panels

Put a frosted card over a hero image or gradient so the text stays readable without hiding the picture.

Navigation Bars

Make a sticky header that blurs the page scrolling under it, with a border and a soft shadow.

Modals and Overlays

Blur the page behind a dialog so the content stays in view but the focus moves to the dialog.

Accessible Text on Glass

Watch the contrast figure while you change the tint and text color, and stay at 4.5 to 1 or better for normal text.

Safe Fallbacks

Copy the fallback rule so browsers and contexts without backdrop-filter still get a readable solid card.

Tailwind Projects

Get arbitrary-value classes, including the supports variant, for projects that style with utilities.

Glassmorphism Reference

The Parts of a Glass Card

Part Typical value What it does
backdrop-filter: blur()8px to 24pxBlurs what is behind the card
saturate()120% to 200%Brings back color the blur washes out
backgroundrgba(255, 255, 255, 0.15)The tint; low opacity keeps it see-through
border1px solid rgba(255, 255, 255, 0.3)A light edge that catches the eye
border-radius12px to 28pxSoft corners
box-shadow0 8px 32px rgba(0, 0, 0, 0.25)Lifts the card off the background

Zero values are left out of the output.

WCAG Contrast Targets

Level Ratio Applies to
AA, normal text4.5 : 1Body text under 24px, or under 19px bold
AA, large text3 : 124px and up, or 19px bold and up
AAA, normal text7 : 1The stricter enhanced level

The warning on this page uses the AA level for normal text, 4.5 to 1.

It needs something behind it

The blur works on whatever is painted behind the card. Over a flat color there is nothing to blur, and an ancestor with its own filter, mask or opacity below 1 can stop it from seeing the page.

Large blurs cost speed

Blurring is expensive on large cards, many cards and animated backgrounds. Keep the blur modest and use few glass layers on weak devices.

Check real text, real image

A photo has bright and dark patches, so one card can pass over one part and fail over another. Test the contrast over the worst part of your actual background.

Related tools

Add depth with the Box Shadow Generator, build the background with the Gradient Generator and check colors with the Color Converter.

Pro Tip: URL Parameters

Open the generator with a card already loaded. Use ?preset= with frost, dark, tinted or subtle, or set each value with ?blur=, ?sat=, ?tint=, ?ta=, ?ba=, ?r=, ?sh=, ?bg= and ?text=. For example: /glassmorphism-generator/?preset=dark or /glassmorphism-generator/?blur=20&sat=160&tint=ffffff&ta=0.2&bg=sunset

blur and r are pixels, sat is a percentage, ta and ba are 0 to 1 opacities, sh is the shadow size in pixels, colors are HEX without the #, and bg is aurora, sunset, ocean or sample. An image you pick yourself cannot be put in a link. The link in your address bar updates only after you change something, and the Copy Link button builds it from your current card.

Frequently Asked Questions

Why We Built This Glassmorphism Generator

Glass cards look easy and are easy to get wrong. The blur does nothing over a flat color, the tint has to be faint enough to see through yet strong enough to read the text, the prefixed property is still needed for older Safari, and in the browsers and contexts that cannot blur, the card quietly turns into unreadable text on a background. We built a generator that shows the card over a real backdrop, writes the CSS correctly, and tells you when the text is too hard to read.

The output is the shortest valid form: neutral values are left out, backdrop-filter always comes with its -webkit- twin, and a fallback rule gives unsupported browsers a solid card close to the look. You also get Tailwind classes, a downloadable stylesheet, and a link that restores the design. Your own image is read in the browser and never uploaded, and nothing you design leaves the page.

The Glassmorphism Generator is part of RJL.io's collection of free developer tools. Add depth with the Box Shadow Generator, build backgrounds with the Gradient Generator, and cut shapes with the Clip Path Generator.

Is your site ready for Google and AI search?

The free SEO Analyzer checks any page in seconds - meta tags, structured data, AI crawler access - and tells you exactly how to fix each issue on your platform.