SanWebCorner · CSS Tools

CSS Box Shadow Generator

Create a CSS box shadow with visible numeric values and a live preview. Adjust offsets, blur, spread, opacity and color, or switch between outer and inset shadows.

Free · no signupInteractive controlsCopy & download

How to create a box shadow

  1. Select Soft, Elevated or Inset as a starting point.
  2. Adjust numeric values directly or move their paired sliders.
  3. Choose the shadow color and opacity. Try a light or dark preview background.
  4. Copy the declaration or download box-shadow.css. Reset shadow restores the Soft preset.

What the shadow values mean

X offset moves the shadow horizontally; Y offset moves it vertically. Blur softens the edge and cannot be negative. Positive spread expands the shadow, while negative spread contracts it. Inset draws the shadow inside the element’s border box. The MDN box-shadow reference explains the property’s value order and rendering.

box-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.2);

Preview and output

The preview uses a sample card so you can inspect the effect. Its background selector is a viewing aid and is not included in the exported declaration. Your real element’s background, border radius and surroundings affect the perceived shadow.

This tool supports one shadow. CSS also permits comma-separated multiple shadows; add those deliberately in your stylesheet if needed. Large shadows can extend beyond a small preview or be clipped by an ancestor with restrictive overflow.

Input limits

X/Y offsets and spread support −100 to 100px, blur supports 0–200px, and opacity supports 0–100 percent. Invalid input clears the generated output instead of leaving a stale result ready to copy.

Frequently asked questions

Why is my shadow hard to see?

Increase opacity or blur, inspect its color, and try the other preview background. Zero opacity hides the shadow.

Can I use a negative blur?

No. Negative blur is rejected. Use spread to contract the shadow.

Does this create a text shadow?

No. It generates box-shadow for element boxes. Text-shadow has different syntax.

Local processing and downloads

The tool component runs locally in your browser without a conversion API or saved input history. Copy exports the current output; Download saves the current result. Normal website advertising and analytics still run on this page.

More CSS tools