CSS Box Shadow Generator

Updated July 2026

Design a CSS shadow visually: drag the sliders for horizontal and vertical offset, blur, spread, color and opacity, toggle inset, watch the live preview update, and copy the ready-to-use box-shadow CSS. Everything runs privately in your browser.

box-shadow takes horizontal & vertical offsets, blur, spread and a color. Adjust the sliders to design a shadow and copy the CSS — for example, box-shadow: 0 4px 12px 0 rgba(0,0,0,0.15);
Draws the shadow inside the box instead of outside it.

How the box-shadow property works

The CSS box-shadow property paints one or more shadows around an element's box. A single shadow is written as up to five parts: a horizontal offset, a vertical offset, an optional blur radius, an optional spread radius and a color. Positive offsets push the shadow to the right and downwards; negative offsets move it left and up.

The blur radius controls how soft the edge is — 0 gives a hard, sharp shadow while larger values fade it out. The spread radius grows the shadow (positive) or shrinks it (negative) before the blur is applied. Adding the inset keyword flips the shadow to the inside of the box. This generator combines your chosen color and opacity into an rgba() value so the shadow blends naturally over any background.

Worked example: the values horizontal 0, vertical 4px, blur 12px, spread 0 with black at 0.15 opacity produce box-shadow: 0 4px 12px 0 rgba(0,0,0,0.15); — a soft card shadow sitting just below the element.

Reference note: to layer depth, comma-separate several shadows in one declaration; the first listed shadow is painted on top.

Preset shadows

PresetCSS
Subtlebox-shadow: 0 1px 3px 0 rgba(0,0,0,0.12);
Cardbox-shadow: 0 4px 12px 0 rgba(0,0,0,0.15);
Floatingbox-shadow: 0 16px 40px 0 rgba(0,0,0,0.25);

Frequently asked questions

How does CSS box-shadow work?
The box-shadow property paints one or more shadows around an element's box, each defined by a horizontal offset, a vertical offset, an optional blur radius, an optional spread radius and a color. Positive offsets move the shadow right and down.
What do the box-shadow values mean (offset, blur, spread)?
The first two values are the horizontal and vertical offsets in pixels. The third is the blur radius — bigger numbers soften the edge. The fourth is the spread radius, which grows or shrinks the shadow. The last value is the color.
How do I make a soft / subtle shadow?
Use small offsets, a moderate blur and a low-opacity color, such as 0 1px 3px rgba(0,0,0,0.12). Keep the spread at 0 and the opacity low to avoid a heavy, hard-edged look.
What is an inset shadow?
Adding the inset keyword draws the shadow inside the box instead of outside, giving a pressed or carved-in look that suits inputs, wells and pressed buttons.
How do I add multiple shadows?
Comma-separate several shadow definitions in one declaration, e.g. box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 8px 24px rgba(0,0,0,0.15). The first shadow in the list is painted on top.
How do I copy the box-shadow CSS?
Adjust the sliders until the preview looks right, then click the Copy button next to the generated box-shadow line to place the full declaration on your clipboard.
⚡ CSS Box Shadow Generator — by larely ↗

Related tools

HTML Entity Encoder / Decoder

Escape and unescape HTML special characters and entities.

Text to Speech Reader

Read any text aloud with your browser's built-in voices.

Regex Tester

Test and debug regular expressions live, with match highlighting and groups.

Cron Expression Generator

Build, explain and preview cron schedules with their next run times.

Aspect Ratio Calculator

Resize dimensions proportionally and simplify resolutions to a ratio.

Markdown Preview

Live Markdown-to-HTML preview with copyable HTML output.

Subnet Calculator

IPv4 CIDR subnet calculator: network, broadcast, mask and host range.

PX to REM Converter

Convert between px, rem, em and pt for CSS at any base font size.

Hash Generator

Generate SHA-256, SHA-1, SHA-384 and SHA-512 hashes in your browser.

JWT Decoder

Decode a JSON Web Token's header and payload .

Sort Text Lines

Sort, deduplicate, reverse, shuffle and clean a list of lines.

JSON to CSV Converter

Convert a JSON array to CSV and CSV back to JSON.

Browse all 251 free tools →