Browse all 103 browser-based tools (103 currently marked free), or tell us what useful utility we should build next.
Build a CSS box-shadow using offset, blur, spread, color, and layer settings. Preview the effect and copy the generated declaration.
Live Preview
Shadow Layers (1/8)
Layer 1
Presets
Real elevations are not one shadow — Material Design and Tailwind use 2–3 layered shadows at different blur radii for natural depth. Add up to 8 independent layers and reorder them.
Offset-x, offset-y, blur, spread, color, alpha, inset — every CSS box-shadow property exposed as a labelled slider plus a precise numeric input. No mental math required.
Tailwind sm/md/lg/xl/2xl, Material 2dp/4dp/8dp/16dp/24dp, neumorphic light/dark/pressed, glass card, focus ring, brutalist, long shadow, brand glow, and more — filterable by category.
Copy as raw CSS value, full declaration, Tailwind v4 arbitrary value, SCSS variable, CSS custom property, React inline style object, or filter:drop-shadow() equivalent.
Every change is captured in a 40-step history stack. Step backward and forward through your iterations safely — perfect for design exploration without losing prior states.
Generate a balanced random shadow as a starting point, reset to defaults in one click, or export the full configuration as JSON to share with teammates and re-import later.
Ctrl/Cmd+Z to undo, Ctrl/Cmd+Shift+Z (or Ctrl+Y) to redo. Numeric inputs accept arrow keys and step values for fine-grained adjustments. Built for design-system workflows.
No upload, no save. Your brand elevation tokens and pre-launch design experiments stay entirely on your device — safe for confidential and NDA work.
This interactive studio layers horizontal and vertical offsets, blur radius, spread distance, and RGBA opacity into a single box-shadow CSS rule. A shadow's appearance depends on the surface behind it and the element's size. Review the generated effect on each background used in your interface. Large blur regions and multiple layers also deserve a performance check in the final layout.
The CSS box-shadow property is formally defined in CSS Backgrounds and Borders Module Level 3 by the W3C, and is documented for working developers on MDN Web Docs. This tool encodes the entire specification — including the multi-layer comma syntax, the inset keyword, negative spread, and alpha blending — into a live preview so you never have to re-read the grammar.
Use this generator alongside our CSS Gradient Generator (for background fills under your shadowed cards), the Color Palette Generator (to source brand-aligned shadow colors), the Border Radius Generator (rounded corners change the visual weight of a shadow significantly), the Glassmorphism Generator (for translucent panels that need elevation), and the CSS Minifier to ship clean production tokens. When you are done, validate text contrast on top of your shadowed cards with the Color Contrast Checker.
Open the Presets panel and filter by category — Tailwind, Material, Neumorphic, Glow, Glass, or Special. Click a preset thumbnail to load its full multi-layer configuration into the builder.
Drag the Offset X/Y, Blur, and Spread sliders, or type exact values into the numeric inputs. Pick a shadow color from the swatch, then dial the Alpha slider to control how much of the background shows through.
Click Add Layer to stack up to eight shadows. Use the up / down arrows on each layer to control paint order — later layers paint above earlier ones. Toggle the Inset checkbox for any layer that should paint inside the box.
Switch the preview surface between Light, Gray, Dark, and Checker. Black shadows that look perfect on Light usually vanish on Dark — adjust the color or alpha until the elevation reads on every background you target.
A shadow that looks balanced on a card may feel heavy on a button, pill, or circle. Toggle between the five preview shapes to confirm the elevation reads correctly at the size and curvature it will ship at.
Pick CSS declaration, raw CSS value, Tailwind v4 arbitrary class, SCSS variable, CSS custom property, React inline style, or filter:drop-shadow(). Click Copy and paste into your codebase. Use Export JSON to share the exact configuration with a teammate.
The shorthand grammar per W3C CSS Backgrounds Level 3: [inset?] <offset-x> <offset-y> <blur> <spread> <color>.
| Value | What It Does | Typical Range |
|---|---|---|
| inset | Paint inside the box instead of outside | Use for pressed buttons, inner highlights |
| offset-x | Horizontal displacement | −10 to 10 px (often 0 for natural light) |
| offset-y | Vertical displacement | 1 to 20 px (positive = below the box) |
| blur-radius | Softness of the shadow edge | 2 to 50 px (higher = softer) |
| spread-radius | Grow or shrink the shadow before blurring | −8 to 4 px (negative = tighter contact) |
| color | Shadow color (use rgba for alpha) | Black at 5–25% alpha is the safe default |
Each major design system uses a small, opinionated set of elevations rather than arbitrary values. Picking from this scale — and applying it consistently — is more important than the exact pixel values you choose. Use the table below to map a UI surface (button, card, modal) to a sensible elevation level.
| Surface | Tailwind | Material | Apple HIG-style |
|---|---|---|---|
| Resting card | shadow-sm | elevation 1dp | none (border only) |
| Hover card | shadow-md | elevation 4dp | very soft drop |
| Dropdown / menu | shadow-lg | elevation 8dp | soft drop + thin border |
| Dialog / modal | shadow-xl / 2xl | elevation 16–24dp | large soft drop + scrim |
| Pressed button | shadow-inner | inset 2dp | inset darken |
| Focus ring | ring-2 ring-offset-2 | accent glow | accent halo |
Look closely at any Material Design or Tailwind card and you will see not one shadow but several stacked together. This is how light actually behaves: a tight contact shadow underneath, a softer ambient shadow extending outward, and (for higher elevations) an atmospheric layer that suggests distance from the page. To reproduce this in our generator, click Add Layer twice after loading the default preset, then set each layer using the table below.
1. Contact Shadow
Small offset (1–2px), tight blur (2–4px), negative spread (−1px). Creates the "sitting on the surface" feel.
2. Ambient Shadow
Medium offset (4–10px), moderate blur (6–15px), modest spread (0–−3px). Provides the broader "floating just above" depth that reads as elevation.
3. Atmospheric (optional)
Large offset (10–20px), large blur (20–40px), very low alpha. Adds a sense of distance from the page surface — reserve for hero cards, modals, and floating action sheets.
Both properties paint a shadow, but they follow different shapes. The box-shadow property follows the element's border-box — a rectangle, or a rounded rectangle if you have a border-radius set. The filter: drop-shadow() function paints a shadow that follows the element's actual rendered silhouette — including transparent PNG cutouts, SVG paths, and the gaps between letters of text.
| Property | Best for | Supports inset? | Supports spread? | Follows shape? |
|---|---|---|---|---|
| box-shadow | Cards, buttons, panels, modals | Yes | Yes | Border-box only |
| filter: drop-shadow() | Icons, SVGs, transparent PNGs, text | No | No | Actual silhouette |
Our generator exports both formats. The filter: drop-shadow() output skips inset layers (the function has no inset equivalent) and concatenates remaining layers with spaces, per MDN's drop-shadow() reference.
Box-shadow is GPU-accelerated for the initial paint, but any change to its value triggers a fresh paint on every affected pixel — including large blurred regions. On a list of fifty cards each with a 40px-blur shadow, even a slight color change can stall the main thread for several frames. The fix is to never animate box-shadow directly. Instead, render two pre-baked shadow states and crossfade between them by animating opacity:
.card { position: relative; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.card::after {
content: '';
position: absolute; inset: 0;
border-radius: inherit;
box-shadow: 0 10px 30px rgba(0,0,0,0.12);
opacity: 0;
transition: opacity 200ms ease;
pointer-events: none;
}
.card:hover::after { opacity: 1; }Other production tips: stick to opacity and transform for animation, set will-change: transform only on the elements that need it, and minify your final stylesheet with our CSS Minifier so long shadow declarations don't bloat your bundle. For a complete view of browser repaint behaviour, see Google's web.dev animation guide.
A shadow alone is not a reliable boundary signal for users with low vision, high-contrast mode enabled, or forced-colors active. Windows High Contrast Mode strips all box-shadow values to nothing, so any UI that relies on shadows to communicate structure breaks instantly. Defensive practice: always pair a meaningful shadow with a 1px solid borderthat uses a real color token, not transparent or rgba(0,0,0,0.05).
When the shadow itself is the focus indicator (the common :focus-visible ring pattern), make sure the ring meets the WCAG 2.2 focus appearance requirements: at least a 2×2 CSS pixel area of contiguous contrast and a contrast ratio of at least 3:1 against adjacent colors. Use our Color Contrast Checker to verify the focus ring color against both the card surface and the page background.
box-shadow has been a fully supported, unprefixed CSS property in every major browser for over a decade. No fallbacks, polyfills, or vendor prefixes are required for the syntax this generator emits.
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| box-shadow (basic) | 10+ | 4+ | 5.1+ | 12+ |
| Multi-layer (comma) | 10+ | 4+ | 5.1+ | 12+ |
| inset keyword | 10+ | 4+ | 5.1+ | 12+ |
| filter: drop-shadow() | 18+ | 35+ | 9+ | 12+ |
1. Over-Dark Shadows on Light UI
Black at 50% alpha screams "noughties web design." Modern UI uses black at 5–15% alpha for most elevations. Less is more.
2. Black Shadow on Dark Mode
Black shadows disappear into dark backgrounds. Use a brand-color glow at low alpha, or an inset white highlight to indicate elevation. Use the Dark preview surface above to test.
3. No Negative Spread
Without negative spread, large-blur shadows feel disconnected from the box. A −4 to −8 spread pulls the shadow tight to the box for that elevation feel.
4. Same Shadow at Every Elevation
A modal should not have the same shadow as a button. Define an explicit elevation scale (sm/md/lg/xl) and apply consistently across components.
5. Animating box-shadow Directly
Animating the property forces paint on every frame. Render a second shadow on a pseudo-element and crossfade with opacity instead — the GPU handles it for free.
6. Relying On Shadow For Boundary
Windows High Contrast Mode strips all shadows. Always pair a meaningful shadow with a 1px solid border using a real color token to keep card boundaries visible.
Pair shadows with depth fills
Color Palette GeneratorSource brand shadow colors
Color Contrast CheckerValidate text on cards
Border Radius GeneratorRound corners change shadow weight
Glassmorphism GeneratorFrosted-glass cards with blur
CSS Filter GeneratorIncludes drop-shadow() filter
CSS Clip-Path GeneratorShape elements before shadowing
CSS MinifierShip compact shadow tokens
Last updated: September 15, 2026 · Runs 100% in your browser — no uploads, tool input is not sent to Toolk.
Separate each shadow with a comma inside one box-shadow declaration — earlier layers paint underneath later ones. Click Add Layer in the builder to stack up to eight layers, then reorder them with the up/down arrows to control paint order.
A regular outset shadow paints outside the box and suggests elevation; an inset shadow paints inside and suggests a recessed surface, which suits pressed buttons and inner glows. Toggle the Inset checkbox on any layer to switch it.
Blur softens the shadow edge — higher values produce more diffuse falloff. Spread grows or shrinks the shadow uniformly before the blur is applied, so negative spread pulls the shadow tight against the box for a grounded contact feel.
Black shadows rely on contrast with light surfaces, so they vanish on dark ones. Switch the preview surface to Dark, then lower the alpha or switch to a brand-colored glow at low alpha until the elevation reads again.
Tailwind v4 accepts arbitrary values via shadow-[…] bracket notation. The exported class is escape-safe — spaces become underscores while commas survive intact — so you can paste it straight onto any element without hand-editing.
Animating box-shadow directly forces a repaint of every affected pixel each frame. Instead, pre-bake the second shadow on a pseudo-element and crossfade opacity — then stick to transform and opacity for the animation itself.
box-shadow follows the border-box rectangle, while filter: drop-shadow() follows the element's actual rendered silhouette — ideal for icons, SVGs, and transparent PNG cutouts. This generator exports both formats and skips inset layers in the drop-shadow() output because the function has no inset equivalent.
No. Layer values, colors, alpha levels, exported CSS strings, and imported JSON files are processed locally in your browser, and Toolk's page analytics do not receive your shadow configuration. Nothing is sent to a server.