About Box Shadow Generator
Soft, realistic shadows are usually two or three layers working together: a wide, faint one for depth and a tight, darker one where the element meets the surface. This tool lets you build that stack layer by layer while a card on the preview shows the result.
Each layer has its own offset, blur, spread, color, opacity and an inset switch for inner shadows. Change the card and page colors to check the shadow against your real design, then copy the declaration or just the value.
How it works
- Each layer becomes one comma-separated entry of the box-shadow property, listed in the order you see them: the first layer is drawn on top.
- Opacity is folded into the color as rgba(), so the shadow color you pick stays exact and only its strength changes. A fully opaque layer keeps its hex color.
- Zero lengths are written without a unit and a zero spread is left out, so the CSS stays as short as the browser allows.
- The settings live in the page address, so a shadow can be bookmarked or shared as a link.
Questions
What is the difference between blur and spread?
Blur softens the edge of the shadow, and larger values make it fade over a longer distance. Spread grows or shrinks the shadow before it is blurred; a negative spread pulls it in, which helps a large blur stay under the element instead of leaking out the sides.
Why combine several layers?
Real objects cast a sharp, dark shadow close to where they touch a surface and a wide, faint one further away. One layer can only imitate one of these, so two or three layers usually look more natural.
Does the shadow follow rounded corners?
Yes. A box-shadow takes the shape of the element’s border-radius, which is why the preview has a corner radius control. The radius is not part of the copied CSS, because it belongs to the element rather than the shadow.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.