About the Box Shadow Generator
The Box Shadow Generator runs entirely in your browser — your code and data never leave your machine. Paste, click, copy the result.
CSS box-shadow takes five core values — offset-x offset-y blur spread color — plus optional inset. Small offsets with large blur make soft modern elevation; tight shadows with spread look retro. This generator previews the shadow on a sample card in real time as you adjust, then outputs copy-ready CSS.
How to use this tool
- Drag the offsets, blur and spread values — the preview updates live.
- Pick a color and opacity (soft black at 8–15% opacity is the modern default).
- Toggle inset for pressed/inner effects.
- Generate and paste the CSS, or copy the full multi-value shorthand.
Shadow recipes
| Style | Recipe |
|---|---|
| Subtle card | 0 1px 2px rgba(0,0,0,.06) |
| Raised card (Material) | 0 6px 24px -6px rgba(0,0,0,.16) |
| Floating menu | 0 20px 48px -12px rgba(0,0,0,.24) |
| Colored glow | 0 0 40px rgba(79,70,229,.35) |
| Inset / pressed | inset 0 2px 6px rgba(0,0,0,.15) |
Multiple shadows
Separate layers with commas — a tight shadow for definition plus a wide one for depth looks richer than a single blur:
box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 12px 32px -8px rgba(0,0,0,.18);
Who is this tool for?
Front-end developers and designers who want pixel-perfect elevation without endless devtools guessing.
Developer tip
Match shadow direction to your light source (usually top-down): positive Y offset means light comes from above. Inconsistent directions across a UI look subtly 'wrong' even when nobody knows why.