πŸ–ŒοΈ CSS Box Shadow Generator β€” Offset, Blur, Spread

Adjust the shadow controls and generate a box-shadow declaration you can paste into a stylesheet. No design account is required.

Design Free Β· no sign-up Reviewed 2026-11-03
Input
Result
Parts

Private by design. This tool runs entirely in your browser β€” nothing you enter or add is uploaded to any server.

What this tool does

The box-shadow generator turns offset, blur, spread, colour, opacity and inset settings into a copy-ready CSS declaration. The controls map directly to the box-shadow syntax, so the output is easy to understand and adjust later.

It is useful for prototyping depth on cards, inputs and popovers, and for producing a consistent shadow value without remembering the order of the four length values.

When to use it

  • Creating a soft elevation shadow for a card or modal.
  • Producing an inset shadow for a pressed input or well.
  • Tuning a shadow so it does not spill past rounded corners.
  • Standardising shadow values across a component library.

How it works

  1. Set horizontal and vertical offsets, blur and spread in pixels.
  2. Enter a hex color and an opacity from 0 to 100. Check inset for an inner shadow.
  3. Press Generate CSS to get a box-shadow declaration ready to paste.

Worked example

With an x offset of 0, y offset of 8, blur of 24, spread of 0, a dark colour at 25 percent opacity and inset off, the generator returns a declaration such as box-shadow: 0 8px 24px rgba(0,0,0,0.25). That produces a gentle shadow below an elevated card.

  • 0 8px 24px with 25% opacity is a soft drop shadow under a card.
  • Inset with a small blur darkens the inner edge of an input.
  • A negative spread pulls the shadow inward so it does not spill past rounded corners.

Accuracy and limitations

  • The generator produces a single shadow layer. Layered shadows, multiple comma-separated values and CSS variables must be composed by hand.
  • Length controls are in pixels and the colour field accepts hex input, so rem units and named colours need manual conversion.
  • The output is CSS text only; the page does not render a live preview of the shadow on your own component.

Privacy and data handling

Shadow values are formatted locally in JavaScript. No styles or design data are transmitted or stored.

Frequently asked questions

What color formats work?

Use a 3 or 6 digit hex color such as #0f172a. Opacity is applied separately as an rgba alpha.

Can I stack multiple shadows?

This generator emits one shadow. Paste several declarations together with commas if you need a stack.

Does it call a design API?

No. The CSS string is built locally in the page.

What does a negative spread do?

It contracts the shadow before blurring, which keeps the shadow from appearing beyond the element's edges.

Can I use the result with Tailwind?

Yes. Paste the declaration into a custom utility or an inline style; the CSS property is framework-independent.

More Design tools β†’