Free CSS Box Shadow Generator
Build CSS shadows with this free box shadow generator. Set offset, blur, spread, color and opacity with sliders, stack layers or switch to inset, and copy the box-shadow rule.
CSS output
box-shadow: 0px 4px 12px 0px #00000026;How to Create a Box Shadow
Shape the shadow.
Drag the X offset, Y offset, blur and spread sliders, or type exact pixel values in the boxes beside them.
Set color and layers.
Pick a color, set the opacity, tick Inset shadow if needed, and click Add shadow layer to stack another shadow.
Copy the rule.
The preview card and code update as you change values. Click Copy CSS and paste the box-shadow rule into your stylesheet.
Frequently Asked Questions
Answers about shadow values, layers, inset, neumorphism and using the code.
What do the box-shadow values mean?
In order: inset (optional), X offset, Y offset, blur radius, spread radius and color. Positive X moves the shadow right and positive Y moves it down. A blur of 0 gives a hard edge. This tool always writes all four lengths in px, then the color.
How do I make a soft shadow?
Use a small Y offset, a large blur and low opacity, with spread near 0. A good start here is Y 6 px, blur 24 px and opacity 12%, which gives 0px 6px 24px 0px #0000001f. Add a second, tighter layer for more depth.
What is the difference between blur and spread?
Blur softens the shadow's edge, and a higher blur fades it over a wider area. Spread grows or shrinks the shadow before the blur: positive spread makes it bigger than the box, negative makes it smaller. Here blur goes from 0 to 100 px and spread from -50 to 50 px.
How do I add more than one shadow?
Click Add shadow layer. Each layer gets a tab and its own settings, and the code joins them with commas, one per line. In CSS the first shadow in the list is drawn on top, so Layer 1 sits above the others.
How do I make an inner shadow?
Select the layer and tick Inset shadow. The code adds the inset keyword and the shadow is drawn inside the box instead of outside. With inset, a positive spread makes the inner shadow thicker. You can mix inner and outer layers in one rule.
How do I make a neumorphism shadow?
Use two layers with opposite offsets: one dark, such as #000000 at 15% with X and Y at 8 px, and one white at -8 px with full opacity. Give the element and its parent the same soft background. The preview card here stays white, so check the result on your page.
What is the difference between box-shadow and drop-shadow?
box-shadow follows the element's box and its rounded corners, and supports spread and inset. The filter drop-shadow() follows the visible shape, such as a transparent PNG or an SVG icon, but has no spread or inset. This tool writes box-shadow only.
Does box-shadow change the page layout?
No. A shadow takes up no space, so it doesn't push other elements or change the box size. A parent with overflow: hidden can clip it, so leave some padding around the element when the blur or offset is large.
Why does the shadow disappear when I type a color?
The tool adds the opacity to the color as two hex digits, so it only works with 6-digit hex codes like #1e293b. Short codes such as #fff, color names and rgba() turn into invalid CSS and the shadow vanishes. A typed blur below 0 or opacity over 100 does the same.
Can I get the shadow as a Tailwind class?
Not directly, since the output is plain CSS. In Tailwind, put the values in an arbitrary shadow class and swap each space for an underscore, as in shadow-[0px_4px_12px_0px_#00000026], or add the full value as a custom shadow in your theme.
Is this box shadow generator free and private?
Yes. It's free, with no account and no cap on shadows or layers. Your values stay in this tab and aren't saved, so a reload brings back the default shadow. On the live site, Google Analytics counts Copy CSS clicks, never the shadow values.
Box Shadow Generator: Sliders, Layers, Code
Five sliders per layer, inset and multi-layer shadows, a live card preview and a box-shadow rule you can copy in one click.

Set Box Shadow Offset, Blur and Spread
Drag sliders for X and Y offset from -50 to 50 px, blur up to 100 px and spread from -50 to 50 px. The card preview redraws as you drag.
- Offsets from -50 to 50 px
- Blur from 0 to 100 px
- Spread from -50 to 50 px

Stack Multiple Box Shadow Layers
Add layers to build soft, layered depth or neumorphic effects. Each layer has its own offset, blur, spread, color, opacity and inset switch, and the code lists them in tab order.
- No limit on shadow layers
- Inset switch on every layer
- One layer per line in the code
Inner Shadows With Inset
Tick Inset shadow to draw the shadow inside the box, as on a pressed button or a sunken input field. You can mix inset and outer layers in one rule.
Shadow Color and Opacity
Pick the shadow color with the picker or type a 6-digit hex code, then set opacity from 0 to 100%. The code writes it as an 8-digit hex color, so black at 15% becomes #00000026.
Copy the Full CSS Rule
Copy CSS gives a complete box-shadow declaration with a closing semicolon and each layer on its own line. Paste it into a stylesheet, a component style or a design token.
Free to Use, No Account
Make as many shadows and layers as you like without signing up. Your settings live in this browser tab. On the live site, Google Analytics counts Copy CSS clicks, never your values.
Box Shadow Use Cases
Shadows create depth and hierarchy in UI design.
Card Elevation
Give cards, modals and panels a sense of height. Use a small sharp layer plus a larger soft one at low opacity for a shadow that looks natural.
- Raise cards and panels with a soft Y offset
- Two layers, one sharp and one soft, for depth
- Larger blur and offset for modals and dialogs
Button Depth
Add a light drop shadow to buttons and an inset shadow for the pressed state. Build each one here, copy it, and paste the rules into your hover and active styles.
- A small drop shadow for a resting button
- An inset shadow for the pressed or active state
- A colored glow with zero offset and a wide blur
Neumorphism
Build soft UI shapes with two layers: a dark shadow down and right, and a white one up and left. Give your element and its parent the same background color.
- Dark and light layers with opposite offsets
- Raised shapes built from outer shadows only
- Sunken controls with both layers set to inset
Explore More Tools
Discover other free tools that work great alongside this one
CSS Gradient Generator
Build custom CSS gradients visually
Contrast Checker
Check color contrast ratios for WCAG compliance
Color Converter
Convert HEX, RGB and HSL color codes as you type
Color Palette Extractor
Pull the main colors from an image as HEX, RGB or HSL
JSON Formatter
Format, validate and minify JSON in your browser
Regex Tester
Test and debug regular expressions live