← All tools

Design & developer tools · Runs in your browser

CSS Box Shadow Generator

Tune a shadow with live controls and preview the result before copying the CSS.

Live preview

About the CSS Box Shadow Generator

The CSS Box Shadow Generator provides controls for horizontal and vertical offsets, blur, spread, color, and opacity, then previews a corresponding CSS shadow. It helps designers explore a visual treatment without hand-editing every value. A generated shadow still needs contrast and layout review across the surfaces where it will appear.

How to use this tool

  1. Adjust the horizontal and vertical offset to position the shadow.
  2. Set blur, spread, color, and opacity to shape its appearance.
  3. Inspect the preview against both light and dark surrounding surfaces.
  4. Copy the CSS and test it in the component that will use the shadow.

Example

Input

0px 4px 12px 0px rgba(0, 0, 0, 0.18)

Possible output

box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.18);

The sample uses a modest downward offset and blur; it is illustrative rather than a universal design recommendation. Confirm that the shadow does not obscure nearby text or create unwanted focus cues. Multiple layers can be composed in CSS when a single shadow is insufficient.

Practical tips and limitations

Large or dark shadows can make interfaces feel visually heavy and may reduce clarity around controls. Check the result at mobile sizes and with the actual background color. Use borders or other cues as well when a component boundary must remain perceivable without relying on shadow alone.

Frequently asked questions

Does the tool update a stylesheet automatically?

No. Copy the generated declaration and add it to your project’s CSS yourself.

Can I use several shadows?

CSS supports comma-separated shadow layers. Check the generated output and combine layers deliberately.

Will the preview match every browser exactly?

The preview is a guide. Verify rendering, contrast, and clipping in the target page and browsers.