Box Shadow Generator | Generate CSS Box-Shadow and Copy Code
Last updated: June 2026 · Free · No sign-up required
Frequently Asked Questions
What is the difference between blur and spread in box-shadow?
Blur radius determines how soft or fuzzy the edges of the shadow will be. Spread radius expands or contracts the overall shape of the shadow in all directions before the blur is applied.
What does the 'Inset' checkbox do?
The inset keyword changes the shadow from an outer shadow (which makes the element look raised) to an inner shadow (which makes the element look sunken or pressed into the background).
How do I use rgba() color in CSS?
The rgba() function stands for Red, Green, Blue, and Alpha (opacity). Alpha is represented by a decimal value between 0 (completely transparent) and 1 (fully opaque), which allows you to create realistic, semi-transparent shadows.
Quick reference
| Value | Controls |
|---|---|
| offset-x | horizontal shadow position |
| offset-y | vertical shadow position |
| blur | softness of the edge |
| spread | how far the shadow grows |
| inset | shadow inside the element |
info CSS Box Shadow Generator
Free color tools calculator — enter your numbers and get an instant, accurate result.
info Private by design
Everything runs locally in your browser. No uploads, no accounts, no tracking.
info Works everywhere
Fully responsive and mobile-friendly — calculate on any device, any time.
info Educational
Includes the formula and step-by-step explanation so you understand the math, not just the answer.
Interpretation guide
| Effect | Recipe |
|---|---|
| Subtle card | 0 1px 3px rgba(0,0,0,.12) |
| Floating | 0 10px 25px rgba(0,0,0,.15) |
| Inner shadow | inset 0 2px 4px rgba(0,0,0,.2) |
lightbulb Worked example
Result: The calculator instantly applies the formula box-shadow: offset-x offset-y blur spread color (prefix with inset for inner shadows) and returns the result with appropriate precision.
What this means: Read the result in the context of what you are measuring. The step-by-step breakdown lets you confirm the math and understand which input most affects the outcome.
Formula & methodology
Formula: box-shadow: offset-x offset-y blur spread color (prefix with inset for inner shadows)
The CSS Box Shadow Generator is built on a well-established calculation method. It uses the formula box-shadow: offset-x offset-y blur spread color (prefix with inset for inner shadows) to turn your inputs into a reliable result. A free visual tool to generate CSS box-shadow code. Adjust offset, blur, spread, and color with sliders, then copy the ready-to-use CSS. The steps are shown on the page so you can follow the reasoning from input to output.
The generator builds a CSS box-shadow from sliders for offset, blur, spread and colour, with a live preview of the depth effect.
- Set horizontal and vertical offsets to place the shadow.
- Increase blur for softness and spread for size.
- Choose a colour and opacity (rgba).
- Copy the generated box-shadow declaration into your CSS.
Worked example: 0 10px 25px rgba(0,0,0,0.15) creates a soft floating-card shadow.
Authoritative source: W3Schools Colors
Frequently asked questions
Explore the full color toolkit
Every CalcaTools color tool — pickers, converters, gradients, and shadows for designers and developers.