CSS Drop-Shadow Generator — Free Online Tool

Use the CSS Drop-Shadow Generator to build a filter: drop-shadow() rule and copy the exact CSS — no guesswork, no manual syntax.

Shadows

Adjust selected shadow

Offset X8px
Offset Y8px
Blur radius10px
Color & opacity45%

Presets

filter: drop-shadow(8px 8px 10px rgba(15,13,114,0.45));

Full CSS rule

.your-element { filter: drop-shadow(8px 8px 10px rgba(15,13,114,0.45)); }

What is filter: drop-shadow()?

filter: drop-shadow() is a CSS filter function that casts a shadow around the actual visible shape of an element, rather than around its rectangular box. It accepts up to four values: horizontal offset, vertical offset, an optional blur radius, and an optional color.

filter: drop-shadow(8px 8px 10px rgba(15, 13, 114, 0.45));

The first two values move the shadow left/right and up/down. The third softens its edges. The fourth sets its color and opacity. Because it’s a filter rather than a background effect, it applies after the browser renders the element — which is what lets it trace irregular shapes, transparent areas, and even the letterforms of text.

drop-shadow vs. box-shadow: what’s the difference?

The core difference is shape awareness: box-shadow always draws a shadow behind an element’s bounding box, while filter: drop-shadow() follows the element’s actual rendered silhouette.

For a solid rectangle — a card, a button, a plain <div> — the two look identical, because the box and the shape are the same thing. The difference shows up the moment the content isn’t a plain rectangle:

  • Transparent PNGs and iconsbox-shadow draws a shadow around the invisible rectangular canvas the image sits in. drop-shadow draws a shadow around the visible pixels only.
  • SVG shapes and logos — same issue. A star-shaped SVG gets a star-shaped shadow with drop-shadow, and a square shadow with box-shadow.
  • Textbox-shadow can’t be applied meaningfully to inline text at all. drop-shadow (or the older text-shadow, which is functionally similar but less flexible) hugs each letter.

A practical rule of thumb: reach for box-shadow on cards, buttons, and containers; reach for drop-shadow on logos, icons, cutout images, and text.

Using drop-shadow on text

filter: drop-shadow() works on text the same way it works on any other element — it traces the rendered glyphs, not the line box around them. This makes it a good fit for headings, logos set in text, or any typography that needs to lift off a busy or image-based background.

h1 {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
}

It’s worth knowing that text-shadow exists as an older, text-specific alternative with slightly different rendering behavior (it doesn’t blur as smoothly at large radii and doesn’t support multiple independently-colored layers as cleanly). For most modern use — and for anything that needs to match a drop-shadow already used elsewhere on the same page — filter: drop-shadow() on text keeps the shadow style consistent between images, icons, and type.

Stacking multiple drop-shadows

filter: drop-shadow() accepts more than one shadow by chaining functions in a single filter declaration, separated by a space:

filter: drop-shadow(0 6px 14px rgba(15, 13, 114, 0.6)) drop-shadow(0 0 24px rgba(255, 197, 2, 0.35));

Each function is applied independently and composited together, which makes it possible to combine a tight, dark contact shadow with a soft, colored glow — a common pattern for logos, buttons, and hero graphics that need to look “lifted” rather than just shadowed. The generator above supports adding and adjusting multiple shadows and outputs the combined rule automatically.

Browser support

filter: drop-shadow() is supported in all current major browsers — Chrome, Firefox, Safari, and Edge — and has been for several years, so it’s safe to use without a fallback in virtually any production WordPress site or theme. As with any CSS filter, very large blur radii or many stacked shadows can affect rendering performance on lower-powered devices, so it’s worth previewing on mobile before shipping heavy stacks site-wide.

When to use this

  • Site owners styling a logo, icon set, or header graphic in the Customizer’s Additional CSS panel, where a shape-aware shadow reads more polished than a boxy default.
  • Freelancers and agencies building out a design system in Elementor, Divi, or a theme’s custom CSS field, who need a consistent, copy-paste-ready shadow value across multiple components.
  • Anyone replacing a flat cutout icon or PNG with something that has visual depth, without exporting a new image asset every time the shadow needs tweaking.

FAQ

What’s the difference between box-shadow and filter: drop-shadow()?
box-shadow always shadows an element’s rectangular box; filter: drop-shadow() shadows the element’s actual visible shape, which matters for transparent images, SVGs, and text.

Does drop-shadow work on transparent PNGs and SVGs?
Yes — that’s its main advantage over box-shadow. It reads the alpha channel and only casts a shadow around the opaque pixels, so a transparent PNG or SVG gets a shadow that matches its real outline.

Can you use filter: drop-shadow() on text?
Yes. It traces the rendered letterforms rather than the text’s line box, making it a flexible alternative to text-shadow, especially when you want images and text to share the same shadow style.

Can you apply more than one drop shadow at once?
Yes — chain multiple drop-shadow() functions in a single filter property, separated by spaces, to combine effects like a tight contact shadow with a soft colored glow.

Is filter: drop-shadow() supported in all browsers?
Yes, it’s supported in all current major browsers (Chrome, Firefox, Safari, Edge) with no fallback needed for standard use.

Scroll to Top