CSS Box Shadow Generator

By the ToolPocket team · Updated 2026-12-05 · Editorial standards

A box shadow is four numbers and a colour, but the result is hard to predict until you see it. This generator puts the controls next to a live preview so you can tune the shadow in seconds.

Copy the rule and paste it into your stylesheet. Multiple shadows can be layered by saving one value and generating another.

Runs locally in your browser — nothing is uploaded.

How to use the CSS Box Shadow Generator

  1. Adjust the horizontal and vertical offsets.
  2. Set blur, spread and colour, or switch to inset.
  3. Copy the generated CSS.

Frequently asked questions

What do the four numbers mean?

box-shadow takes offset-x, offset-y, blur radius and spread radius, in that order, followed by the colour.

What is inset?

Inset draws the shadow inside the element instead of outside, which is useful for pressed buttons and wells.

Can I add more than one shadow?

Yes. Separate values with commas; the first shadow is painted on top.

Good to know

Shadows read as depth only when they are consistent: the same light direction, similar blur and a colour that matches the background. A black shadow on a coloured card usually looks like dirt rather than depth; tint the shadow towards the background colour instead.

Large blurred shadows are costly to paint. For long scrolling lists, a small blur or a border often looks better and renders faster than a 40px blur on every card.