Skip to main content
Alona Tool – Free Online Tools

CSS Box Shadow Generator

Runs in Your Browser

Adjust horizontal and vertical offset, blur, spread, opacity, color and inset, preview the shadow live, and copy the CSS.

Browser-based: this tool works on your device and does not send your input to an Alona Tool server. See the Privacy Policy for details.
Fast Processing

Loading CSS Box Shadow Generator… This tool is an interactive page and needs JavaScript enabled in your browser.

Example Usage & Test Cases

Soft card shadow
Input Scenario:
X 0, Y 10, blur 30, spread 0, opacity 25%, black
Generated Result:
box-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.25);

How It Works

1

Move the sliders for offset, blur, spread and opacity.

2

Pick a shadow color and toggle inset if you want an inner shadow.

3

Copy the generated CSS into your stylesheet.

Frequently Asked Questions

This tool builds a single shadow. To layer shadows, generate each one and join them with commas in your CSS.

Good to Know

Common uses

  • Styling cards, buttons and modals
  • Finding a subtle elevation shadow quickly

Limitations and notes

  • Large blur values can be costly to paint on low-end devices when animated.
  • Output is a single rgba() shadow; named colors and CSS variables are not generated.

Related Tools

Free Online CSS Box Shadow Generator

Tune a CSS box-shadow with sliders and see the result immediately instead of guessing values in your stylesheet. The generated declaration uses an rgba() color so opacity is built in.

Shadows give cards, buttons and modals a sense of depth, but getting the numbers right by trial and error in a stylesheet is slow. Designers use this page to find a soft shadow for a card, front-end developers to produce a hover state, and beginners to understand what each of the values in the CSS property actually does. Because the preview updates while you drag, you can compare a subtle shadow with a dramatic one in seconds and then copy the exact line instead of writing it from memory.

Use the sliders on the left: Horizontal and Vertical move the shadow from minus 100 to 100 pixels, Blur runs from 0 to 150, Spread from minus 50 to 100, and Opacity % from 0 to 100. Choose a colour with the Color picker, and tick the checkbox for an inset shadow if you want it inside the box. The white square on the right shows the result, and the CSS line below it updates at once. Press the copy button and paste the rule into your stylesheet.

This generator builds one shadow at a time, so layered shadows, which many designers favour for realistic depth, need to be written by hand: simply copy two outputs and join them with a comma. The colour is written in rgba form from your chosen colour and opacity, not as hex. The preview sits on a plain grey panel with a white box, so judge the shadow on your real background too, as dark themes need higher opacity to be visible. Large blur values can also slow older phones when applied to many elements.

The default settings give box-shadow: 0px 10px 30px 0px rgba(0,0,0,0.25); which is a soft shadow falling below the box. To get a tighter card shadow, set Vertical to 4, Blur to 12 and Opacity to 15, producing 0px 4px 12px 0px rgba(0,0,0,0.15). Picking the colour #1e3a8a with the same values gives rgba(30,58,138,0.15), a bluish shadow. Reading the order of values helps when editing by hand: horizontal offset, vertical offset, blur, spread, then colour, with the word inset first.

Key Highlights:

  • Free to use, no signup
  • Instant results
  • Processed in your browser
  • Works on mobile and desktop