Shadow Generator.

Generate CSS box-shadows with live preview. Add multiple shadow layers for depth and realism, then copy the CSS.


          
        

Drag sliders to adjust horizontal offset, vertical offset, blur radius, spread, color, and opacity for a CSS box-shadow. Tick Inset for an inner shadow effect. The preview updates live and the generated CSS is ready to copy straight into your stylesheet.

How to use

Use the sliders to adjust each shadow parameter. Tick Inset to make it an inner shadow. Click the color swatch to change the shadow color. The generated CSS updates live in the dark code block — click Copy to grab it.

Shadows help define layers, depth, and interaction

Shadows are one of the quickest ways to tell a user what sits above the page, what can be pressed, and what should feel separated from the background. In practice, the useful work is not writing box-shadow syntax from memory. It is finding a depth treatment that fits the component, the background, and the rest of the interface.

This tool turns that search into a visible adjustment process instead of guesswork from raw numbers.

Where shadows do real work

Cards and surface separation

A well-judged shadow can help a panel lift off the page just enough to read as its own layer.

Buttons and interactive controls

Some controls need depth to feel actionable. Too little and they look flat; too much and they feel heavy or outdated.

Overlays, menus, and modals

Floating UI needs visual separation from the content behind it. Shadows are one of the simplest ways to create that distinction.

The common mistakes

Using stronger shadows instead of better hierarchy

If a component needs a huge shadow to be noticed, the layout may have a hierarchy problem rather than a shadow problem.

Overusing spread and opacity

Heavy shadows quickly make an interface feel muddy. Small increases often have a larger visual effect than people expect.

Ignoring background context

The same shadow that works on a white page can look completely wrong on a dark or visually busy surface.

Practical uses

Dialling in a card style

This is a good use case because small visual differences matter, and you often need something subtler than what you would write from memory.

Creating inset states

Inset shadows are useful when a field or control needs to feel pressed in rather than lifted out.

Recreating a design-system shadow token

If a team already has a shadow style in use, a generator makes it easier to match and reuse the exact value instead of eyeballing it.

What this tool does not do

This tool generates shadow CSS. It does not decide whether the component belongs on a higher layer, whether the whole design system is visually balanced, or whether the effect is appropriate in every context. It helps with the shadow itself, not the entire UI hierarchy.

Why this stays useful

Shadows are one of those details that people only notice when they feel wrong. A generator helps you get to “feels right” faster and with less arbitrary tweaking.

Examples

Soft lift box-shadow: 4px 4px 10px 0px rgba(0,0,0,0.20)
Hard drop box-shadow: 6px 6px 0px 0px rgba(0,0,0,0.80)
Inset press box-shadow: inset 0px 2px 6px 0px rgba(0,0,0,0.25)

FAQ

What does Spread do?

Spread expands (positive value) or contracts (negative value) the shadow before blur is applied. A positive spread makes the shadow larger than the element; negative makes it smaller.

Can I combine multiple shadows?

CSS supports multiple box-shadows as a comma-separated list. Generate each shadow here separately and combine them manually in your CSS: box-shadow: shadow1, shadow2;

Related tools

Privacy and data handling

This tool runs entirely in your browser. Nothing you type or paste is sent to any server — all processing happens locally on your device.