Free CSS box-shadow generator
This box-shadow generator lets you design layered, natural-looking shadows
without memorising the syntax. Drag the sliders for horizontal offset,
vertical offset, blur, and spread, pick a color, set the opacity, and watch
the preview update instantly. When it looks right, copy the ready-to-use
box-shadow declaration straight into your stylesheet. Every
value maps directly to real CSS, so what you see is exactly what your
element will render in the browser.
How to use the box-shadow generator
- Set the horizontal and vertical offsets to position the shadow.
- Increase blur for a softer edge and adjust spread to grow or shrink the shape.
- Choose a color and lower the opacity for a subtle, realistic look.
- Toggle Inset to move the shadow inside the element for pressed or inner-glow effects.
- Click Copy CSS and paste the declaration into your project.
Tips for great shadows
Realistic shadows usually use a low opacity (10–30%), a small vertical offset, and a generous blur — sharp, fully opaque shadows tend to look dated. Stick to one light source across your interface so shadows fall in a consistent direction. For elevated cards, a soft downward shadow works well; for depth on buttons, try a subtle inset shadow.
Related design tools
Pair your shadows with a matching background from the CSS gradient generator, or fine-tune the exact shadow color with the color converter to switch between hex, RGB, and HSL values.