Developer Tools

CSS Box-Shadow Generator

Design CSS box shadows with sliders and copy production-ready code.

Preview
box-shadow: 0px 12px 24px 0px rgba(0, 0, 0, 0.25);

Create perfect CSS box shadows visually

Writing box-shadow by hand means guessing numbers, refreshing the browser, and guessing again. This free online CSS box-shadow generator gives you sliders for every value with a live preview, so you can dial in exactly the shadow you want and copy production-ready CSS.

How to use it

Drag the X and Y offset sliders (−50 to 50 px) to position the shadow, blur (0–100 px) to soften it, and spread (−50 to 50 px) to grow or shrink it. Pick a color and set its opacity from 0 to 1. Tick Inset for inner shadows. The preview updates instantly on the checkered stage, and the code box shows the finished declaration — hit Copy CSS to grab it.

The four presets

Shadow tips

Realistic shadows are usually soft, slightly transparent black with a positive Y offset — light comes from above. Layering two shadows (a tight dark one plus a wide faint one) looks more natural than a single heavy shadow, though this tool outputs one declaration at a time. Colored glows work best with brand colors at 40–70% opacity.

Frequently Asked Questions

Is this box-shadow generator free?
Yes, completely free with no sign-up. Generate and copy as many shadows as you like.
What does the spread value do?
Spread grows (positive values) or shrinks (negative values) the shadow before blur is applied. Negative spread with blur creates a soft, contained shadow that stays close to the element.
How do I make an inner shadow?
Tick the “Inset shadow” checkbox. The word “inset” is added to the declaration and the shadow renders inside the element instead of outside.
Why use opacity instead of a hex alpha color?
Both work, but a separate opacity slider is easier to fine-tune. The tool outputs an rgba() color so the transparency is baked into the copied code.
Can I copy multiple layered shadows?
The generator outputs one shadow declaration at a time. To layer shadows, copy the code twice and combine them with a comma: box-shadow: A, B;.