About this tool
Realistic shadows usually come from several layers rather than one. Add up to eight layers, set offset, blur, spread, color and inset for each, and preview them on light, dark or colorful backgrounds. Presets give you a quick start, from a gentle card shadow to a hard offset look.
How to use Box Shadow Generator
- Choose a preset or start from the default.
- Adjust each layer's offset, blur, spread and color.
- Switch the preview background to check contrast.
- Copy the box-shadow CSS.
Frequently asked questions
Why use several layers?
Light in real life produces a tight dark shadow near the object and a wide faint one further away. Layering a few shadows with growing blur imitates that and looks more natural.
Does a large shadow slow down my page?
Big blur values on many elements can cost rendering time on low-end devices, especially when animated. Use them on a handful of elements rather than hundreds.