Skip to main content
GARGLOO

Box Shadow Generator

Soft shadows, sharp outlines — copy the CSS.

Runs on your device

At a glance

Input:
Slider values
Processing:
Runs locally in your browser
Privacy:
Nothing you type is sent to a server

Last updated: 2026-11-09

Common use cases

  • Adding a soft lift to a card without writing CSS by hand
  • Making a neumorphic button with two opposite shadows
  • Copying a sharp 2px outline for a focus state
  • Testing how a glow looks on a dark background before shipping it

About this tool

Drag sliders for offset, blur, spread, color, opacity and inset, and watch a sample card wear the shadow live — then copy the box-shadow CSS straight into your stylesheet. Stack up to 6 layers, reorder them, or start from a preset: card lift, ambient glow, neumorphic or sharp outline. Everything runs locally in your browser, nothing is uploaded. Very large blurs are expensive on low-end phones, so keep the blur small on elements that scroll or animate.

How to use it

  1. Pick a preset or start from the default card lift.
  2. Select a layer and drag its sliders — offset, blur, spread, opacity — or type exact values.
  3. Set the color with the picker or a HEX code, and tick Inset for an inner shadow.
  4. Copy the CSS and paste it into your stylesheet.

Worked examples

Input: Card lift preset (two layers)

Output: box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.12), 0px 4px 12px 0px rgba(0, 0, 0, 0.16);

Two soft layers: a tight one close to the card and a wider, fainter one — the classic Material-style lift.

Input: Inset shadow — 0 2px 8px, black at 40% opacity, inset on

Output: box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.4) inset;

Inset puts the shadow inside the box edge — the pressed-button look. Note inset comes after the color.

Input: Sharp outline preset (0 0 0, spread 2px, #111111)

Output: box-shadow: 0px 0px 0px 2px rgba(17, 17, 17, 1);

Zero blur plus a 2px spread draws a crisp outline with no softness — handy for focus states.

Practical tips

  • Stack two layers for realistic depth: a small tight shadow plus a larger faint one.
  • Negative spread shrinks the shadow — useful when a big blur spills too far.
  • Check the shadow on the dark preview background too — black shadows vanish on dark surfaces.

Common mistakes

  • Cranking the blur to 100px and wondering why the page stutters on a phone — big blurs are expensive; keep them small on scrolling elements.
  • Using only opacity to soften a shadow and losing the shape — blur softens the edge, opacity only fades it.
  • Forgetting the layer order — the first layer paints on top, so a dark layer above a glow hides it.

How this compares

Most box-shadow tools online give you one layer and a single output box. This one stacks up to 6 layers with reorder, per-layer colors and opacity, an inset toggle, four named presets, a dark-background preview and one-click copy — all local, no account. The tradeoff: it writes the CSS, it does not manage your stylesheet — paste the output where your card styles live.

Good to know

  • Up to 6 layers — more than that belongs in a design token, not a single declaration.
  • The preview card is a fixed light/dark surface; your real background may make the same shadow read lighter or darker.
  • HEX input needs 3 or 6 hex digits — named colors like 'red' are not accepted; use #FF0000.
  • Opacity is baked into the rgba color — the same shadow on a different background color looks different.

Frequently asked questions

What does each shadow value do?

Offset X and Y move the shadow, blur softens its edge, spread grows or shrinks it, color and opacity set how dark it is, and inset puts it inside the box instead of outside.

Why does my shadow look different on a dark background?

The shadow is a translucent color over the background: a black shadow at 20% on dark gray is barely visible. Use a lighter color or raise the opacity — the preview has a dark-background toggle to check.

What is an inset shadow?

A shadow inside the box edge instead of outside it — good for pressed buttons and inner depth. Tick the Inset box for the active layer.

How many layers can I stack?

Up to 6. Layers paint top to bottom in list order — the first layer is on top — and you can reorder them with the arrows.

Is my data uploaded?

No. Everything runs in your browser — the shadow values never leave this tab.

All developer tools
Box Shadow Generator | GARGLOO