🔲

Box Shadow Generator

Create CSS box shadows visually with our free generator. Adjust blur, spread, color, and offset. Copy code with one click.

Advertisement

Preview

Layers ()

Presets

Layer

CSS Code

Method and limits

Each layer serializes X, Y, blur and spread in pixels, followed by RGBA and optional inset. Layers are comma-separated; their order affects overlap.

X, Y and spread accept −50…50; blur 0…100; opacity 0…100%. HEX accepts #RGB or #RRGGBB. An incomplete or invalid layer clears the combined output.

Copied

Copy failed. Select the result and copy it manually.

Embed this tool on your website

Use whole pixel dimensions from 1 to 4096.

× px (1–4096)

                        

💡 Integration Tip

Copy the embed code and paste it into your website HTML. The responsive version adapts to all screen sizes automatically.

0 ratings
✓

About Box Shadow Generator

Compose CSS shadows for cards, buttons and containers with separate editable layers and six presets. Rounded and circular previews help compare the same settings.

X=5, Y=5, blur=20, spread=0, black at 25% gives box-shadow: 5px 5px 20px 0px rgba(0,0,0,0.25);

Examples use the stated dimensions and colors; appearance also depends on the destination layout and browser.

Use Cases

Compose CSS shadows for cards, buttons and containers with separate editable layers and six presets. Rounded and circular previews help compare the same settings.
X=5, Y=5, blur=20, spread=0, black at 25% gives box-shadow: 5px 5px 20px 0px rgba(0,0,0,0.25);

How to use

1

Choose a preset or keep the initial layer.

2

Select the layer and set signed X/Y offsets.

3

Set blur and spread, then enter a full HEX color.

4

Adjust opacity or inset and add or remove layers.

5

Compare the shape preview and copy the current CSS.

Pro Tips

  • Spread expands or contracts the shadow; blur softens its edge. Negative X or Y shifts it left or up. Test a hover treatment in your own stylesheet.
  • The generator computes CSS in browser memory and does not save shadow results. The site theme may use localStorage; surrounding page requests remain separate.
  • Subtle shadows look more natural (low opacity, slight blur)
  • Use multiple shadows for depth
  • Inset shadows create pressed effects

Troubleshooting

Problem:

Check the complete HEX color and numeric bounds; current output is unavailable.

Solution:

X, Y and spread accept −50…50; blur 0…100; opacity 0…100%. HEX accepts #RGB or #RRGGBB. An incomplete or invalid layer clears the combined output.

Problem:

Why does 0% opacity hide an inset shadow?

Solution:

Inset chooses the inside placement; alpha 0 makes that layer transparent. Both settings remain in the CSS.

Frequently Asked Questions

Inset chooses the inside placement; alpha 0 makes that layer transparent. Both settings remain in the CSS.

Add layers and select each to edit it. The copied declaration keeps all layers separated by commas; at least one layer remains.

Spread expands or contracts the shadow size beyond the element.

How soft or hard the shadow edges appear. Higher = softer.

Popular Tools

No more tools to show
Explore All Tools
FreeWebTools AI