CSS Box Shadow Generator

Free CSS box-shadow generator. Build a box-shadow with horizontal/vertical offset, blur, spread, color, and inset, with a live preview and copy-ready CSS.

AI-ready Use this tool with AI

This tool has a free JSON API. Copy a prompt or skill below to use it with ChatGPT, Claude, or any AI agent — no API key needed.

API docs
Adjust the values above.

How css box shadow generator works

The CSS box-shadow property adds one or more shadows to an element. A single shadow takes up to six values: horizontal offset, vertical offset, blur radius, spread radius, color, and the optional keyword inset for an inner shadow. Positive offsets move the shadow right and down; negative values move it left and up.

Blur softens the shadow's edges (0 is a hard edge, larger values are softer), and spread grows or shrinks the shadow's size. The color can be a hex value (with alpha, like #00000040 for 25% black) or an rgba()/rgb() value. Inset flips the shadow to render inside the element, useful for pressed or carved effects.

Adjust the sliders and color, and the preview updates instantly with the generated box-shadow applied. The output is a ready-to-paste CSS declaration you can drop straight into a stylesheet. Combine multiple shadows with commas for layered effects (this generator focuses on a single shadow).

Frequently asked questions

What is the box-shadow syntax?
box-shadow: h-offset v-offset blur spread color [inset];. For example, box-shadow: 4px 4px 10px 0px #00000040; adds a soft black shadow offset down and to the right.
What does spread do?
Spread grows or shrinks the overall size of the shadow. Positive spread makes the shadow larger than the element; negative spread makes it smaller. A spread of 0 keeps the shadow at its natural size.
How do I make an inset shadow?
Add the keyword inset at the start or end. Inset shadows render inside the element, creating a pressed or carved look — useful for buttons and inputs.
How do I set the shadow opacity?
Use an alpha hex color like #00000040 (the last two digits are 00–FF alpha) or an rgba() color like rgba(0,0,0,0.25). This generator accepts both formats.