About the Box Shadow Generator
FreeToolr's Box Shadow Generator helps front-end developers, web designers and students create CSS shadows without writing each value by hand. You adjust horizontal and vertical offset, blur, spread, colour, opacity and inner shadow settings with sliders. A live preview shows the visual result while you work, and the tool gives you copyable CSS. It runs in your browser, so nothing is uploaded and nothing needs installing. This makes it useful when you need a quick shadow for a card, button, panel or other box-shaped element. The controls keep the process focused on the main box-shadow values instead of making you build a declaration from memory. You can test a softer shadow, a sharper outline or an inset effect, then copy the generated CSS into your stylesheet.
How to use it
- 1Adjust the offset sliders to move the shadow horizontally and vertically.
- 2Set the blur and spread sliders to control softness and size.
- 3Choose a colour and change its opacity.
- 4Turn on inner shadow when you want the shadow drawn inside the box.
- 5Preview the result, then copy the generated CSS.
Worked example
Example input: horizontal offset 0px, vertical offset 4px, blur 12px, spread 0px, black colour, 20% opacity, and outer shadow. Result: box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.20);
How it works
Builds a CSS box-shadow with sliders for offset, blur, spread, colour, opacity and inner shadow, with a live preview and copyable CSSWorks in the browser with nothing to installSource: MDN: box-shadow CSS referenceW3C: CSS Backgrounds and Borders Level 3. Last checked 4 November 2026.
What it is good for
- Adjust shadow values with sliders instead of editing CSS by hand.
- See changes in a live preview as you work.
- Copy the generated CSS directly from your browser.
- This tool creates box-shadow code, not text-shadow code.
- The preview shows the generated shadow, but your final result can vary with the element's size, background and border radius.
Questions people ask
What is the CSS box-shadow syntax?
The common form is box-shadow: offset-x offset-y blur-radius spread-radius color. Add inset for an inner shadow, such as box-shadow: inset 0 2px 5px rgb(0 0 0 / 0.20).
What do the offset values do?
The horizontal offset moves the shadow right with a positive value and left with a negative value. The vertical offset moves it down with a positive value and up with a negative value.
What does blur do?
Blur softens the shadow edge. A value of 0px creates a sharp edge, while larger values create a wider, softer transition.
What does spread do?
Spread changes the shadow shape before blur is applied. A positive value expands it, while a negative value contracts it.
What does inset mean in box-shadow?
An outer shadow appears outside the element by default. The inset setting draws the shadow inside the box, which can create a pressed or recessed look.
Can box-shadow affect page layout?
No. A box shadow does not change the element's box-model width or height. Very large shadows can still affect how the page is painted, especially during animation.
Can I use box-shadow for text?
No. Text uses text-shadow, which has different syntax and does not support spread or inset. Use this generator for box-shaped elements.
Help keep every tool free
FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.