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

