CSS Box-Shadow Generator
Design CSS box-shadow values visually — drag the sliders for offset, blur, spread, color and opacity,
stack multiple layers, watch the live preview, and copy the ready-to-use CSS. Everything runs in your browser.
How to use the box-shadow generator
- Drag the horizontal and vertical offset sliders to position the shadow.
- Increase the blur radius for a softer shadow, and the spread radius to grow or shrink it.
- Pick a color and set the opacity — they are combined into an
rgba()value. - Toggle Inset for an inner shadow, or click Add shadow to stack more layers.
- Copy the generated CSS and paste it into your stylesheet.
The box-shadow syntax is
offset-x offset-y blur spread color, with an optional inset keyword. A -webkit-
prefixed line is included for very old browsers, though it is rarely needed today.
More PAYATE tools
Frequently asked questions
What is a CSS box-shadow?
The box-shadow property adds a shadow around an element’s box. Each shadow is defined by an offset-x, offset-y, an optional blur radius and spread radius, a color, and an optional inset keyword to draw the shadow inside the box instead of outside.
What do the four length values mean?
In order they are: horizontal offset (positive moves the shadow right), vertical offset (positive moves it down), blur radius (larger is softer and more diffuse; 0 is a sharp edge), and spread radius (positive grows the shadow in every direction, negative shrinks it).
What does the inset option do?
The inset keyword draws the shadow inside the element’s border box, which makes the box look pressed in or recessed. Without it, the shadow is drawn outside the box, so the element appears to float above the page.
Why is the color written as rgba?
Shadows look best when they are slightly transparent so the background shows through. The generator combines your chosen color with the opacity slider into an rgba() value, for example rgba(0,0,0,0.3) for black at 30% opacity.
Can I add more than one shadow?
Yes. Use Add shadow to stack several layers, separated by commas. Browsers paint them in order, so the first shadow in the list sits on top. Combining a soft wide shadow with a tighter dark one creates realistic depth.
Is my data sent anywhere?
No. The generator runs entirely in your browser — nothing is uploaded to a server and nothing is stored.