Free online tools

CSS Box Shadow Generator

Adjust an outer or inset shadow and preview it on a sample card. Copy the box-shadow declaration into your stylesheet.

Enter your values

Affects the preview and the optional border-radius value shown with the result.

This tool processes your input in your browser.

Result

Adjust offset, blur and spread

A positive horizontal offset moves an outer shadow to the right. A positive vertical offset moves it down. Use zero blur for a sharp edge. Positive spread expands an outer shadow before blur is applied.

Preview an inset shadow

Inset shadows are drawn inside the box. A large corner radius changes the contour of the shadow, so preview with a radius similar to the element in your design.

Frequently asked questions

Can blur or spread be negative?

Blur must be zero or greater. A negative spread is valid and can make an outer shadow narrower than the box.

Can I combine several shadows?

Yes. Join individual shadow values with commas in a single box-shadow declaration, in front-to-back order. The generator previews one layer at a time.