AI Tools Free

CSS Box Shadow Generator

Create a CSS box-shadow from offsets, blur, spread, a hex colour, and opacity. Inspect the preview and copy the resulting declaration.

Free to useNo sign-upRuns in your browser
Enter your details

Update the inputs to see your result.

Your result
Enter your details

Result will appear here

How CSS Box Shadow Generator works

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.

Conceptual panel showing shadow offset, softness, spread, and opacity beside a CSS output card.
One generated outer-shadow declaration also drives the preview.

CSS Box Shadow Generator Quick Reference & Input Guide

Review the input parameters, allowed value ranges, and worked reference cases for the CSS Box Shadow Generator below before running your calculation.

Parameter / ScenarioDefault / Sample ValueRule or Allowed RangeOutput / Usage Note
Input: Horizontal offset8Range: -100 to 100Required workspace parameter
Input: Vertical offset12Range: -100 to 100Required workspace parameter
Input: Blur24Range: 0 to 200Required workspace parameter
Input: Spread0Range: -100 to 100Required workspace parameter

How to use CSS Box Shadow Generator

Offsets, blur, spread, color and opacity control different parts of one outer shadow.

Configure the shadow parameters

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.

Horizontal offset
CSS Box Shadow Generator native input panel with the actual Horizontal offset, Vertical offset, Blur settings used for this example.
Configure Horizontal offset, Vertical offset, Blur; select Generate CSS.

Generate and review the shadow

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.

Shadow ready
CSS Box Shadow Generator actual result panel showing Shadow ready.
Submitted result: Shadow ready. Color: #6C4CE8.

Copy and check the target context

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.

Output and export
CSS Box Shadow Generator actual output and export region and result note after submitting the pictured settings.
Review the actual CSS Box Shadow Generator output and visible Copy result controls. Read the result note.

Ways to explore an outer CSS shadow

Compare baseline and alternative runs for CSS Box Shadow Generator before exporting the result.

Inspect horizontal and vertical movement

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.

Developer input and configuration represented by document cards.
Prepare the input. Concept illustration.

Compare box-shadow blur and spread

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.

A developer example flowing from input to reviewed output.
Inspect an example. Concept illustration.

Tune a color with alpha

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.

Developer output handed to the next stage of a workflow.
Use the result in your workflow. Concept illustration.

CSS box-shadow offsets, blur, spread, and rgba colour

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.

A developer result reviewed alongside its source.
Review the returned output. Concept illustration.

Check hex length and surrounding styles

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.

Input format and assumptions reviewed for a developer task.
Check format and assumptions. Concept illustration.

Frequently Asked Questions About CSS Box Shadow Generator

Answers about using CSS Box Shadow Generator and understanding its results.

Can spread be negative?

Yes. A negative spread contracts the shadow.

What colour formats are accepted?

Enter a six-digit hexadecimal colour such as #6c4ce8.

Can I make an inset shadow?

No. The current generator produces an outer shadow only; it does not add the inset keyword.

Does it generate multiple shadow layers?

No. The current form generates one shadow declaration from one set of settings. Additional layers need separate CSS editing.

Use CSS Box Shadow Generator

Choose another tool for your next calculation, conversion, or text task.

Generate CSS