Skip to content
T
Tools.Town
Free Online Tools for Everyone
Design Tools

How to Use Box Shadow Generator — Complete Guide

Learn how to build CSS box-shadow values visually — offset, blur, spread, color, inset — using Tools.Town's free Box Shadow Generator.

8 May 2026 4 min read By Tools.Town Team Fact Checked

Key Takeaways

  • offset-x (horizontal), offset-y (vertical), blur-radius, spread-radius, and color
  • Blur controls how soft the shadow edges are — higher values = softer edges
  • Inset flips the shadow inside the element instead of behind it
  • Yes — CSS allows multiple comma-separated shadows

What is Box Shadow Generator?

Box Shadow Generator lets you design CSS box-shadow values by dragging sliders for offset, blur, spread, opacity, and color — then copies the ready-to-use CSS. No more trial-and-error in DevTools.

Box shadow is the primary tool for creating depth in flat UI design. A well-tuned shadow makes cards “float” and buttons feel pressable.


The Five Shadow Parameters

Offset X / Y

Horizontal and vertical distance of the shadow from the element. Positive X = right, positive Y = down.

Blur Radius

How much the shadow edges are softened. 0 = hard edge, large values = very diffuse cloud shadow.

Spread Radius

Expands (+) or shrinks (-) the shadow before blurring. Negative spread can create a tight underline shadow.

Color & Opacity

Shadow color — typically a dark hue at 15–30% opacity for natural shadows, or a brand color for glow effects.

Inset

Flips the shadow to the inside. Used for inner glow, pressed buttons, or depth on text inputs.


How to Use Box Shadow Generator

01

Adjust the sliders

Move the offset-x, offset-y, blur, and spread sliders to shape the shadow.

02

Set color & opacity

Pick a shadow color and adjust opacity. Dark semi-transparent colors look most natural.

03

Toggle inset

Enable 'Inset' to flip the shadow to the inside of the element.

04

Add more layers

Stack multiple shadows for richer depth effects (e.g. a close tight shadow + distant diffuse shadow).

05

Copy the CSS

Click 'Copy CSS' to get the box-shadow property ready to paste into your stylesheet.


Common Shadow Recipes

EffectCSS Value
Subtle card lift0 2px 8px rgba(0,0,0,0.12)
Floating card0 8px 24px rgba(0,0,0,0.15)
Hard drop shadow4px 4px 0 #000
Inner glowinset 0 0 12px rgba(99,102,241,0.3)
Pressed buttoninset 0 2px 4px rgba(0,0,0,0.2)
Blue glow0 0 16px rgba(59,130,246,0.5)

Tips & Common Mistakes

Keep shadows subtle. Real-world shadows rarely go above 20% opacity. Heavy black shadows look dated. Try dark versions of your brand color at 15–25% opacity instead.

Layer two shadows for realism. A close, tight, dark shadow (low blur, low opacity) stacked with a far, diffuse, lighter shadow produces depth that mimics how objects actually cast light.

Avoid purely black shadows on colored backgrounds. A black shadow on a blue card looks muddy. Use a darker shade of the card color as the shadow color instead.


Advertisement

Try Box Shadow Generator — Free

Apply what you just learned with our free tool. No sign-up required.

Try Box Shadow Generator

Frequently Asked Questions

What are the five parts of a CSS box-shadow?
offset-x (horizontal), offset-y (vertical), blur-radius, spread-radius, and color. You can also add 'inset' at the start to make it an inner shadow.
What is the difference between blur and spread?
Blur controls how soft the shadow edges are — higher values = softer edges. Spread expands or shrinks the shadow before blurring — positive = larger shadow, negative = smaller.
What does 'inset' do?
Inset flips the shadow inside the element instead of behind it. Used for pressed-state buttons, inner glow effects, and depth on inputs.
Can I stack multiple box shadows?
Yes — CSS allows multiple comma-separated shadows. The generator lets you add and remove layers to stack shadows for more complex effects.

Was this guide helpful?

Your feedback helps us improve our content.

Continue Reading

All Design Tools Guides

Get the best Design Tools tips & guides in your inbox

Join 25,000+ users who get our weekly design tools insights.