Unit Converters

CSS Box Shadow to Code Generator

box-shadow: [inset] offsetX offsetY blur spread rgba(0,0,0,a);

box-shadow: x y blur spread rgba(...). Soft UI is usually 0 8px 24px at 12–20% black. Inset is a checkbox, not a different physics. Multiple shadows mean more declarations, not a larger spread.

Offsets

box-shadow

0px 8px 24px 0px rgba(0, 0, 0, 0.12)

Paste into CSS.

Plain-English guide

Terms & how it works

Confused by a field? Read the short definitions here while you use the tool.

  • Offsets and blur

    The “Offsets and blur” value used in this tool’s formula. Adjust it to see results update live.

How this calculator works

box-shadow: x y blur spread rgba(...). Soft UI is usually 0 8px 24px at 12–20% black. Inset is a checkbox, not a different physics. Multiple shadows mean more declarations, not a larger spread. box-shadow: [inset] offsetX offsetY blur spread rgba(0,0,0,a); Example: 0 8px 24px 0 rgba(0,0,0,0.12) is a polite card lift.

box-shadow: [inset] offsetX offsetY blur spread rgba(0,0,0,a);

Example: 0 8px 24px 0 rgba(0,0,0,0.12) is a polite card lift.

When to use this CSS Box Shadow

Common use cases

  • box-shadow: x y blur spread rgba(...). Soft UI is usually 0 8px 24px at 12–20% black. Inset is a checkbox, not a different physics. Multiple shadows mean more declarations, not a larger spread.
  • Sanity-check with this case: 0 8px 24px 0 rgba(0,0,0,0.12) is a polite card lift.
  • The relationship is: box-shadow: [inset] offsetX offsetY blur spread rgba(0,0,0,a);

Localized examples

  • Unit Converters: the example on this page uses the same formula as the widget.

What you get

  • Fields: Offsets and blur
  • box-shadow: [inset] offsetX offsetY blur spread rgba(0,0,0,a);
  • Example on the page: 0 8px 24px 0 rgba(0,0,0,0.12) is a polite card lift.

How to Convert CSS Box Shadow Step-by-Step

  1. 1Enter Offsets and blur. Use the values you have, not a catalog average, unless that is all you know.
  2. 2box-shadow: [inset] offsetX offsetY blur spread rgba(0,0,0,a);
  3. 3Worked case: 0 8px 24px 0 rgba(0,0,0,0.12) is a polite card lift.
  4. 4Check which dictionary the other person is using — US or UK, decimal or 1,024 — then trust the number.

Governing formula

box-shadow: [inset] offsetX offsetY blur spread rgba(0,0,0,a);

0 8px 24px 0 rgba(0,0,0,0.12) is a polite card lift.

Example: set Offsets and blur = 4, then read the result.

Variable definitions

  • value

    Offsets and blur

    The “Offsets and blur” field. Default 4; typical range -50–80.

  • The conversion (box-shadow: [inset] offsetX offsetY blur spread rgba(0,0,0,a);) does not pick US vs UK gallons, SI vs binary megabytes, or Mach at altitude for you. Read the footnote on the page.
  • Nothing here is uploaded for the calculation itself.

Frequently Asked Questions

Follows alpha. box-shadow follows the border box. Logos often want filter.

Unit Converters

Get a note when we add a planner

Occasional email when something new is worth opening. We never share your address. Unsubscribe anytime.

Community

Reviews & Ratings

See what others think about this tool, then leave your own rating to help improve CalculioHub.

4.8

out of 5.0

4 reviews

Leave a review

Your rating

Aisha K.

Mar 12, 2026

Clean layout and the results update instantly. Exactly what I needed for a quick planning check.

Daniel R.

Feb 28, 2026

Very usable on mobile. Would love a save/export option later, but the math feels solid.

Priya S.

Feb 3, 2026

The FAQ section answered my questions before I even had to search. Smooth dark mode too.

Marcus L.

Jan 19, 2026

Simple inputs, clear outputs. This replaced three bookmarks I used to juggle.

Improve this tool

Suggestion Box

Share an idea, report a bug, or send general feedback for CSS Box Shadow. Your input helps shape what we build next.