The Util Box

Box Shadow Generator

Free online box shadow generator for developers. Visual CSS box-shadow builder. Fast and private.

Preview
CSS
box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.3);

Embed this tool

Copy and paste the code below into your website to embed this tool for free. An attribution link to The Util Box is required.

<iframe src="https://www.theutilbox.org/embed/box-shadow-generator" width="600" height="500" frameborder="0" style="border: none; max-width: 100%;" title="Free Box Shadow Generator tool from The Util Box"></iframe>
<!-- Free tool by The Util Box — https://www.theutilbox.org/tools/box-shadow-generator -->
<a href="https://www.theutilbox.org/tools/box-shadow-generator">Box Shadow Generator by The Util Box</a>

Frequently Asked Questions about Box Shadow Generator

Box Shadow Generator — Offset, Blur, Spread and Inset

This box shadow generator turns five sliders and a colour picker into a finished box-shadow declaration, with a preview tile that updates as you drag. The controls map one-to-one onto the CSS shorthand, so what you see is literally what the property contains:

Control Range Effect
Offset X−50 to 50pxMoves the shadow left or right
Offset Y−50 to 50pxMoves the shadow up or down
Blur0 to 100pxSoftens the edge — 0 is a hard shadow
Spread−50 to 50pxGrows the shadow before blurring, or shrinks it when negative
InsetcheckboxDraws the shadow inside the box instead of behind it

Blur Versus Spread — the Distinction That Matters

Blur and spread are not the same knob. Spread expands the shadow rectangle in every direction before the blur is applied, which makes a shadow read as larger and heavier; blur only feathers whatever edge already exists. A shadow with 0px blur and 4px spread is a crisp offset slab — the flat, hard look of Material Design at rest. A shadow with 20px blur and 0px spread is a soft ambient glow. Using a negative spread, as in 0 1px 2px -1px, keeps the shadow tight to the element, which is how most modern "lifted card" shadows are tuned.

Inset Shadows and the Layering Caveat

Ticking Inset moves the shadow inside the element, which is how you fake a pressed input, an inner bevel or a subtle top highlight. Remember that the tool produces one shadow at a time — real interfaces usually stack two or three, separated by commas, e.g. a tight contact shadow plus a wide ambient one. Generate each layer here, then join them with commas in your stylesheet. Also note that an inset shadow is painted above the background but below the content, so it will never cover child elements.

Related CSS Generators

Runs entirely client-side with an instant preview.