Box Shadow Generator
Build a multi-layer CSS box-shadow with live preview, stacking as many independently editable shadow layers as you need.
Tool guide
What this tool does
Box Shadow Generator builds a CSS box-shadow visually, supporting multiple stacked layers (each with its own offset, blur, spread, colour and inset toggle), for everything from a subtle card lift to a complex layered depth effect, with the combined CSS ready to copy.
A convincing depth effect often needs more than one shadow stacked together, a tight, dark shadow close to the element plus a softer, lighter one further out, hand-tuning several shadow layers’ values simultaneously is tedious without a visual tool.
This tool lets you add any number of independent shadow layers, each with its own offset, blur, spread, colour and inset toggle, previewing the combined result live and giving you the complete comma-separated box-shadow CSS.
How to use Box Shadow Generator
- Adjust the first layer’s offset, blur, spread and colour.
- Toggle inset if you want an inner (recessed) shadow instead of an outer one.
- Add another layer for a richer, more layered depth effect if needed.
- Copy the generated CSS output.
Tips for better results
- In a multi-layer box-shadow, the first layer listed renders visually on top (closest to the viewer), and the last layer renders furthest behind, order matters for how layers overlap.
- A common realistic depth technique uses two layers: a tight, higher-opacity shadow close to the element, plus a larger, lower-opacity one further out, try this combination for a more natural-looking elevation effect.
- An inset shadow draws inside the element’s border rather than outside it, useful for pressed-button or recessed-input visual states.
- Negative spread values shrink the shadow smaller than the element itself, useful for a subtle shadow that doesn’t extend past the element’s edges.
Common use cases
- Creating a card or panel elevation effect that lifts it visually off the page.
- Building a layered, realistic depth shadow using multiple stacked layers.
- Designing a pressed or recessed inset shadow for an active button or input state.
- Experimenting with shadow values before committing to a final design system token.
Common mistakes to avoid
- Using a single very large, dark shadow and expecting it to look subtle and realistic; real-world shadows are usually softer and lighter than a quick first guess, lower the opacity and increase the blur for a more natural look.
- Forgetting that shadow layer order affects visual stacking, the first layer renders on top; reorder your layers (by removing and re-adding) if the stacking looks wrong.
- Applying a heavy shadow to many small UI elements across a page, which can make the whole interface feel visually noisy rather than giving genuine depth hierarchy to what matters.
Frequently asked questions
Which shadow layer renders on top?
The first layer listed in the box-shadow value renders visually closest to the viewer (on top); the last layer renders furthest behind.
What does the inset toggle do?
It switches that layer from an outer shadow (extending outward from the element) to an inner shadow (drawn inside the element’s border), useful for a pressed or recessed look.
Can negative values be used for spread?
Yes, a negative spread shrinks the shadow smaller than the element’s own box, useful for a tighter, more subtle shadow that doesn’t extend past the element’s edges.
Is this generated locally?
Yes, the preview and CSS generation happen entirely in your browser; nothing is transmitted anywhere.
Feedback & suggestions
Help us improve Box Shadow Generator. We read every message.