ToolsKit

Box Shadow Generator

Design CSS box shadows visually and copy the code.

Tune offset, blur, spread, color and opacity of a box-shadow and copy the finished CSS.

Loading the interactive tool… This page needs JavaScript to run the Box Shadow Generator.

How to use Box Shadow Generator

  1. Choose your colors or values.
  2. Preview the result live.
  3. Tweak until it looks right.
  4. Copy the CSS or code into your project.

How Box Shadow Generator works

Sliders control the horizontal and vertical offset, blur radius, spread and opacity, and a color picker sets the shadow color, which is converted to an rgba value. You can switch between an outer shadow and an inset one. The tool writes a single box-shadow declaration and previews it live; it does not stack multiple shadow layers.

Worked example

Input x 0, y 4, blur 12, spread 0, opacity 20%, color #000000, outer → Output box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.20); a soft shadow just below the element.

Common uses

  • Giving cards and buttons a subtle elevation that matches a design mockup.
  • Creating an inset shadow for pressed buttons or input fields.
  • Tuning blur and spread by eye, then pasting the exact CSS into a stylesheet.

Best for

  • cards and buttons
  • depth in UI design
  • neumorphism experiments

Tips for better results

  • Keep shadow opacity low for a natural look.
  • Check color contrast for accessibility.
  • Test designs on light and dark backgrounds.
  • Keep a copy of final values in your design system.

Frequently asked questions

What does blur radius do?

A larger blur makes the shadow softer and more spread out.

Can I make an inset shadow?

Yes, toggle the inset option to place the shadow inside the box.

Is my data sent to a server?

No. This tool runs in your browser, so what you enter stays on your device.

Related tools

Explore tool categories