Box Shadow Generator

Compose layered CSS box-shadows visually, with a live preview.

Shadow layersStack several for realistic depth

Adjust the layers to build your shadow.

The CSS will appear here.

Features

  • Unlimited stacked shadow layers
  • Inset shadows for inner depth
  • Independent colour and opacity per layer
  • Four starting presets
  • Copies plain CSS or a Tailwind arbitrary value

How to use it

  1. Start from a preset, or add layers manually.
  2. Adjust offset, blur, spread and colour per layer.
  3. Watch the live preview.
  4. Copy the CSS into your stylesheet.

Why one shadow rarely looks right

A single box-shadow reads as artificial because real shadows are not uniform. Light scatters, so an object close to a surface casts a tight dark shadow while ambient light produces a much softer, wider one. Stacking two or three layers, one tight and slightly opaque, one broad and very faint, mimics that and is what every mature design system does. Material Design's elevation levels are all multi-layer for exactly this reason.

The four values are offset-x, offset-y, blur and spread. Blur softens the edge and roughly doubles the visual size of the shadow; spread grows or shrinks it before blurring. A common mistake is a large blur with no vertical offset, which produces a glow rather than a shadow because it implies light coming from directly in front. Real interfaces usually assume light from above, so the vertical offset should exceed the horizontal.

Two practical notes. Shadow colour should rarely be pure black at high opacity, a very dark tint of the background hue at 10% to 25% opacity looks far more natural, which is why the presets here use rgba rather than solid values. And box-shadow is expensive to animate, since it forces a repaint on every frame. If you need a shadow to change on hover, animate the opacity of a pseudo-element carrying the larger shadow instead, which stays on the compositor.

Frequently asked questions

Yes, completely. Box Shadow Generator is free with no usage limits, no account and no sign-up. There is no paid tier and no trial that expires. Tools marked Premium on this site carry that label to indicate a deeper feature set, not a price.
Box Shadow Generator covers unlimited stacked shadow layers, inset shadows for inner depth, independent colour and opacity per layer, among other things. Everything is available immediately with no account, no sign-up and no usage limit.
A single box-shadow reads as artificial because real shadows are not uniform. Light scatters, so an object close to a surface casts a tight dark shadow while ambient light produces a much softer, wider one. Stacking two or three layers, one tight and slightly opaque, one broad and very faint, mimics that and is what every mature design system does. Material Design's elevation levels are all multi-layer for exactly this reason.
Everything happens inside your browser. The text you enter is processed by JavaScript running on your own device and is never sent to a server, there is no backend to send it to. You can confirm this in your browser's Network tab while you use the tool. Because nothing depends on a server, the tool also keeps working offline once the page has loaded, the site registers a service worker that caches it after your first visit.

Related tools

Further reading

📖 CSS Box Shadow Explained: Adding Depth and Elevation

Read the full guide on the 123MiniApps blog.

Pick a theme

Ten hand-tuned palettes.