CSS Box Shadow Generator

Runs in your browserDesign Tools#CSS

Design layered CSS box shadows with Tailwind and Material presets. Copy CSS or Tailwind classes.

Backdrop
box-shadow:
  0 5px 5px -3px rgba(0, 0, 0, 0.2),
  0 8px 10px 1px rgba(0, 0, 0, 0.14),
  0 3px 14px 2px rgba(0, 0, 0, 0.12);

Presets

Tailwind
Material
Layered

Layers

The first layer is drawn on top. Up to 10 layers.

Layer 1

Box

Preview only, not in the code

How to use, limits & privacy

About CSS Box Shadow Generator

Design CSS box shadows with one or more layers and see them on a real surface as you go. Start from Tailwind, Material Design or layered soft presets, then change offsets, blur, spread, colour, opacity and inset for each layer. Copy the result as CSS or as a Tailwind class. It runs in your browser.

How to Use

1

Pick a starting point

Click a preset under Tailwind, Material or Layered, or keep the default Material 8 dp shadow.

2

Edit the layers

Select a layer to change its X and Y offset, Blur, Spread, Colour, Opacity and Inset. Use Add layer, the eye button to hide one, and the arrows to change the order.

3

Check it and copy

Switch the Backdrop to light, dark or a photo to see how the shadow reads, then choose CSS or Tailwind and click Copy.

Privacy & Processing

  • Mode: local
  • Files Leave Browser: Local tool processing; review details below
  • Max Input Size: Device memory limits
  • Account Required: No
  • Data Stored Locally: Nothing is saved; your layers are lost when you reload or leave the page.
  • Network Processing: Assets or models may require an initial download

Everything runs in your browser. A backdrop image you choose is opened on your device and never uploaded.

Rules & Limitations

  • Up to 10 layers. The first layer in the list is drawn on top.
  • Sliders cover the usual range; the number boxes accept up to 500 px.
  • Box colour and corner radius change the preview only and are not part of the code.
  • Tailwind presets use Tailwind CSS v4 values: md to 2xl match v3, and v3 calls xs shadow-sm.
  • Nothing is saved: reloading the page starts again from the default shadow.

Top Suggestions

  • Giving cards, buttons and modals a soft, realistic depth
  • Matching Material Design elevation levels in plain CSS
  • Turning a design mock-up shadow into Tailwind arbitrary classes
  • Making inner (inset) shadows for pressed buttons and input fields

CSS Box Shadow Generator FAQ

How do I add a shadow to a div in CSS?

Use the box-shadow property: box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); means 0 px across, 4 px down, 12 px blur, in black at 15% opacity. Build the shadow here, click Copy and paste the line into the rule for your div.

What is the difference between margin and box-shadow spread?

Spread grows or shrinks the shadow itself and never moves other elements, because a shadow takes up no space in the layout. Margin adds real space around the element and pushes its neighbours away. A negative spread makes the shadow smaller than the box, which keeps it from showing at the sides.

How do I make a shadow look more natural?

Stack several low-opacity layers that grow in offset and blur, like the Layered Soft and Long presets. Real shadows are darker and sharper near the object and softer further away, which one layer cannot show.

What does inset do in box-shadow?

Inset draws the shadow inside the box instead of outside it, so the element looks pressed in. It is often used for input fields, toggles and the active state of buttons. Turn on Inset for any layer to try it.

How do I use this shadow in Tailwind CSS?

Open the Tailwind tab and copy the class, for example shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1)]. Spaces become underscores in Tailwind arbitrary values, and the class works in Tailwind CSS v3 and v4 without changing your config.

Is my design uploaded anywhere?

No. The shadow is worked out in your browser and nothing is sent to a server. If you use your own image as the backdrop, it is only opened on your device.