CSS Box Shadow Generator
Craft the perfect shadow and copy the CSS instantly.
box-shadow: 0px 10px 25px -5px rgba(139, 92, 246, 0.4);Create polished CSS box-shadows with a live preview. Adjust the horizontal and vertical offset, blur, spread, color and opacity, and choose inset shadows, then copy the exact CSS, so you can get the depth and softness you want without guessing numbers in your stylesheet. It is the quickest way to get shadows just right for cards and buttons, because a shadow that is too dark looks heavy, one that is too faint disappears, and the right balance depends on the background and the size of the element. Trying values in code, refreshing, and repeating is slow, while a live preview shows the effect immediately. You can fine-tune each control until the element lifts off the page in the way you intended. It runs in your browser, with no signup.
What makes a shadow look real
The mistake in most hand written shadows is that they are too dark and too tight. Real shadows are soft and low contrast, because light in the real world scatters. A shadow with a generous blur, a small vertical offset and an opacity around ten to twenty percent reads as depth. A hard black shadow at full opacity reads as a mistake, which is why so many first attempts look wrong without it being obvious why.
The four values
- Horizontal offset: usually zero, because light generally comes from above.
- Vertical offset: a small positive number, since objects cast downward.
- Blur: the most important value. Larger blur means the object appears further from the surface.
- Spread: grows or shrinks the shadow before blurring. Often best left at zero.
Layering and performance
A single shadow can look flat, and stacking two or three with different blurs produces something far more convincing: a tight one for the contact point and a wide soft one for ambient depth. That is how most modern design systems build elevation. Be aware that large blurs are relatively expensive for the browser to paint, so applying a heavy shadow to something that animates constantly is worth testing on a slower device.
How to use CSS Box Shadow Generator
- 1
Adjust the shadow sliders and color.
- 2
Watch the live preview update.
- 3
Copy the generated CSS.
Frequently asked questions
Yes. Toggle the inset option for inner shadows.