CSS Box Shadow Generator

Set the offset, blur, spread and colour, preview the shadow and copy the CSS.

How it works

Move the sliders for offset, blur, spread, colour and opacity, and see the shadow on a live card. Switch to inset for an inner shadow. Copy the finished box-shadow line into your CSS.

Worked example

Offset 0 and 8, blur 24, spread 0 and black at 20% opacity gives box-shadow: 0 8px 24px rgba(0,0,0,0.2).

Good to know

Common questions

What does spread do?
Spread grows or shrinks the shadow before blurring.
Can I use more than one shadow?
Yes. Separate shadows with commas in CSS.
Does it work in dark mode?
Pick a colour that still shows on your dark background.

More in Security.