CSS Box Shadow Generator

Design box shadows visually and copy the CSS.

Preview
Presets:

🔒 Runs entirely in your browser. Nothing you enter is uploaded or stored.

What is the CSS Box Shadow Generator?

The CSS box-shadow property adds depth to cards, buttons, modals and dropdowns. It takes a horizontal and vertical offset, a blur radius, a spread radius and a color, and you can stack several shadows separated by commas. This box shadow generator lets you adjust each value with sliders and see the result immediately.

Turn on Smooth layers for the soft, realistic shadows popular in modern design systems: instead of one large blur, it stacks five shadows that grow in size and fade, which looks much closer to real light.

How to use the CSS Box Shadow Generator

  1. Start from a preset or move the sliders.
  2. Set the shadow color and opacity. Low opacity (10–30%) looks most natural.
  3. Tick Inset for an inner shadow, or Smooth layers for a realistic soft shadow.
  4. Click Copy CSS and paste it into your stylesheet.

Frequently asked questions

What is the difference between blur and spread?

Blur softens the edge of the shadow; larger values make it more diffuse. Spread grows or shrinks the shadow before blurring. A negative spread keeps the shadow tucked under the element, which often looks cleaner.

Do box shadows hurt performance?

Static shadows are cheap. Animating box-shadow can cause repaints; for hover effects, animate the opacity of a pseudo-element that carries the shadow instead.

How do I add a shadow to a transparent PNG shape?

box-shadow follows the element's box, not the image's visible pixels. Use filter: drop-shadow(…) to follow the shape of a transparent image.