CSS BOX SHADOW GENERATOR
Build single or layered box-shadows with a live preview — calculated right here in your browser.
In short
Build single or layered CSS box-shadows with a live preview. Adjust offset, blur, spread, color, and opacity, or start from a preset, then copy the CSS — all generated locally in your browser.
Shadow 1
20%
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.2);
How to build a box shadow
- 1
Adjust the offset X/Y, blur, and spread sliders to shape the shadow.
- 2
Pick a color and set its opacity.
- 3
Toggle Inset for an inner shadow instead of a drop shadow.
- 4
Click + Add shadow to layer multiple shadows on the same element.
- 5
Pick a preset for a quick starting point, then click Copy to grab the CSS.
Questions
- What do offset, blur, and spread each do?
- Offset X and Y move the shadow horizontally and vertically from the element. Blur softens the shadow's edge — higher values spread it out more. Spread grows or shrinks the shadow's size independently of the element, before blur is applied.
- What's the difference between a regular and an inset shadow?
- A regular box-shadow falls outside the element, like a drop shadow. An inset shadow is drawn inside the element's border, creating a pressed-in or carved-out look.
- Can I layer multiple shadows on one element?
- Yes. CSS box-shadow accepts a comma-separated list of shadows on the same element — click "+ Add shadow" to add up to 5 layers, which is how effects like soft ambient shadows combined with a sharp contact shadow are built.
- Is anything uploaded or saved?
- No. The shadow is calculated and rendered entirely in your browser with JavaScript — nothing is uploaded, logged, or stored.
Related tools
- CSS Gradient GeneratorBuild linear, radial, and conic gradients and copy the CSS.
- CSS Border GeneratorBuild a border with per-corner radius and copy the CSS.
- CSS Clamp GeneratorBuild a fluid clamp() value that scales between a min and max size.
- CSS Transform GeneratorBuild a translate/rotate/scale/skew transform with a live preview and generated CSS.
- CSS Variables GeneratorBuild a set of named CSS custom properties and get the generated :root block.
- CSS Custom Scrollbar GeneratorStyle a scrollbar's width, corner radius, track color, thumb color, and hover color, and copy the CSS.
- CSS Flexbox GeneratorDial in direction, justify-content, align-items, wrap, and gap with a live preview.
- CSS Ken Burns Effect GeneratorBuild a slow zoom-and-pan Ken Burns effect for a background image, tune scale/pan/duration, and copy the CSS.
Updated