Skip to content

CSS box shadow generator

Adjust the shadow with sliders and watch it on a card. Stack several layers to get a soft, natural shadow, then copy the code as CSS or as a Tailwind class.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
● Requests carrying your input: none · site files: 0 · analytics (no content): 0
Why is there no “save online” button?

Because server-side “save and share” keeps leaking. In November 2025, watchTowr researchers collected thousands of publicly reachable saved entries from two popular online formatters (jsonformatter.org and codebeautify.org), including passwords, API keys, tokens, and banking and government data. Here, everything runs in your browser; a shared link carries the data after the #, which browsers never send to the server. watchTowr Labs

  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Pick a preset (soft, layered, floating card, retro, inner, neumorphic, glow), or start with the default.
  2. Set the horizontal and vertical offset, blur, spread, color and opacity.
  3. Add layers; each one is editable on its own.
  4. Copy the CSS or the Tailwind class.
Try it now

The four numbers of box-shadow

box-shadow: 0 10px 30px -8px rgb(15 23 42 / 0.35);
ValueWhat it does
0horizontal offset (positive = right)
10pxvertical offset (positive = down)
30pxblur: bigger is softer
-8pxspread: negative makes it smaller and more “floating”

The inset keyword makes an inner shadow, so the box looks pressed in.

Why layer shadows?

Real shadows are dark and sharp close to an object and light and blurry farther away. One layer can't do that. The layered smooth preset stacks five progressively larger, fainter shadows, and that's what makes a card look natural.

Layers are separated by commas, with the first one on top. Performance isn't a concern: modern browsers paint box-shadow on the GPU.

Tailwind and sharing

Instead of Tailwind's built-in shadows (shadow-md, shadow-xl), you get an exact arbitrary-value class like shadow-[0_10px_30px_-8px_rgb(15_23_42_/_0.35)], plus the border radius.

Share your settings with a link; the part after the # never reaches our server.

Frequently asked questions

How do I add a shadow to a div in CSS?

Use the box-shadow property: offset, blur, spread and color. This generator writes the code.

What's the difference between box-shadow and drop-shadow?

box-shadow follows the box's rectangle; filter: drop-shadow() follows the actual shape, such as a transparent PNG.

How do I make an inner shadow?

Turn on the inset checkbox for that layer.

How many layers can I stack?

Up to eight here. CSS has no limit, but eight is plenty.

Sources

Recommended

Similar tools

If CSS box shadow generator helped, you may need these too.

See all in category →

People also use