CSS Box Shadow Generator
Build a single CSS box-shadow value with four sliders and a color picker. The preview updates live and the generated CSS appears in the output box ready to copy.
box-shadow: 0px 8px 16px 0px #00000033;
How to use this tool
- 1
Drag the X offset and Y offset sliders (each from -50px to 50px) to move the shadow horizontally and vertically.
- 2
Adjust the Blur slider (0px to 100px) to soften the edges, and the Spread slider (-50px to 50px) to grow or shrink the shadow.
- 3
Pick a shadow color with the color swatch; the live preview square updates as you change any control.
- 4
Copy the generated box-shadow declaration from the output box at the bottom and paste it into your stylesheet.
What does CSS box-shadow do, and what does this generator produce?
The CSS box-shadow property draws a shadow around an element's box. Its longhand form is four lengths plus a color: horizontal offset, vertical offset, blur radius, spread radius, and color — for example box-shadow: 0px 8px 16px 0px #00000033. Positive X moves the shadow right, positive Y moves it down. Blur radius softens the edge (0 is a hard edge); spread radius grows (positive) or shrinks (negative) the shadow before blurring. This tool generates exactly one outer shadow from four range sliders and a color picker, with the result shown as a single box-shadow declaration. It does not emit the inset keyword, so it only produces outer shadows, and it does not stack multiple comma-separated shadows for you — stacking is a valid CSS feature, but here you would copy this value and add more by hand. One subtlety: the default color #00000033 includes an alpha channel (the trailing 33 is roughly 20% opacity), but a native HTML color picker cannot represent transparency, so choosing a new color produces an opaque six-digit hex.
Common use cases
Designing a soft elevation shadow for buttons or cards, then tuning Y offset and blur until the depth looks right.
Prototyping a Material-style shadow by stacking the value this tool outputs with a second hand-written shadow.
Generating a tight, low-blur shadow with negative spread for a crisp focus or hover state.
Getting an exact box-shadow string to paste into a Tailwind arbitrary value, CSS module, or inline style.
Teaching the difference between blur and spread by dragging each slider and watching the preview react.
Quickly matching a shadow from a design mockup by eyeballing offsets against the live preview square.
Frequently asked questions
What is the difference between blur radius and spread radius?▼
How do I stack multiple shadows?▼
Can I create an inset (inner) shadow?▼
Why does my shadow become solid when I pick a color?▼
What do the offset values control?▼
Is my data uploaded anywhere?▼
Related tools
Color Converter (HEX/RGB/HSL)
Convert colors between HEX, RGB, HSL, OKLCH.
CSS Gradient Generator
Build linear and radial CSS gradients.
Cubic Bezier Generator
Build CSS easing curves visually.
Color Palette Generator
Generate harmonious color palettes from any base color.
CSS Border Radius Generator
Build complex CSS border-radius visually.
CSS Clamp Generator
Generate responsive CSS clamp() functions.