Register in 30 seconds, save hours

Please log in or sign up to use this feature.

Generate multi-layer CSS box shadows with live preview

CSS Box Shadow Generator

Layers

Options
X Offset (Horizontal) 0px
-100px 100px
Y Offset (Vertical) 10px
-100px 100px
Blur 20px
0px 100px
Spread -2px
-50px 50px
Shadow Color #000000
Shadow Opacity 15%
0% 100%

Preview Options

Box Color #ffffff
Box Border Radius 16px
0px 100px

Preview

CSS Box Shadow box-shadow
CSS

Full Element CSS

CSS

Presets

CSS Box Shadow Generator & Multi-Layer Shadow Designer

The CSS Box Shadow Generator is a powerful, visual web design utility for creating standard, soft, floating, glowing, and multi-layered CSS box shadows. Quickly configure horizontal and vertical offsets, blur radius, spread distance, color opacities, and inset inner shadows with live real-time preview and instant copy-paste CSS code.

Read more

How to Use the CSS Box Shadow Generator

  1. Adjust Shadow Offsets: Move the X Offset and Y Offset sliders to position the light source and shadow casting direction.
  2. Fine-Tune Blur & Spread: Use the Blur Radius slider to soften the shadow edges, and the Spread Radius slider to expand or contract the shadow perimeter.
  3. Select Color & Opacity: Pick any hex color and adjust the dedicated opacity slider for subtle, realistic depth.
  4. Create Multi-Layer Shadows: Click + Add Layer to combine multiple shadows into one natural, realistic elevation stack.
  5. Toggle Inset Mode: Check the Inset (Inner Shadow) box to cast shadows inside the element for pressed buttons, wells, and recessed inputs.
  6. Browse Presets: Click on any of the curated presets—from smooth cards and floating modals to vibrant neon glows and neo-brutalism outlines—to load them instantly.
  7. Copy CSS: Copy the ready-to-use box-shadow property or complete CSS snippet straight into your project.

Understanding CSS box-shadow Syntax

The CSS box-shadow property accepts up to six components per layer:

CSS
box-shadow: [inset] <offset-x> <offset-y> <blur-radius> <spread-radius> <color>;

1. Horizontal & Vertical Offsets (offset-x, offset-y)

offset-x defines horizontal distance (positive values move shadow right, negative move left). offset-y defines vertical distance (positive moves down, negative moves up).

2. Blur Radius (blur-radius)

A non-negative value defining how blurred the shadow edges appear. A value of 0px produces sharp, hard-edged shadows, while larger numbers create softer, smoother dispersion.

3. Spread Radius (spread-radius)

Expands (positive values) or contracts (negative values) the shadow perimeter before blur is applied. Negative spread is frequently used in modern web design to create crisp, high-end floating card shadows.

4. Inset Keyword

When present, changes the shadow from an outer drop shadow to an inner recessed shadow drawn inside the element border box.

5. Multi-Layer Shadows

Multiple shadows can be chained together with commas (e.g. box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);). Layering two or more subtle shadows produces far more natural and realistic light simulation than a single heavy shadow.

FAQ

What is the difference between blur radius and spread radius?

Blur radius determines the fuzziness or softness of the shadow edge, whereas spread radius actually increases or decreases the physical size/area of the shadow before it gets blurred.

Why do multi-layer shadows look more realistic?

In physical optics, light sources cast both a tight, sharp contact shadow (umbra) and a wider, softer ambient shadow (penumbra). Combining a small, dense shadow layer with a larger, faint shadow layer mimics natural ambient light.

How do I create an inner/inset shadow with CSS?

Add the inset keyword at the beginning or end of your box-shadow declaration: box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);.

Is CSS box-shadow supported across all browsers?

Yes. CSS box-shadow is fully supported across all modern web browsers, including Chrome, Firefox, Safari, Edge, Opera, iOS Safari, and Android browsers.