← Back

CSS Box-Shadow Generator

LOCAL

Create visual CSS box-shadow values as ready-to-use code.

Input

Output

What is CSS Box-Shadow Generator?

CSS Box-Shadow Generator assembles one shadow declaration from horizontal and vertical offsets, blur, spread, color, opacity and inset. Choose Generate after changing values. The result is code for your own element, rather than a rendered shadow preview or an exported image.

How to use CSS Box-Shadow Generator

Set Offset X to 0, Offset Y to 10, Blur to 30, Spread to 0, Color to #000000 and Opacity to 0.3, with Inset unchecked. Expect box-shadow: 0px 10px 30px 0px rgba(0,0,0,0.3);. Positive X moves the shadow right; positive Y moves it down.

When is CSS Box-Shadow Generator useful?

Check Inset and generate again: the declaration begins with box-shadow: inset and describes an inner shadow. Negative offsets move left or up. Positive spread enlarges the shadow’s shape; negative spread reduces it. Blur must be non-negative. Opacity 0 is transparent, 1 is opaque; the tool clamps entered opacity values to that range.

Example

To see the difference between blur and spread, first keep Spread at 0 and reduce Blur to 0 for a hard edge. Then increase Spread to 4 to enlarge that edge. The generator emits one shadow at a time; it does not create multiple comma-separated shadows, hover rules, selectors or responsive settings.

Practical notes

Paste the declaration into your component’s CSS and check it against the intended background, border radius and surrounding elements. A shadow does not reserve layout space, and a parent with overflow clipping may cut it off. It follows the element’s box, not the transparent outline of an image. The box-shadow reference explains the parameters. Values are processed locally in your browser.