How to use Box Shadow Generator
- Set the first layer with the horizontal and vertical offsets, blur, spread, color and opacity. Use the sliders or a Soft shadow or Inset example as a starting point.
- Watch the preview while you adjust the controls. Turn on Inset shadow if the shadow should sit inside the box.
- For additional layers, enter one line per layer as offsetX offsetY blur spread #hex opacity. Add inset as the last word for an inner layer; there can be eight layers in total.
- Select Generate CSS, then copy the rule. Replace .card with your own selector and check the shadow against the real element and background.
Example: Box Shadow Generator
Create a soft shadow beneath a card with a 10-pixel downward offset and 30-pixel blur.
Options
- Horizontal and vertical offsets
- Positive horizontal values move a shadow right; negative values move it left. Positive vertical values move it down; negative values move it up. Each offset accepts -100 to 100 pixels.
- Blur and spread
- Blur softens the edge and accepts 0 to 200 pixels. A blur of zero gives a sharp edge. Spread accepts -50 to 50 pixels: positive values grow the shadow shape and negative values shrink it before blur.
- Color, opacity and inset
- Choose a shadow color and opacity from 0% to 100%. The CSS uses an rgba color. Inset draws the shadow inside the element; a light color can also create a highlight.
- Extra shadow layers
- Add up to seven more layers after the layer in the controls. For example, 0 2px 4px 0 #000000 20% inset adds an inner shadow. The copied rule combines layers with commas; the first listed shadow is on top.
Supported inputs and limits
- Up to eight layers, counting the first one in the controls.
- Extra layer text is limited to 8,192 characters.
- Each layer accepts offsets from -100px to 100px, blur from 0 to 200px, spread from -50px to 50px and opacity from 0% to 100%.
- The preview and copied rule include every layer in order.
- The preview surface may differ from your own background.
More details
This page does not assess the shadow contrast on your site.
The main layer has sliders; additional layers retain their existing advanced text controls.
A complete per-layer visual editor or Tailwind export is not provided.
Where your input is processed
This tool does not upload your inputs. See the limits for anything saved on your device.
Apply the rule on the real surface
The preview helps compare offsets, blur and layers, but its surface and surrounding space may differ from your page. Copy the declaration to your intended element and inspect it with the real background, border radius and nearby content. Check whether a parent clips the shadow. A shadow can add separation, but it does not replace a visible keyboard focus indicator.
Questions about Box Shadow Generator
Why is my shadow invisible?
Check for zero opacity, a color close to the background, or a negative spread that shrinks the shadow too far. A large blur can also make a low-opacity shadow hard to see. Check the result on your own background.
How do I make a sharp edge?
Set blur to zero. Spread changes the size of the shadow shape; a negative spread does not remove blur.
Can I put the shadow inside the box?
Yes. Turn on Inset shadow for the first layer or add inset at the end of an extra layer line.
Can I copy several shadows at once?
Yes. The first layer uses the controls and additional layers use one text line each. The output combines all of them into one box-shadow declaration, up to eight layers in total.