ENES

CSS Box Shadow Generator

Generate CSS box-shadow values with live preview. Control offset, blur, spread, color, and opacity. Free, private, runs in your browser.

Runs in your browser · Free, no sign-up · Nothing is stored

box-shadow: 0px 4px 20px 0px #0000004d;

About this tool

A good box shadow can give a card depth or make a button feel tactile, but tuning the six values of the `box-shadow` property by hand is slow trial and error. CSS Box Shadow Generator gives you sliders for X offset, Y offset, blur radius, and spread radius (each from -50 to 50 or 0 to 100 pixels), plus a color picker and an opacity slider, with a live preview rendered on a sample box. The finished declaration — for example `box-shadow: 0px 4px 20px 0px #0000004d;` — appears in a code box, with opacity encoded as a two-digit hex alpha. It runs locally in your browser, so your design experiments stay private.

How to use it

What is CSS Box Shadow Generator?

CSS Box Shadow Generator is a visual editor for the CSS box-shadow property. Six controls cover every part of the declaration: horizontal offset (X), vertical offset (Y), blur radius, spread radius, shadow color, and opacity. A preview box below the controls renders the shadow in real time.

The tool composes the declaration as box-shadow: Xpx Ypx Blurpx Spreadpx #rrggbbaa;, appending the opacity as a two-digit hexadecimal alpha value to the color you picked. Sliders show their current numeric value in the label, so you always know the exact pixels being emitted.

All computation happens in your browser with client-side JavaScript. Nothing is uploaded, and there is no account or sign-in.

How to use it

  1. Drag the X slider (-50 to 50) to move the shadow horizontally and the Y slider (-50 to 50) to move it vertically.
  2. Drag Blur (0 to 100) to soften the shadow edges and Spread (-50 to 50) to grow or shrink it.
  3. Click the Color picker to choose the shadow color, then drag Opacity (0 to 1 in 0.05 steps) to set transparency.
  4. Copy the declaration from the dark code box — for example box-shadow: 0px 4px 20px 0px #0000004d; — and paste it into your CSS.

Why use this over alternatives

Design tools like Figma show shadows visually but do not hand you clean box-shadow syntax, and hand-writing values means constant refreshing. This tool is the middle ground: visual sliders with exact numeric output you can paste directly. The tool runs locally in your browser using client-side JavaScript.

Questions

What are the ranges of the shadow sliders?
X offset and Y offset each run from -50 to 50 pixels, blur runs from 0 to 100 pixels, and spread runs from -50 to 50 pixels. Opacity runs from 0 to 1 in steps of 0.05. The current value of each slider is shown in its label.
How is opacity represented in the output?
The opacity value is converted to a two-digit hexadecimal alpha channel and appended to the six-digit hex color. For example, 0.3 opacity on black becomes `#0000004d`, so the full declaration reads `box-shadow: 0px 4px 20px 0px #0000004d;`.
Can I create inset shadows or multiple shadows?
No. The tool generates a single standard drop shadow with the six values it controls. It does not support the `inset` keyword or comma-separated multiple shadows; you can add those by hand after copying the base value.
Is my design data sent anywhere?
No. It runs locally in your browser using client-side JavaScript.

Related tools

All images tools