CSS Box Shadow Generator screenshot

CSS Box Shadow Generator

Generate a CSS box-shadow with up to four layers, inset support and negative offsets. Copy the rule — no upload, no signup.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What the CSS box shadow generator builds

Every layer is written in the order the browser parses: horizontal offset, vertical offset, blur radius, spread, then colour, with inset first when the shadow is drawn inside the box. The six controls describe the first layer, and each extra line in the textarea adds one more, up to four — the point where a shadow turns into a grey haze. Offsets and spread accept negative values because a shadow above or to the left of the element is a normal design choice; blur is never negative. One honest limitation: a large blur on a big element costs paint time while the page scrolls on a low-end phone, so two moderate layers are usually cheaper than one huge one and look the same.

How to use it

Set the offsets, blur and spread with the sliders, choose the shadow colour and toggle inset, then press Run. Each extra line in the layers box adds one more shadow in the order x y blur spread colour, with inset allowed at either end.

Worked example

Input:

x: 0, y: 12, blur: 28, spread: -6, colour: #0f172a, inset: no, extra layers: none

Output:

.shadow {
  box-shadow: 0 12px 28px -6px #0f172a;
}

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

Every layer is written in the order the browser parses: horizontal offset, vertical offset, blur radius, spread, then colour, with inset first when the shadow is drawn inside the box. The six controls describe the first layer, and each extra line in the textarea adds one more, up to four — the point where a shadow turns into a grey haze. Offsets and spread accept negative values because a shadow above or to the left of the element is a normal design choice; blur is never negative. One honest limitation: a large blur on a big element costs paint time while the page scrolls on a low-end phone, so two moderate layers are usually cheaper than one huge one and look the same.

Generate a CSS box-shadow with up to four layers, inset support and negative offsets. Copy the rule — no upload, no signup.

How to use it

Set the offsets, blur and spread with the sliders, choose the shadow colour and toggle inset, then press Run. Each extra line in the layers box adds one more shadow in the order x y blur spread colour, with inset allowed at either end.

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

What to Expect

What this tool keeps

  • The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

Sample input

x: 0, y: 12, blur: 28, spread: -6, colour: #0f172a, inset: no, extra layers: none

Sample output

.shadow { box-shadow: 0 12px 28px -6px #0f172a; }

Frequently asked questions

How do I use the css box shadow generator?

Set the offsets, blur and spread with the sliders, choose the shadow colour and toggle inset, then press Run. Each extra line in the layers box adds one more shadow in the order x y blur spread colour, with inset allowed at either end.

Is my input uploaded?

Nothing is uploaded. The result is produced on this page.

Is there a size limit?

No: nothing is pasted, so there is no input size to exceed.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.