Box Shadow Generator

Adjust offset, blur, spread and colour with a live preview and copy the box-shadow CSS.

How to Use Box Shadow Generator

  1. Drag the offset sliders to move the shadow right/left and down/up.
  2. Set blur for softness and spread to grow or shrink the shadow.
  3. Pick a colour and opacity, and tick Inset Shadow for an inner shadow.
  4. Click Copy CSS.

What each value means

box-shadow takes up to five values in order: horizontal offset (positive moves it right), vertical offset (positive moves it down), blur radius (0 is a hard edge), spread (positive makes it bigger than the element, negative smaller) and colour. The tool writes the colour as rgba() so the opacity slider controls how strong the shadow looks.

Inset puts the shadow inside the element's border instead of behind it, which makes it look pressed in.

Shadows that look natural

Real shadows are soft and faint. A small downward offset, a generous blur and low opacity, such as 0px 10px 30px at 10 to 20% black, looks more natural than a dark, hard shadow. For extra depth you can stack two shadows in CSS, separated by a comma, such as a tight one and a wide one; this tool makes one at a time, so combine them by hand.

Key Features & Practical Use Cases

  • Giving cards, modals and dropdowns a soft lift off the page.
  • Pressed or sunken button states using an inset shadow.
  • Matching a shadow from a design mockup to real CSS values.
  • Learning what each box-shadow value does by dragging it.

Frequently Asked Questions

What's the difference between blur and spread?

Blur softens the edge. Spread changes the size of the shadow before it's blurred.

How do I add a shadow on one side only?

Use an offset on that side and a negative spread about the size of the blur, so the shadow doesn't show elsewhere.

Does box-shadow affect layout?

No. Shadows don't take up space or move other elements.

Can I use it on images?

Yes. It works on any element, including img. For PNGs with transparency, filter: drop-shadow follows the shape instead of the box.

About OneClickly

OneClickly is a set of 119 free tools for PDFs, images, text, everyday math and code. They run in your browser, so the files and text you work with stay on your device.

Related Tools