Utility Tools

CSS Box Shadow Generator

Build layered, inset-aware CSS box shadows visually — stack multiple shadows, tune each one, and copy the finished CSS instantly.

Private by default Instant results No signup
CSS Box Shadow Generator
Live
Presets
Layer 1
X-Offset0px
Y-Offset8px
Blur24px
Spread-4px
Color
Opacity22%
CSS
box-shadow: 0px 8px 24px -4px rgba(0, 0, 0, 0.22);
Overview

What is a CSS Box Shadow Generator?

A box shadow generator turns the six values behind CSS's box-shadow property — horizontal offset, vertical offset, blur, spread, color, and opacity — into sliders and a live preview, instead of a line of numbers that's hard to picture until it's pasted into a browser. Drag a slider and the preview element updates immediately, so the relationship between "blur" and "spread" or between offset and direction becomes obvious rather than theoretical.

CSS also allows more than one shadow on the same element, comma-separated, which is how most realistic depth effects are built — a soft, spread-out shadow layered under a tighter, darker one reads as more convincing depth than either alone. This tool supports any number of layers, each with its own full set of controls and an inset toggle, and combines them into one ready-to-copy CSS value.

Guide

How to use it

1Pick a preset or start from the default layer
2Adjust offset, blur, spread, color, and opacity
3Add more layers or toggle inset as needed
4Copy the finished CSS when it looks right

How the values work together

The horizontal and vertical offsets move the shadow away from the element — positive values push it right and down, negative values push it left and up. Blur controls how soft the shadow's edge is: zero produces a hard-edged silhouette, while larger values spread the same shadow into a soft gradient. Spread grows or shrinks the shadow's size independently of blur, before the blur softens its edge, which is what lets a shadow look bigger or smaller than the element casting it. Toggling inset flips the shadow to render inside the element's border instead of outside it, which is how pressed-in, carved, or recessed effects are built.

Why it helps

Features & benefits

Unlimited stacked shadow layers
Inset toggle per layer
Independent color and opacity per layer
Six ready-made presets to start from
Live preview updates as you edit
100% private — nothing leaves the device

Why people design shadows visually

A single shadow is easy enough to write from memory, but realistic depth almost always needs more than one layer, and stacking several shadows by hand means re-testing the whole combination every time one value changes. Seeing every layer update together in real time turns that into a much faster loop — nudge a slider, see the full stack respond, and stop the moment it looks right instead of after a dozen save-and-refresh cycles. It's also the fastest way to build a small system of consistent elevation levels — subtle, soft, elevated — that a UI can reuse across cards, buttons, and modals.

Why this runs entirely in your browser

Every layer, slider, and color choice is computed locally in JavaScript — nothing about the shadow being designed is sent to a server. That keeps the preview instant, since there's no round trip for every slider movement, and means the tool keeps working without a network connection once the page has loaded. Nothing persists after the tab is closed.

Getting a shadow that reads well

Low opacity, dark colors tend to look more natural than high-opacity black, since real shadows are rarely fully opaque. A soft, low-opacity, wide-spread layer combined with a tighter, slightly darker layer close to the element usually reads as more convincing depth than one large shadow alone. For inset effects, smaller blur and spread values generally look better than large ones, since an inset shadow is meant to suggest a shallow recess rather than a deep hole.

Frequently asked questions

A few things people usually want to know before copying the CSS.

Blur softens the shadow's edge into a gradient, while spread grows or shrinks the shadow's overall size before that blur is applied.

It renders the shadow inside the element's border instead of outside it, producing a pressed-in or recessed look rather than a raised one.

Yes. Add as many layers as needed with the "Add layer" button — each one has its own full set of controls, and all of them combine into a single comma-separated CSS value.

CSS shadow colors typically need some transparency to look natural, so opacity is exposed separately and combined with the chosen color into an rgba value.

No. Every layer and value is generated and held locally in the browser. Nothing is sent to a server or saved after the tab is closed.