Box Shadow Generator

Generate CSS box-shadow values.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Set the horizontal and vertical offset, blur, spread, colour and whether it is inset, and copy the box-shadow value. It produces one shadow layer at a time.

How to use

1
Step 1
Set x and y offsets, blur and spread in pixels.
2
Step 2
Enter a colour (rgba works) and tick Inset if needed.
3
Step 3
Press Generate and paste into box-shadow.

How it works

The value follows the CSS order: optional inset, x offset, y offset, blur radius, spread radius, colour. Positive y moves the shadow down, positive x moves it right, and a larger blur softens the edge. Negative spread shrinks the shadow.

Worked example

The default soft shadow

Input
x 0, y 4, blur 12, spread 0, rgba(0,0,0,0.15)
Output
0px 4px 12px 0px rgba(0,0,0,0.15)
Walkthrough
Use it as box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.15);

Limitations

  • One shadow layer; join multiple shadows with commas by hand.
  • All lengths are in px.
  • No visual preview in the tool.

Questions

How do I make a CSS box shadow?
Set the offsets, blur, spread and colour, then copy the generated value.
What is the order of box-shadow values?
inset (optional), x offset, y offset, blur, spread, colour.
How do I make an inner shadow?
Tick Inset to prefix the value with the inset keyword.
Can I stack several shadows?
Generate each one and separate them with commas.

Features

  • Offset, blur, spread, colour
  • Inset option
  • Copy-ready value

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Learn Regular Expressions - Crash Course

    freeCodeCamp.org

    Regex primer for tester and explainer pages.

    Watch on YouTube
  • How base64 encoding works

    Andrew Schmelyun

    Mental model for Base64 encode/decode tools.

    Watch on YouTube
  • MDN Web Docs

    MDN

    Primary reference for web APIs these developer tools touch.

  • Base64

    MDN

    When Base64 is appropriate versus raw binary transfer.