All tools CSS Box Shadow Generator ● Live Developer Tools

How CSS Box Shadow Generator works

  1. Adjust offset X and Y sliders to position the shadow.
  2. Set blur and spread to control softness and size.
  3. Pick a shadow color and opacity, and toggle inset if needed.
  4. Add more layers to stack shadows, then copy the combined CSS.
  • Create elevation effects for cards, buttons, and modals.
  • Design inset shadows for input fields or pressed-button states.
  • Build layered, realistic shadows for depth in a design system.
  • Prototype hover-state shadow changes before writing CSS.
  • Match a shadow style from a design mockup by adjusting values visually.

All processing happens in your browser. Nothing is uploaded or saved.

  • Generates box-shadow only — not text-shadow or filter: drop-shadow().
  • Doesn't export shadows as image assets.
  • Very large blur/spread values may render differently across browsers.

CSS Box Shadow Generator

CSS Box Shadow Generator lets you build box-shadow rules with full control over offset X/Y, blur, spread, color, opacity, and inset. Stack multiple shadows by adding layers. A live preview card shows the result, and the complete CSS property is ready to copy.

CSS Box Shadow Generator Runs locally
Shadow

CSS output

box-shadow: 0px 4px 24px 0px rgba(0,0,0,0.15);
Guide

How to use

  1. Adjust offset X and Y sliders to position the shadow.

  2. Set blur and spread to control softness and size.

  3. Pick a shadow color and opacity, and toggle inset if needed.

  4. Add more layers to stack shadows, then copy the combined CSS.

Scenarios

Use cases

  • Create elevation effects for cards, buttons, and modals.

  • Design inset shadows for input fields or pressed-button states.

  • Build layered, realistic shadows for depth in a design system.

  • Prototype hover-state shadow changes before writing CSS.

  • Match a shadow style from a design mockup by adjusting values visually.

Good to know

Limitations & Privacy

Private by design

All processing happens in your browser. Nothing is uploaded or saved.

  • Generates box-shadow only — not text-shadow or filter: drop-shadow().

  • Doesn't export shadows as image assets.

  • Very large blur/spread values may render differently across browsers.

FAQ

Frequently asked questions

Can I create an inset shadow?

Yes. Enable the 'Inset' toggle for any shadow layer to make it an inset (inner) shadow. Inset and outer shadows can be combined in the same stack.

What is the 'spread' value?

Spread expands or contracts the shadow size before blur is applied. Positive values make the shadow larger than the element; negative values make it smaller, useful for tight, realistic shadows.

Can I stack multiple shadows?

Yes. Add as many shadow layers as you need — each with its own offset, blur, spread, color, and inset setting. The tool combines them into a single comma-separated box-shadow value.

What's the difference between blur and spread?

Blur softens the shadow's edges, spreading it outward with a gradient fade. Spread changes the shadow's size uniformly in all directions before blur is applied, with sharp edges.

How do I create a realistic drop shadow?

Use a small offset (2-8px), moderate blur (8-16px), little or no spread, and a low-opacity dark color (e.g. 15-25% black). Layering two shadows — one tight, one soft — often looks more natural.

Does this work for text shadows too?

No, this tool generates box-shadow for elements. text-shadow uses a similar but distinct syntax (no spread value) and would need a separate generator.

Will the generated CSS work in all browsers?

Yes. box-shadow is supported in all modern browsers without vendor prefixes, including multiple comma-separated shadow layers.