CSS Box Shadow Generator

Design box shadows with sliders for offset, blur, spread, colour and opacity — live preview and copy-ready CSS including inset support.

Developer Tools Runs in your browser · no upload

Reviewed 17 November 2026 · Free · No account needed

ExecutionYour browserInput never leaves your tab
File retentionNoneNothing is stored
AccountNot requiredNo sign-up, no paywall
PriceFreeNo trial, no usage cap on the tool itself

How to use

  1. Drag the offset, blur and spread sliders.
  2. Pick the colour and opacity.
  3. Toggle inset for inner shadows.
  4. Copy the generated CSS.

Example

Input: 0/8 offset · 24 blur · −6 spread · #4f46e5 at 35%

Output: box-shadow: 0px 8px 24px -6px rgba(79, 70, 229, 0.35);

How it works

The shadow is described by offset-x, offset-y, blur, spread, colour and opacity, and rendered as a CSS box-shadow declaration you can copy into your stylesheet.

box-shadow = [inset ] offset-x offset-y blur spread colour, with each length rounded to a whole number of pixels and the hex colour converted to rgba(r, g, b, alpha), where alpha is opacity ÷ 100 to two decimals.

Worked example

Offset 0/8, blur 24, spread −6, #4f46e5 at 35% gives box-shadow: 0px 8px 24px -6px rgba(79, 70, 229, 0.35);

Edge cases to know

  • One shadow per rule — layered shadows need manual stacking.
  • Colour input is hex; output is always rgba with two-decimal alpha.
  • Sliders cap offsets at ±60 px, blur at 100 and spread at ±50; values are rounded to whole pixels.

Limits & compatibility

  • Single shadow per rule — layered shadows need manual stacking.
  • Colour input is hex; output is rgba with 2-decimal alpha.
  • Values are rounded to whole pixels.

Privacy

All processing runs locally in your browser. Nothing is transmitted, logged or stored.

Related tools

FAQ

Questions about CSS Box Shadow Generator

What does the generated CSS look like?

A single box-shadow declaration with pixel values and an rgba colour: box-shadow: 0px 8px 24px -6px rgba(79, 70, 229, 0.35);. Offsets, blur and spread are rounded to whole pixels, the hex colour you pick is converted to rgba, and the inset keyword is prefixed when inner shadow is enabled.

Can I build layered shadows with it?

No — the tool produces one shadow per rule. Layered effects, the kind you get by comma-separating multiple shadows in one declaration, need manual stacking: copy each generated value and join them with commas yourself. The live preview always reflects exactly the single shadow currently configured.

Why does the output use rgba instead of my hex colour?

Because opacity is part of the shadow value, and hex has no alpha channel. You pick the colour as hex and set opacity separately; the tool combines them into rgba with a two-decimal alpha. Every adjustment is computed in your browser with no network round-trip, so the preview updates as fast as you can drag the sliders.