Design Tool

Free Box Shadow Generator

Craft beautiful CSS box shadows visually. Stack multiple layers, fine-tune offset, blur, spread, colour and alpha, then copy production-ready CSS in one click.

Live preview 100% offline Multi-layer shadows Copy-ready CSS

Live preview

Preview element
box-shadow applied here

Shadow layers

Shadows stack top to bottom — the first layer appears on top.

Presets & output

Presets
Actions
CSS output
styles.css
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

About CSS Box Shadow

The box-shadow CSS property draws a shadow behind any element. It accepts up to five values — horizontal offset, vertical offset, blur radius, spread radius and colour — plus the optional inset keyword to flip the shadow to the inside of the element. Multiple shadows can be stacked by separating them with commas, which is how modern, realistic elevation effects are built.

Done well, shadows suggest depth and focus. Done badly, they look artificial. This generator gives you all the controls you need to make them look natural, with a live preview on different backgrounds so you can see how they hold up in real layouts.

The five box-shadow values

ValueWhat it does
X offsetHorizontal shift. Positive moves right, negative moves left.
Y offsetVertical shift. Positive moves down (shadows usually fall downward).
BlurSoftens the edge. 0 = hard edge, larger = fuzzier and softer.
SpreadGrows or shrinks the shadow before blur. Positive expands, negative contracts.
ColourAny CSS colour. Almost always uses alpha for a soft translucent look.

Add inset at the start to flip the shadow inward — used for input fields, pressed buttons and recessed surfaces.

How to make shadows look good

Common elevation patterns

LevelTypical shadowUse
Subtle0 1px 2px rgba(0,0,0,.06)Cards, list items, inline elements
Medium0 4px 12px rgba(0,0,0,.1)Buttons on hover, floating inputs
High0 12px 24px rgba(0,0,0,.12)Dropdowns, popovers, tooltips
Modal0 24px 48px rgba(0,0,0,.18)Dialogs, full-screen overlays
Insetinset 0 2px 4px rgba(0,0,0,.06)Form fields, pressed states

Common use cases

Cards & panels

Add subtle depth without a border.

Hover states

Lift buttons and list items on interaction.

Modals & dropdowns

Separate overlays from the page below.

Neumorphism

Soft UI pressed-in and raised effects.

Form inputs

Inset shadows for a recessed field look.

Coloured glows

Soft coloured halos behind accent elements.

Privacy and accuracy

This box shadow generator runs entirely in your browser. All generation happens locally in JavaScript with no server calls. The values you enter are never transmitted, stored or logged.

Frequently Asked Questions

What is a CSS box shadow?
The box-shadow CSS property draws a shadow behind any element. It accepts up to five values: horizontal offset, vertical offset, blur radius, spread radius and colour. Adding the keyword inset makes the shadow fall inside the element instead of outside, which creates a pressed or recessed effect.
What does each box-shadow value do?
The X offset moves the shadow horizontally (positive = right). The Y offset moves it vertically (positive = down). Blur softens the edge — 0 is a hard edge, larger numbers make the shadow fuzzier. Spread grows or shrinks the shadow before blur is applied (positive expands, negative contracts). Colour is any CSS colour, usually with alpha for a soft translucent look.
What does inset mean in box-shadow?
The inset keyword flips the shadow to the inside of the element, so it appears pressed in rather than raised. Inset shadows are commonly used for input fields, progress bars, inner dividers and neumorphic UI.
Can I stack multiple box shadows on one element?
Yes. Separate shadow layers with commas and they stack, rendered top to bottom — the first shadow on the list appears on top. Layering a tight dark shadow with a wider soft shadow is the standard technique for realistic elevation on cards and buttons.
Why do my shadows look flat?
Single shadows with pure black at high opacity look harsh and artificial. Real shadows are soft, layered and slightly coloured. Try lowering opacity to 0.08–0.15, using a dark blue-black instead of pure black, and stacking a tight shadow with a wide soft one.
What is neumorphism?
Neumorphism (soft UI) is a design style where elements appear pressed out of or into their background using two shadows — one light coming from the top-left and one dark falling to the bottom-right (or vice versa). The element and background must share the same base colour for the effect to work.
How many shadow layers should I use?
Two or three layers is ideal for most designs. One gives the base shape, a second adds depth, and occasionally a third adds a subtle colour cast. More than four layers is rarely worth the rendering cost and usually makes the shadow look muddy.
Is this box shadow generator free?
Yes, it is 100% free, requires no sign-up and runs entirely in your browser. No length limits, no watermarks, no premium tier.

Related Colour Tools

Done!