Developer Tools

Box Shadow Generator

Design CSS box shadows with live preview — multiple layers, inset and color controls.

Tool

About the Box Shadow Generator

The Box Shadow Generator runs entirely in your browser — your code and data never leave your machine. Paste, click, copy the result.

CSS box-shadow takes five core values — offset-x offset-y blur spread color — plus optional inset. Small offsets with large blur make soft modern elevation; tight shadows with spread look retro. This generator previews the shadow on a sample card in real time as you adjust, then outputs copy-ready CSS.

How to use this tool

  1. Drag the offsets, blur and spread values — the preview updates live.
  2. Pick a color and opacity (soft black at 8–15% opacity is the modern default).
  3. Toggle inset for pressed/inner effects.
  4. Generate and paste the CSS, or copy the full multi-value shorthand.

Shadow recipes

StyleRecipe
Subtle card0 1px 2px rgba(0,0,0,.06)
Raised card (Material)0 6px 24px -6px rgba(0,0,0,.16)
Floating menu0 20px 48px -12px rgba(0,0,0,.24)
Colored glow0 0 40px rgba(79,70,229,.35)
Inset / pressedinset 0 2px 6px rgba(0,0,0,.15)

Multiple shadows

Separate layers with commas — a tight shadow for definition plus a wide one for depth looks richer than a single blur:
box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 12px 32px -8px rgba(0,0,0,.18);

Who is this tool for?

Front-end developers and designers who want pixel-perfect elevation without endless devtools guessing.

Developer tip

Match shadow direction to your light source (usually top-down): positive Y offset means light comes from above. Inconsistent directions across a UI look subtly 'wrong' even when nobody knows why.

Frequently asked questions

Blur too small or opacity too high. Modern UIs use 30–60px blur at 8–15% opacity for a soft, layered look.
Large animated shadows repaint often. Prefer transform/opacity animations, or use pre-composed shadows on mobile-heavy pages.
It grows (positive) or shrinks (negative) the shadow box before blurring — great for matching the element's shape exactly.

Related tools

Guides for this tool