CSS Box Shadow Generator
Layered Shadows, Live Preview

Design a shadow and copy the CSS. Stack multiple layered shadows, set offset, blur, spread, color with opacity and inset, then copy the box-shadow declaration or a Tailwind class. 100% client-side. Zero data stored.

A white card with a soft shadow next to the CSS line box-shadow: 0 10px 25px rgba(0,0,0,0.25);

CSS Box Shadow Generator Tool

Design a Box Shadow

Presets

16px
CSS
 
Tailwind CSS
 

Tailwind has no utility for a custom shadow, so this is an arbitrary value that works in versions 3 and 4. Its built-in shadow-md and shadow-lg are different values.

Whole element
 

Common Use Cases

Cards and Panels

Lift a card, dialog or dropdown off the page with a soft shadow, and copy the exact value for your stylesheet.

Smooth Layered Shadows

Stack several faint shadows of growing size for a natural falloff that a single blur cannot give.

Neumorphism

Pair a dark and a light shadow on a same-color box for the soft, extruded look, and check it on your real background.

Glows and Focus Rings

Use a zero-offset colored shadow for a neon glow, or a spread-only shadow for a focus ring that follows the corners.

Hard Offset Shadows

Set the blur to zero for the flat, comic and brutalist offset look on buttons and cards.

Inner Shadows

Turn on inset to press a field or panel into the page, and combine it with an outer shadow on the same element.

Box Shadow Syntax Reference

The Parts of One Shadow

Part Example What it does
X offset6pxMoves the shadow right; negative moves it left
Y offset10pxMoves the shadow down; negative moves it up
Blur25pxSoftens the edge; 0 is a hard edge and it cannot be negative
Spread-4pxGrows or shrinks the shadow before the blur; needs a blur value written before it
Colorrgba(0, 0, 0, 0.25)Any CSS color; opacity usually makes a shadow look natural
insetinset 0 2px 4px #000Draws the shadow inside the box instead of outside

Output Shortening and Layers

You set The CSS is written as
Blur 0, spread 06px 6px #000
Blur 25, spread 00 10px 25px rgba(0, 0, 0, 0.25)
Blur 0, spread 30 0 0 3px #3b82f6
Two or more shadowsone per line, separated by commas

With several shadows, the first one is drawn on top. Use the arrows on each shadow to change the order.

Follows the box

A box shadow follows the rectangle and its border radius. It does not follow the outline of a transparent PNG or an SVG; use filter: drop-shadow() for that.

Clipped by clip-path

A clip-path on the same element cuts its shadow off too. Put the shadow on a wrapper element instead.

Cost of large blurs

Big blur values on large elements that animate can slow painting on weak devices. Animate opacity or transform instead when you can.

Related tools

Round the corners with the Border Radius Generator and pick colors with the Color Converter.

Pro Tip: URL Parameters

Open the generator with a design already loaded. Use ?preset= with soft, hard, smooth, neumorphism, glow or inner, or describe the whole design with ?s=, ?box=, ?bg= and ?r=. For example: /box-shadow-generator/?preset=glow or /box-shadow-generator/?s=0,10,25,0,000000,0.25,0&box=ffffff&bg=f1f5f9&r=16

Each shadow in s is x,y,blur,spread,hex,opacity,inset (1 for inset, 0 for outer), with several shadows joined by a tilde. Colors are HEX without the #. The Copy Link button builds the link from your current design.

Frequently Asked Questions

Why We Built This Box Shadow Generator

A good shadow is rarely one value. Designers stack several faint layers, add a colored glow or an inner edge, and then tweak the numbers until it looks right. Typing that into a stylesheet by trial and error is slow, and most generators only handle a single shadow. We built one page where every layer has its own offset, blur, spread, color, opacity and inset switch, and the preview updates as you drag.

The output is written in its shortest valid form, so a hard shadow is just 6px 6px #000 and a focus ring has no stray zeros. You can copy the declaration, a Tailwind class, or the whole element rule, download it as a CSS file, and share a link that restores the exact design. Everything runs in your browser - nothing you design is sent anywhere.

The Box Shadow Generator is part of RJL.io's collection of free developer tools. Round the corners with the Border Radius Generator, cut shapes with the Clip Path Generator, and build backgrounds with our Gradient Generator.

Is your site ready for Google and AI search?

The free SEO Analyzer checks any page in seconds - meta tags, structured data, AI crawler access - and tells you exactly how to fix each issue on your platform.