Tools › Build › CSS Box Shadow Generator
🔲

CSS Box Shadow Generator

Design soft, layered box shadows visually — adjust offset, blur, spread and colour, then copy clean CSS, SCSS or Tailwind code.

🧱 Multi-layer
🎚 Live preview
✨ 12 presets
📋 CSS · SCSS · Tailwind
✨

Presets

Start from a ready-made shadow, then tweak it.

⚙️

Layers

Stack several shadows for realistic depth.

%
</>

Code

Copy it straight into your stylesheet.


Advertisement

How to use

  1. Pick a preset to start, or adjust the sliders for X offset, Y offset, blur and spread. You can also type exact numbers.
  2. Choose the shadow colour and opacity. Soft, low-opacity black looks most natural; a coloured shadow gives a glow.
  3. Tick Inset for an inner shadow, or press Add layer to stack up to six shadows. Click a layer to edit it.
  4. Change the preview background, box colour and corner radius to see how the shadow looks. Tick Include border-radius in code to copy the radius too.
  5. Choose CSS, SCSS, Tailwind or the prefixed version, then press Copy and paste it into your project.

How CSS box-shadow works

The syntax is box-shadow: [inset] x y blur spread colour. X and Y move the shadow right and down (negative values go left and up). Blur softens the edge — 0 is a hard edge. Spread grows or shrinks the shadow before blurring; a negative spread keeps the shadow tighter than the box, which looks more realistic. The inset keyword draws the shadow inside the element.

Separate several shadows with commas. The first shadow is painted on top.

Tips for natural-looking shadows

Real shadows are soft and layered. Use a low opacity (5–20%), a larger blur than offset, and combine two or three layers — a tight, darker one for contact and a wide, lighter one for ambient light. Keep the light direction consistent across your interface, and tint shadows toward the background colour rather than pure black on coloured surfaces.

Frequently asked questions

How do I add a box shadow in CSS?

Add box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.15); to the element’s rule. Use this tool to adjust the values visually and copy the exact line.

What is the difference between blur and spread?

Blur controls how soft the shadow edge is. Spread changes the size of the shadow itself: positive values make it larger than the element, negative values make it smaller.

How do I make multiple shadows?

Press “Add layer” to stack shadows. In CSS they are written as a comma-separated list, for example box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 8px 24px rgba(0,0,0,.15);.

How do I create an inner shadow?

Tick the Inset option for the selected layer. The inset keyword is added so the shadow appears inside the element’s border.

How do I use this shadow in Tailwind CSS?

Choose the Tailwind tab and copy the class, for example shadow-[0_4px_15px_0_rgba(0,0,0,0.15)]. Tailwind uses underscores in place of spaces inside arbitrary values.

Does box-shadow affect page layout or performance?

It does not affect layout because shadows take no space. Very large blur values on many elements, or animating box-shadow, can be costly to paint, so keep blur moderate and prefer animating opacity or transform on a pseudo-element.

Is this box shadow generator free?

Yes, it is free, needs no sign-up and runs entirely in your browser.