Loona Automation logoLoona Developer Tools
Home › Developer Tools › CSS Box Shadow Generator

CSS Box Shadow Generator - Layered, Realistic Shadows Visually

In short: the CSS Box Shadow Generator builds box-shadow CSS layer by layer - offsets, blur, spread, colour, opacity and inset - with a live preview, so cards and buttons get realistic depth instead of one flat grey blur.

One harsh shadow looks fake; two or three soft layers look like light. This generator makes layering easy and shows the result as you tune it.

Private by design: everything in this tool happens 100% in your browser with JavaScript. Your input is never uploaded to a server, never stored and never seen by us - close the tab and everything is gone.

How to use the CSS Box Shadow Generator

  1. Adjust the first layer: vertical offset and blur do most of the work.
  2. Set the colour and lower the opacity for softness (0.1-0.3 is the realistic range).
  3. Add a second, tighter layer for contact depth, or tick Inset for an inner shadow.
  4. Copy the generated CSS.

How it works

A box-shadow layer is offset-x offset-y blur spread colour, and multiple layers are comma-separated - the first layer paints on top. Realistic elevation usually pairs a small, darker contact shadow with a larger, softer ambient one, which is why this tool is built around layers rather than a single shadow. Colours are emitted as rgba() so opacity travels with the colour, and the preview box updates on every keystroke.

Frequently Asked Questions

Is this generator free?

Yes - completely free, no sign-up.

How many layers can I add?

As many as you like - CSS itself has no practical limit, though 2-3 layers cover most designs.

What values make a shadow look natural?

A modest vertical offset, generous blur, and low opacity (0.1-0.3). Pure black at full opacity almost never looks real.

What is an inset shadow?

A shadow drawn inside the element's border instead of outside - used for pressed or recessed effects.

Is anything uploaded?

No. Everything runs in your browser.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.