Box Shadow Generator
Stack multiple shadow layers and see them on a card against a real background. Layered shadows look real; single ones look stuck on.
Layers — real shadows use more than one
- Layer 1
- Layer 2
CSS
Presets
About the Box Shadow Generator
A single box-shadow almost never looks right, and the reason is physical. Light falling on an object casts a shadow that is dark and tight where the object nearly touches the surface, and progressively softer and fainter further away. One shadow can be tight or soft; it cannot be both.
Two or three layers approximate the real thing: a small, slightly darker one for the contact area, and a larger, more diffuse one for the ambient falloff. That is what every well-designed shadow scale does, and it is why shadows from a design system look like objects sitting on a surface while a hand-written one often looks like a grey rectangle stuck behind a card.
The preview sits on a background rather than on white, because a shadow judged against a flat backdrop is not being judged at all. Shadows are visible in proportion to what is behind them, and one that looks perfect on white can disappear entirely on a coloured section.
Glassmorphism is a different effect that people reach for at the same moment: a translucent surface with a backdrop blur, so what is behind shows through softened. It needs something busy behind it to read as glass at all, which is why turning it on here also changes the backdrop.
Inset shadows invert the whole thing, casting inward — useful for pressed buttons and inputs that should look recessed. Everything runs in your browser.
Frequently asked questions
Why do I need more than one shadow layer?
Because a real shadow is dark and tight near the object and soft further out, and a single shadow can only be one of those. Two or three layers is what makes a shadow read as an object sitting on a surface.
What is glassmorphism?
A translucent surface with a backdrop blur, so what is behind shows through softened. It only reads as glass when there is something busy behind it, which is why the preview backdrop changes with it.
What does spread do?
It grows or shrinks the shadow before the blur is applied. A negative spread pulls the shadow in, which is how you get a tight shadow that does not peek out around the edges.