CSS Box Shadow Generator

Design beautiful CSS box-shadows visually. Drag sliders to control offset, blur, spread, color, and opacity. Add multiple shadow layers for advanced effects. The ready-to-use CSS updates live — copy it with one click.

Preview
Background
Box
CSS Output
box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.15);
Shadow layers
Horizontal offset 0px
Vertical offset 4px
Blur radius 16px
Spread radius 0px
Opacity 15%
Color
Inset
Presets
❤️ Support CodeConverter.net and donate ❤️

Mastering CSS box-shadow

The box-shadow property explained

The CSS box-shadow property adds one or more shadow effects to an element's frame. The full syntax is: box-shadow: [inset] <offset-x> <offset-y> [blur-radius] [spread-radius] <color>. You can stack multiple shadows by separating them with commas — layers are rendered from front to back, making the first value the topmost shadow. This stacking is key to creating sophisticated multi-layer effects like neumorphism, elevation systems (as used in Material Design), or realistic soft shadows with multiple diffusion layers.

box-shadow parameters
  • offset-x / offset-y — horizontal and vertical position
  • blur-radius — 0 = sharp edge, higher = softer
  • spread-radius — expands (+) or shrinks (−) the shadow
  • inset — keyword to paint the shadow inside the box
Multi-layer shadow tips
  • Layer a tight sharp shadow + a soft diffuse one
  • Use low opacity (8–20%) for each layer
  • Mix inset + outset shadows for neumorphism
  • Use colored shadows to match your brand palette
How to use this tool
  • Drag sliders to adjust offset, blur, spread, opacity
  • Click Add layer to stack multiple shadows
  • Try the presets for instant starting points
  • Click Copy CSS — paste directly into your stylesheet
Performance considerations
  • Box-shadow is GPU-composited — very performant
  • Prefer box-shadow over filter: drop-shadow() for rectangles
  • Animate with transition: box-shadow for smooth hover
  • Avoid huge spread on many elements — can cause repaints
100% private & client-side
  • All processing runs entirely in your browser
  • No data is ever sent to a server
  • Safe for use with design system tokens and proprietary colors
  • Works fully offline after initial page load
Inset vs. outset shadows
  • Outset (default) — shadow appears outside the element
  • Inset — shadow rendered inside, creates a sunken effect
  • Combine both types in a multi-layer shadow for depth
  • Inset shadows are great for input fields and pressed buttons

Should you use box-shadow or filter: drop-shadow()?

Both box-shadow and filter: drop-shadow() create shadow effects, but they work very differently. box-shadow always follows the rectangular bounding box of an element, regardless of its visual shape. filter: drop-shadow() follows the actual visible pixels — including transparent areas — which makes it the right choice for irregular shapes like PNG cutouts or SVG icons.

For performance, box-shadow is generally the better choice for standard UI elements like cards, buttons, and modals. It is GPU-composited and does not trigger layout. Use filter: drop-shadow() when you truly need shape-aware shadows, but be aware it is more expensive to render, especially when animated. In both cases, prefer will-change: box-shadow or will-change: filter sparingly and only when animating these properties.