CSS Box-Shadow Generator
Design CSS box-shadows visually with live preview — control offset, blur, spread, opacity, color, and inset, then copy production-ready CSS. Free.
💡 How to use
- Drag the sliders to shape the shadow — offset moves it, blur softens it, spread grows it.
- Lower the opacity for subtle, modern shadows; enable Inset for inner shadows.
- Copy the
box-shadowCSS and paste it onto any element.
Free CSS Box-Shadow Generator
Design CSS box-shadows visually and copy the code instantly. Drag sliders for offset, blur, spread, opacity, and color, toggle inset shadows, and see a live preview — then paste production-ready box-shadow CSS into your project. No sign-up, all in your browser.
What is the CSS box-shadow property?
The box-shadow property adds a shadow around an element's frame, giving your interface depth and a sense of elevation. A single declaration controls the shadow's horizontal and vertical offset, how far it blurs, how much it spreads, its color, and whether it sits inside or outside the element. It is the standard way to make buttons, cards, modals, and dropdowns feel layered and tactile.
Understanding the box-shadow values
Each value in a box-shadow controls one aspect of the effect:
- Horizontal offset — moves the shadow left (negative) or right (positive).
- Vertical offset — moves the shadow up (negative) or down (positive).
- Blur radius — higher values create a softer, more diffuse shadow.
- Spread radius — grows (positive) or shrinks (negative) the shadow's size.
- Color and opacity — a low-opacity dark color usually looks most natural.
- Inset — draws the shadow inside the element for an inner, pressed-in look.
How to use the box-shadow generator
It takes just a few seconds:
- Drag the offset sliders to position the shadow.
- Adjust blur and spread to control softness and size.
- Lower the opacity for a subtle, modern feel, and pick a shadow color.
- Toggle Inset for inner shadows, then click Copy CSS and paste it in.
Tips for realistic, modern shadows
The most natural shadows are soft and subtle: keep opacity low (often 8–20%), use a small vertical offset, and a generous blur. Real light comes from above, so a downward shadow usually looks right. For a premium, layered effect, designers often stack two or more shadows — a tight, darker one plus a larger, lighter one — which you can do by combining multiple box-shadow values separated by commas.
Common uses for box-shadow
Box-shadows appear all over modern interfaces:
- Cards and panels that need to lift off the background.
- Buttons that should look clickable, with a deeper shadow on hover.
- Dropdowns, tooltips, and modals that float above the page.
- Inset shadows for inputs, wells, and pressed states.
Pro tip
Match your shadow color to your background hue instead of pure black — a slightly tinted shadow blends more naturally into a colored UI. Pair this generator with our CSS Gradient Generator to design cohesive, polished components fast.
FAQ
Is this Box-Shadow Generator free?
How do I create a CSS box-shadow?
What does the spread value do?
What is an inset box-shadow?
How do I add multiple shadows to one element?
Why does my shadow look harsh or fake?
Does box-shadow work in all browsers?
Related tools
Pro tip: pair this tool with CSS Loader & Spinner Generator and CSS Flexbox Generator for a faster SEO workflow.