Developer Tools
CSS Box Shadow, Border Radius & Glassmorphism Generator
Design CSS box shadows, rounded corners and frosted-glass (glassmorphism) effects with sliders and a live preview — then copy the CSS.
How to use
- 1Adjust the shadow offset, blur, spread, color and opacity (add a second layer for depth).
- 2Set corner radius and optional glass blur, then copy the CSS.
Frequently asked questions
How do I make a soft, realistic shadow?
Use two layers: a small, tighter shadow and a larger, very transparent one with a big blur.
What is glassmorphism?
A frosted-glass look: a semi-transparent background plus backdrop-filter: blur(), usually with a subtle border.
Is backdrop-filter supported?
Yes in all modern browsers; older Safari needed the -webkit- prefix, which the generator includes.
Why real shadows use two layers, not one
A single box-shadow with a big blur looks like a smudge because real-world shadows aren't uniform: light sources create a tight, darker contact shadow close to the object and a much softer, lighter, spread-out shadow further out. Layering a small-blur/low-spread shadow with a large-blur/negative-spread one reproduces that, which is why the generator defaults to two layers and lets you add up to five.
Worked example: the default preset, decoded
The generator opens with two layers — 0px 4px 6px -1px rgba(0,0,0,0.1) and 0px 10px 25px -5px rgba(0,0,0,0.15) — plus a 16px border radius, producing: border-radius: 16px; box-shadow: 0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 10px 25px -5px rgba(0, 0, 0, 0.15); That's close to Tailwind's built-in shadow-xl utility, and the negative spread values are doing real work: without them, each shadow would be exactly as wide as the element, giving it a flat, stacked-outline look instead of fading away at the edges.
Glassmorphism needs something to blur
Turning on Glassmorphism adds a semi-transparent white background, a backdrop-filter: blur() (with the -webkit- prefix for older Safari), and a faint border — but backdrop-filter only blurs whatever is already behind the element. Preview it over a plain single-color background and it will look like a slightly washed-out box, not frosted glass; the effect only reads correctly over something with detail, like the generator's own gradient preview or a photo. It's also a real GPU compositing cost, so avoid stacking many blurred panels on a single scroll-heavy page.
Inset shadows carve in instead of lifting off
Checking Inset on a layer flips the shadow to render inside the element's border instead of outside it — useful for a pressed-button or recessed-input look, and often combined with a lighter, non-inset shadow on the opposite layer to fake a subtle bevel. Because each layer has its own inset toggle, you can mix inset and outset shadows in the same box-shadow declaration, which a single-shadow tool or DevTools' box-shadow inspector doesn't make obvious.
What spread actually does, separate from blur
Blur softens a shadow's edge by feathering it outward; spread grows or shrinks the shadow's entire shape before blur is even applied, independent of the element's own size — a positive spread makes the shadow larger than the element on every side, while a negative spread (as used in both of the default preset's layers) shrinks it smaller than the element first. That's precisely why negative spread paired with a large blur produces a soft halo that fades out near the element's edges rather than a uniform glow starting right at the border — the shadow starts smaller than the box, then blur spreads that smaller shape back outward unevenly.
Border radius interacts with shadow shape, not just corners
Rounding an element's corners with border-radius also rounds the corners of every box-shadow layer applied to it, since the browser renders the shadow as a copy of the element's actual painted shape — a rectangular shadow on a heavily rounded card would look visibly wrong, so the generator's shared border-radius control exists specifically to keep the preview's shadow corners matching its box corners rather than requiring you to reason about that interaction yourself.
Related tools
- Code Beautifier (HTML, CSS, JavaScript)
Beautify messy or minified HTML, CSS and JavaScript into clean, consistently indented code you can read and edit.
- CSS & HTML Minifier
Minify CSS or HTML to shrink file size — strips comments and whitespace and shows how many bytes you saved.
- CSS to Tailwind Converter
Convert plain CSS declarations or rules into Tailwind CSS utility classes — spacing, flexbox, grid, typography, colors, borders and more, with arbitrary values where needed.
- CSS Clip-Path Generator
Create CSS clip-path shapes visually — triangles, hexagons, stars, arrows, speech bubbles and more — drag points to customize and copy the polygon() CSS.
- CSS Animation Generator (Keyframes)
Create CSS keyframe animations visually — fade, slide, bounce, pulse, shake, spin and more — tune duration, easing, delay and repeat with a live preview, then copy the CSS.
- Screenshot Beautifier (Frame, Border, Shadow)
Make screenshots and product shots look polished — gradient background, padding, rounded corners, drop shadow and a browser window frame.