Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Build a CSS text-shadow with a live text preview.
text-shadow: 2px 2px 4px #000000;This tool builds a CSS text-shadow declaration -- offset, blur, and color -- with a live preview against sample text, so you can see exactly how the effect looks before copying the CSS.
Adjust offset X/Y, blur, and color. The preview text and generated CSS update instantly.
text-shadow: offsetX offsetY blur color; -- similar to box-shadow, but without a spread option and without an inset variant, since text-shadow only ever renders behind the glyph shapes.
For element (not text) shadows, see the Box Shadow Generator.
The tool opens with offset X of 2 pixels, offset Y of 2 pixels, blur of 4 pixels and black as the color, giving text-shadow: 2px 2px 4px #000000; Unlike the box shadow tool, this one uses the color you pick exactly as a hex value; there is no separate opacity field. If you want a semi-transparent shadow, copy the output and swap the hex color for an rgba value by hand. It generates one layer only.
Consider a hypothetical hero headline in white text over a photograph that has both bright and dark regions. A plain white headline can become hard to read on the bright areas. Try offset X 0, offset Y 2, blur 6 and a dark color such as #000000. The shadow forms a soft dark halo below the letters that separates them from the image without looking like a hard outline. Keep it subtle, since a very dark and heavy shadow tends to look dated. Then check the result at both desktop and mobile sizes, because thin text at small sizes can look smudged if the blur is too large.
A shadow can help but it does not replace sufficient contrast. Check contrast between text and the actual background without counting the shadow, because some users have settings, print modes or contexts where the shadow is not rendered. Heavy shadows on body text can also reduce readability, especially for people with low vision, so they are better saved for large headings and display text.
The generated declaration contains a single shadow. Multi-layer effects such as outlines, embossing or 3D extrusion need several comma-separated shadows, which you can build by pasting more values after the first. CSS text-shadow also applies to text only; to add a shadow to an icon or image with transparency, other techniques such as the filter property are typically used.
Yes -- CSS text-shadow supports comma-separated multiple shadows; this tool generates one layer for quick use, extendable by hand for layered effects.
A subtle shadow can actually improve legibility over a busy or low-contrast background, which is why it's commonly used on hero text overlaid on photos.
Yes -- it's been universally supported in modern browsers for many years with no vendor prefix needed.
Replace the hex color in the generated line with an rgba value, for example rgba(0, 0, 0, 0.4). The tool itself outputs a solid hex color.
For legibility over images, try a blur of 4 to 8 pixels with a small vertical offset. Adjust while watching the live preview until the letters look clear but not smeared.
Approximately. You would combine several sharp shadows on different sides by hand. The generator provides one layer, so you would extend the output yourself.
A shadow on a few headings is not a concern. Very large blur values on lots of text or on animated text can be more demanding, so keep the effect limited.
Reference: MDN Web Docs