About this tool
Shadows are the cheapest depth cue in interface design, and the difference between amateur and professional is almost always layering. A single hard shadow looks pasted on; two or three soft layers — a tight contact shadow, a wide ambient one — imitate how light actually behaves. This generator edits each layer's four numbers and colour, previews the stack on a real card, and writes the comma-separated CSS.
The vocabulary, once: X and Y move the shadow sideways and down; blur softens its edge; spread grows or shrinks it before blurring; inset flips it inside the box, for pressed or carved effects. Negative spread with generous blur is the modern recipe — it keeps the shadow hugging the element instead of haloing. The preview updates as you type, so the numbers stop being abstract within a minute of playing.
How to use it
- Adjust the first layer's offsets, blur, spread and colour.
- Add layers for depth — a small tight one plus a large soft one is the classic pair.
- Copy the generated box-shadow declaration.
Good to know
- Match shadow colour to the environment: a very transparent black, or a darkened version of the background hue, never pure solid black.
- Shadows imply a light source — keep Y positive and consistent across a whole interface so every card obeys the same sun.
- Elevation systems: define 3–4 shadow recipes (resting, raised, overlay) and reuse them; consistency is what reads as polish.
Frequently asked questions
How many layers can I stack?
As many as you add — CSS accepts long comma-separated lists, though two or three layers cover most real designs.
Why does my shadow look like a grey box?
Blur is too low or opacity too high. Raise the blur, and pick the colour swatch's shadow at a soft strength — the preview tells the truth.
Does box-shadow affect layout?
No — shadows paint outside the box without moving anything, which is why they are safe to tune freely.
More Developer tools
JSON Formatter & Validator
Pretty-print messy JSON, minify it back, and get a precise error location when it will not parse.
JSON to CSV
Turn a JSON array of objects into a clean spreadsheet-ready CSV, columns and escaping handled.
CSV to JSON
Convert spreadsheet CSV into a JSON array — quoted fields, embedded commas and all.
XML Formatter
Indent and validate XML — sitemaps, feeds, config files — with errors pointed at the guilty tag.
JS / CSS / HTML Beautifier
Untangle minified or messy code into readable, consistently indented JavaScript, CSS or HTML.
JS / CSS Minifier
Strip comments and needless whitespace from JavaScript and CSS — smaller files, same behaviour.
Making videos too? Try our YouTube SEO Checker, or browse the full Toolkit and the free YouTube tools.