Home › Toolkit › Developer › Box Shadow Generator

⬛ Box Shadow Generator

A good shadow is why a card looks lifted instead of bordered. Tune offsets, blur and spread here — stack layers for realism — and copy the box-shadow CSS with a live preview.

Preview card

About this tool

Shadows are the cheapest depth cue in interface design, and the difference between amateur and professional is almost always layering. A single hard shadow looks pasted on; two or three soft layers — a tight contact shadow, a wide ambient one — imitate how light actually behaves. This generator edits each layer's four numbers and colour, previews the stack on a real card, and writes the comma-separated CSS.

The vocabulary, once: X and Y move the shadow sideways and down; blur softens its edge; spread grows or shrinks it before blurring; inset flips it inside the box, for pressed or carved effects. Negative spread with generous blur is the modern recipe — it keeps the shadow hugging the element instead of haloing. The preview updates as you type, so the numbers stop being abstract within a minute of playing.

How to use it

  1. Adjust the first layer's offsets, blur, spread and colour.
  2. Add layers for depth — a small tight one plus a large soft one is the classic pair.
  3. Copy the generated box-shadow declaration.

Good to know

  • Match shadow colour to the environment: a very transparent black, or a darkened version of the background hue, never pure solid black.
  • Shadows imply a light source — keep Y positive and consistent across a whole interface so every card obeys the same sun.
  • Elevation systems: define 3–4 shadow recipes (resting, raised, overlay) and reuse them; consistency is what reads as polish.

Frequently asked questions

How many layers can I stack?

As many as you add — CSS accepts long comma-separated lists, though two or three layers cover most real designs.

Why does my shadow look like a grey box?

Blur is too low or opacity too high. Raise the blur, and pick the colour swatch's shadow at a soft strength — the preview tells the truth.

Does box-shadow affect layout?

No — shadows paint outside the box without moving anything, which is why they are safe to tune freely.

More Developer tools

Making videos too? Try our YouTube SEO Checker, or browse the full Toolkit and the free YouTube tools.