CSS Box Shadow Generator

Build soft, layered or inset shadows with sliders and a live preview. Stack several layers for realistic depth, then copy the CSS.

Box Background Radius
Presets
Shadow layers
CSS

    

How to use the box shadow generator

  1. Move the sliders to set the shadow's horizontal and vertical offset, blur, spread and opacity.
  2. Add more layers for natural-looking depth. Real shadows are usually a sharp, close shadow plus a soft, wide one.
  3. Change the box and background colors to match your design, then copy the CSS.

For a quick start, pick a preset such as Soft, Layered, Floating or Glow and adjust it. You can also round the box's corners to see how the shadow looks on a card or a button.

What each value does

Shadow ideas

FAQ

Do box shadows slow down a page?

Not noticeably in modern browsers. Very large blurs on many elements that animate can cost performance; for animations, consider animating opacity of a shadow layer instead.

How do I make a shadow follow an image's shape?

Box shadows follow the element's box. For transparent PNGs, use filter: drop-shadow(…) instead.

Why does my shadow look gray and dirty?

Usually because it is pure black at high opacity. Real shadows are faint: keep the opacity low and try a dark shade of your background color instead of black.

Can I add a shadow to text?

Use text-shadow. It takes the same offset, blur and color values, but no spread or inset.