CSS Box Shadow Generator - Layered, Realistic Shadows Visually
One harsh shadow looks fake; two or three soft layers look like light. This generator makes layering easy and shows the result as you tune it.
How to use the CSS Box Shadow Generator
- Adjust the first layer: vertical offset and blur do most of the work.
- Set the colour and lower the opacity for softness (0.1-0.3 is the realistic range).
- Add a second, tighter layer for contact depth, or tick Inset for an inner shadow.
- Copy the generated CSS.
How it works
A box-shadow layer is offset-x offset-y blur spread colour, and multiple layers are comma-separated - the first layer paints on top. Realistic elevation usually pairs a small, darker contact shadow with a larger, softer ambient one, which is why this tool is built around layers rather than a single shadow. Colours are emitted as rgba() so opacity travels with the colour, and the preview box updates on every keystroke.
Frequently Asked Questions
Is this generator free?
Yes - completely free, no sign-up.
How many layers can I add?
As many as you like - CSS itself has no practical limit, though 2-3 layers cover most designs.
What values make a shadow look natural?
A modest vertical offset, generous blur, and low opacity (0.1-0.3). Pure black at full opacity almost never looks real.
What is an inset shadow?
A shadow drawn inside the element's border instead of outside - used for pressed or recessed effects.
Is anything uploaded?
No. Everything runs in your browser.