CSS Box Shadow Generator
build CSS box-shadow with live preview and copy-ready code
By Bikram NathLast updated
The box-shadow property accepts six values: h-offset, v-offset, blur, spread, color, and the optional inset keyword, and this generator exposes all of them with a live canvas preview. Input values like 4px 4px 12px -2px rgba(0,0,0,0.2) and you see the shadow contract inside its corners in real time. Negative spread, the least-obvious parameter, is where this visual approach pays off most.
Try it now — free, instant, no signup
What is CSS Box Shadow Generator?
CSS box-shadow paints one or more shadows behind or inside any element. This generator renders the result as you move sliders for horizontal offset, vertical offset, blur radius, spread radius, and color, then outputs a copy-ready declaration. Pushing spread to -4px while keeping blur at 8px, for example, produces a shadow that stays contained within the element's border-radius instead of bleeding outward.
Browser DevTools works when you already have a rough value and just need to nudge it. This generator is more practical when starting from zero because the sliders make non-obvious parameter relationships visible instantly. Dedicated alternatives like neumorphism.io exist for the neumorphic use case specifically, but they do not expose the full six-parameter surface that the plain box-shadow property accepts, including arbitrary spread and inset combinations.
One important edge case: the inset keyword moves the shadow inside the padding box, where it is clipped by overflow: hidden exactly as content is. Also, box-shadow does not affect layout at all. A 50px spread value does not push adjacent elements, which surprises developers who expect behavior similar to outline or margin.