←
Design

Box Shadow Generator

Loading the tool…

Ready when you are.Runs in this browser · nothing is uploaded

Layered CSS box-shadow with live preview

  • Free
  • No sign-up
  • No upload
  • Works offline

Tool facts

Price
Free, no sign-up, no watermark
Are files uploaded?
No. Everything is processed in this browser, on your device.
Offline use
Works without a connection once this page has loaded
Browser
A recent Chrome, Edge, Firefox or Safari, on computer or phone.

Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.

About Box Shadow Generator

Box Shadow Generator creates the CSS box-shadow property for you: move the sliders for horizontal offset, vertical offset, blur radius and spread, pick a color and opacity, and the preview card shows the shadow immediately. When it looks right, copy the finished rule and paste it into your stylesheet. The output uses rgba() for semi-transparent colors and omits units on zero values, so it is short and ready to use.

Realistic shadows usually combine several layers, for example a tight dark shadow close to the element plus a wide, faint one further away. You can add as many layers as you like, select any layer to edit it, switch individual layers to inset for pressed or inner shadows, and remove the ones you do not need. Change the card color, background color, corner radius and size to see how the shadow behaves on your own design.

Box Shadow Generator runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.

How to use Box Shadow Generator

  1. Start from a preset such as Soft, Layered or Inner, or edit the default shadow.
  2. Select a layer in the Layers list and adjust Offset X, Offset Y, Blur, Spread, Color and Opacity. Turn on Inset for an inner shadow.
  3. Click Add layer to stack more shadows, or the × button to remove one.
  4. Change the Box color, Background, Corner radius and Box size under Preview settings to match your design.
  5. Click Copy CSS and paste the box-shadow rule into your stylesheet.

Frequently asked questions

What do the four box-shadow values mean?

In order they are the horizontal offset, the vertical offset, the blur radius and the spread radius. Positive offsets move the shadow right and down. Blur softens the edge and cannot be negative. Spread grows the shadow (positive) or shrinks it (negative) before blurring.

How do multiple shadows work?

box-shadow accepts a comma-separated list. The first shadow in the list is drawn on top of the others. Layering a small sharp shadow with a large soft one gives a more natural depth than a single shadow.

What is an inset shadow?

The inset keyword draws the shadow inside the element's border instead of outside it, which makes the element look pressed in. You can mix inset and normal layers in one box-shadow value.

Does box-shadow affect layout or performance?

Shadows never change an element's size or push other elements around. Very large blur values on many elements or during animations can cost rendering time, so prefer animating opacity of a shadowed pseudo-element instead of the shadow itself.

Why does the shadow follow rounded corners but not my PNG's shape?

box-shadow follows the element's box and its border-radius. For the outline of a transparent image use the CSS filter drop-shadow() instead.

· Free · Runs in this browser · nothing is uploaded

Drop any file here
Drop it to see which tools can open it