Back to Tools

Box Shadow Generator

Design perfect shadows with depth and realism

Shadow Master
Visual Result

                

Craft shadows you can see before you code them

A convincing shadow is rarely a single line. Soft interface cards usually stack two or three shadows with different offsets and opacities. This generator lets you build each layer with sliders, judge the effect on a live preview box, and then copy the finished box-shadow declaration in a single step.

Building a shadow

  1. Look at Shadow Layers. You start with one layer. Adjust its H-Offset and V-Offset sliders from minus 50 to 50 pixels, and the Blur from 0 to 100 pixels.
  2. Pick a shadow Color, set its Opacity from 0 to 1, and tick Inset if you want an inner shadow.
  3. Press Add Layer to stack more shadows. Each layer is numbered, and a trash icon appears so you can delete any layer while at least one remains.
  4. Set the Preview Background and Box Color to resemble your real design.
  5. Or begin with a preset: Soft Depth, Hard Edge, Neumorphic or Deep Inset.
  6. Click Generate Shadow CSS, check the 150 pixel preview, and use Copy CSS.

What the result looks like

The colour and opacity you choose are merged into an rgba value. Each layer becomes one entry in the list, written as optional inset, horizontal offset, vertical offset, blur, a spread value and the colour, and multiple layers are separated by commas on new lines. Layers are painted in the order listed, with the first one on top.

When it saves time

Limits and tips

The spread radius is not adjustable; the tool always writes it as 0 pixels. If you need a larger or shrunken shadow, edit that number in the copied CSS. Moving any slider hides the earlier output, so click Generate again after tweaking. The preview panel colours help you judge contrast, but they are not part of the code you copy.

Keep opacity low for realistic depth. Dark, sharp shadows look heavy on light backgrounds, and light shadows are invisible on white. Stacking a tight, subtle layer with a wide, faint layer usually looks more natural than one large blur. Everything is calculated in the browser as you interact.

Related Tools




Frequently Asked Questions

Can I combine multiple shadows on one element?
Yes. Press Add Layer to add as many shadows as you like. The generated box-shadow lists them separated by commas, with the first layer painted on top of the others.
Is there a spread control?
No. The spread radius is always written as 0px in the output. If you want a shadow that grows or shrinks, change that value by hand in the copied CSS.
What do the presets do?
Soft Depth, Hard Edge, Neumorphic and Deep Inset each replace your layers with a starting recipe. Neumorphic also changes the preview and box colours to grey. You can keep editing after applying one.
How is shadow colour written in the CSS?
The colour you pick and its opacity slider are converted into an rgba value for each layer, for example a black at 0.3 opacity. This lets each layer have its own transparency.
Why did my code disappear after I moved a slider?
Changing any layer setting hides the previous result so you never copy outdated code. Click Generate Shadow CSS again to refresh the preview box and the copy-ready output with your latest values.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.