Box Shadow Generator
Adjust the offset, blur, spread, colour and opacity of up to three shadow layers, see the result live and copy the box-shadow CSS.
How to make a CSS box shadow
Set the shadow
Change the options above the result. It updates as you type.
Check the preview
Watch the live preview change as you adjust.
Copy the CSS
Paste the box-shadow rule into your stylesheet.
Worked example
This is what Box Shadow Generator gives for its own sample values. Open the tool above and change anything to try your own.
- Layer 1: horizontal offset (px)
- 4
- Layer 1: vertical offset (px)
- 6
- Layer 1: blur (px)
- 12
- Layer 1: spread (px)
- 0
- Layer 1: colour
- #0f172a
- Layer 1: opacity (%)
- 25
CSS
box-shadow: 4px 6px 12px 0px rgba(15, 23, 42, 0.25);
About Box Shadow Generator
Design a box shadow with up to three layers. Set the offsets, blur, spread, colour, opacity and whether it is inset. Stacking a soft large layer with a small sharp one gives a natural, modern look.
FAQs
What does spread do?
It grows or shrinks the shadow before the blur is applied. Negative values make a tighter shadow.
Why use several layers?
Real shadows have a sharp edge and a soft glow. Two or three layers look more natural than one.
Can I make the corners round?
Use Border Radius Generator.