Skip to content

Design

CSS Box Shadow Generator

Adjust CSS shadow offset, blur, spread, opacity and inset with an immediate preview.

How to use this tool
  1. Adjust offset, blur and spread.
  2. Choose color, opacity and inset if needed.
  3. Copy the generated box-shadow declaration.

Loading tool…

Find this tool in

Helpful references

About this tool

What is CSS Box Shadow Generator?

Tune a shadow while seeing the effect of each parameter. Horizontal and vertical offsets control direction, blur softens the edge, spread changes the shadow's size and opacity controls its weight. Use shadows to reinforce grouping or elevation alongside borders and spacing; a shadow by itself is a weak way to communicate an essential interface state.

A worked example

Build a restrained shadow beneath a card

Example input

x = 0 · y = 4 · blur = 12 · spread = 0
#000000 · 0.15

Expected result

0px 4px 12px 0px rgba(0, 0, 0, 0.15)

Keep inset off, set the offsets and blur as shown and choose fifteen percent opacity. The generated value places a soft dark shadow below the element without expanding its unblurred size. Check it on both the intended card color and the surrounding page background: a convincing preview on white can look heavy or disappear in a dark theme.

Common mistakes and limits

  • A parent with clipped overflow can cut off an outer shadow. Inspect the surrounding layout when the copied CSS looks different from the preview.
  • Blur is not a substitute for a visible keyboard focus indicator. Interactive controls still need an accessible focus state.

Features

What you can do

  • Horizontal and vertical offset
  • Blur and spread controls
  • Color and opacity selection
  • Inset and outer shadows

Frequently asked questions

Questions about CSS Box Shadow Generator

What is the difference between blur and spread?

Blur softens the shadow edge. Spread expands or contracts the shadow shape before blur is applied. Negative spread values make the shadow smaller.

Related tools