Box Shadow Generator

Generate CSS box-shadow with a visual editor. Adjust offset, blur, spread, color, and opacity with live preview. Private — files stay in your browser.

How to use

  1. Adjust sliders — Tweak offset, blur, spread, and color
  2. Preview — See the shadow on a live preview box
  3. Copy CSS — Copy the box-shadow rule for your project

What Is a Box Shadow Generator?

A box shadow generator creates the CSS box-shadow property visually, letting you see the effect in real time as you adjust parameters. Instead of guessing pixel values, you can dial in the perfect shadow and copy production-ready CSS.

Understanding Box Shadow Parameters

  • Horizontal offset: Positive values push the shadow right; negative values push left.
  • Vertical offset: Positive values push the shadow down; negative values push up.
  • Blur radius: Higher values create softer, more diffused shadows.
  • Spread radius: Positive values expand the shadow; negative values shrink it.
  • Color & opacity: Controls the shadow's color and transparency.

Shadow Design Patterns

Modern design uses layered, subtle shadows to create depth hierarchy. Cards typically use a small blur with low opacity. Floating elements like dropdowns use larger blur with moderate offset. Pressed buttons use inset shadows. The best shadows mimic natural light sources — typically from above.

Performance

Box shadows are GPU-accelerated in modern browsers and have minimal performance impact for static elements. However, animating box-shadow can cause repaints. For animated elements, consider using filter: drop-shadow() or pseudo-elements instead.

Privacy

All generation happens in your browser. Nothing is sent to any server.

Create gradients with the CSS Gradient Generator. Convert colors with the Color Converter.

Frequently asked questions

What is box-shadow?

CSS box-shadow adds shadow effects around an element's frame. You can set horizontal/vertical offset, blur radius, spread distance, and color.

What does 'inset' do?

The inset keyword changes the shadow from an outer shadow to an inner shadow, creating a pressed or recessed effect.

Can I have multiple shadows?

Yes. In CSS you can comma-separate multiple box-shadow values. Use this tool to generate each one individually.

Does box-shadow affect layout?

No. Shadows are purely visual and don't affect element dimensions or layout flow.

Related free tools

Browse all free tools · Guides and tutorials · PDF tools · Developer tools · Text tools · SEO tools