CSS Border Radius Generator
Set four corner radii and copy ready-to-use CSS.
Open toolCreate a CSS box-shadow from offsets, blur, spread, a hex colour, and opacity. Inspect the preview and copy the resulting declaration.
Update the inputs to see your result.
Result will appear here
Offsets and softness settings combine with RGB colour and alpha in one shadow.
The hex colour is parsed into red, green, and blue channels, and opacity is converted to alpha. Those values are combined with horizontal and vertical offsets, blur, and spread to form the box-shadow declaration used by the preview.
Preview uses the same CSS declaration as the copied output. Inset shadows are not included.

Review the input parameters, allowed value ranges, and worked reference cases for the CSS Box Shadow Generator below before running your calculation.
| Parameter / Scenario | Default / Sample Value | Rule or Allowed Range | Output / Usage Note |
|---|---|---|---|
| Input: Horizontal offset | 8 | Range: -100 to 100 | Required workspace parameter |
| Input: Vertical offset | 12 | Range: -100 to 100 | Required workspace parameter |
| Input: Blur | 24 | Range: 0 to 200 | Required workspace parameter |
| Input: Spread | 0 | Range: -100 to 100 | Required workspace parameter |
Offsets, blur, spread, color and opacity control different parts of one outer shadow.
Set horizontal and vertical offsets, blur, spread, a six-digit hex colour, and opacity. Positive and negative offsets move the shadow in different directions. A negative spread contracts it; this form generates a single outer shadow rather than an inset one.
Select Generate CSS and inspect the preview. The colour is converted to RGB channels and opacity to alpha before the declaration is assembled. The preview applies that generated value, so it provides a direct check of the current parameter combination.
Read the colour and opacity details, then use Copy result for the declaration. Place it in the intended CSS rule and inspect the target background and box. The sample preview cannot reproduce every surrounding layout or clipping condition.
Compare baseline and alternative runs for CSS Box Shadow Generator before exporting the result.
Keep color, opacity, blur and spread fixed while changing one offset. The shadow moves according to that input. This isolates direction from softness and makes it easier to identify a misplaced horizontal or vertical value in a copied style.

Run two settings that change blur alone, then compare settings that change spread alone. The preview demonstrates these distinct inputs on the same box. Check the declaration in your actual component before assuming the preview's size represents the target element.

Keep the shadow geometry fixed and change opacity to compare the same RGB color at different alpha values. Read the generated rgba value beside the preview. The tool does not combine multiple shadows or generate an inset shadow option.

Review the calculated output alongside your entered parameters and unit conventions.
Every calculation follows the rule: box-shadow: horizontal-offset vertical-offset blur spread rgba(red, green, blue, opacity). Because JavaScript uses IEEE 754 double-precision floating-point arithmetic, numeric outputs display up to 12 significant digits where applicable.
Always cross-check the displayed result against the scope note (Preview uses the same CSS declaration as the copied output. Inset shadows are not included) before applying the value to production specifications, financial models, or lab records.

Check the accepted colour format and target layout before copying CSS.
Operational scope: Preview uses the same CSS declaration as the copied output. Inset shadows are not included. Inputs that violate minimum/maximum bounds or required format rules are rejected with a clear diagnostic prompt.
Need an adjacent calculation in Developer Tools? Use the related tools linked below to chain your workflow without leaving your browser.

Choose another tool for your next calculation, conversion, or text task.
Choose colors and an angle, then copy a CSS gradient.
Open toolMinify CSS while retaining strings, custom properties, and rule order.
Open tool
Remove scripts, event handlers and unsupported markup from basic HTML. Review the cleaned fragment and a contained preview.
Open toolConvert CSS pixels to rem units using your root font size.
Open toolAnswers about using CSS Box Shadow Generator and understanding its results.
Yes. A negative spread contracts the shadow.
Enter a six-digit hexadecimal colour such as #6c4ce8.
No. The current generator produces an outer shadow only; it does not add the inset keyword.
No. The current form generates one shadow declaration from one set of settings. Additional layers need separate CSS editing.
Choose another tool for your next calculation, conversion, or text task.