Create a CSS Box Shadow

Drag the sliders to shape a shadow for a card, a button or a modal, stack up to four for a softer, more realistic depth, and copy the box-shadow line into your CSS.

  • Free
  • Runs in your browser
  • Up to 4 layers
  • No sign-up
How it works

How It Works

Design a shadow in three steps.

01

Shape the shadow

Set the offsets, blur, spread, color and opacity.

02

Stack layers

Add more shadows for depth, or tick Inset for an inner shadow.

03

Copy the CSS

Paste the box-shadow line into your stylesheet.

About

What each box-shadow value does

A shadow is written as horizontal offset, vertical offset, blur, spread and color, for example 0 10px 25px -5px rgba(15, 23, 42, 0.25). Offsets move it, blur softens its edge, spread grows or shrinks it before blurring, and the color's alpha sets how dark it is. Several shadows separated by commas are drawn on top of each other, which is how design systems get soft, natural-looking depth.

Shadows cost little to draw but large blurs on many elements can slow scrolling on low-end phones. Keep blur values moderate on long lists.

Offset

A positive vertical offset puts the light above, which is what most interfaces assume.

Blur and spread

A negative spread with a large blur gives the soft floating look used on cards.

Up to four layers

Combine a tight, darker shadow with a wide, faint one for realistic depth.

Inset

Draws the shadow inside the box, for pressed buttons and input fields.

Features

Why Use This Generator

Get the shadow right by eye.

Live preview

Change the box color, background and corner radius to match your design.

Layered shadows

Up to four shadows in one declaration.

Clean CSS

One box-shadow line with rgba() colors, ready to paste.

No sign-up

Free, in your browser.

✓ No Registration✓ Free✓ Browser-based✓ Text Stays Local
FAQ

Frequently Asked Questions

Questions people ask about the Box Shadow Generator.

Use a small vertical offset, a large blur, a negative spread and low opacity, for example 0 10px 25px -5px at 25% opacity. Adding a second, tighter shadow makes it look more natural.