Skip to content
🔤

Text Shadow Generator

Create and preview CSS text shadows visually.

Runs in your browser

Updated

2
2
4
0
50%
Shadow

Building one text-shadow declaration

Six controls define a single shadow: X Offset and Y Offset each range from -30 to 30 pixels, Blur runs 0 to 40, Spread runs -10 to 10, and Opacity runs 0 to 100 percent. A shadow colour picker, a sample text field defaulting to "Shadow" and a text colour defaulting to #172554 finish the set. Each change updates a large bold preview on the right and rewrites the read-only CSS line below, which has a Copy button.

A worked example

On load the sliders sit at X 2, Y 2, Blur 4, Spread 0 and Opacity 50 with the default black, producing exactly text-shadow: 2px 2px 4px 0px rgba(0,0,0,0.5);. Nudge Spread to 3 and the same line grows to a 3px spread, which thickens the shadow evenly rather than softening it.

How the colour string is made

The hex value is split into three channels and paired with opacity divided by 100, so black at half opacity prints rgba(0,0,0,0.5) instead of a hex colour. That keeps the shadow translucent over any background you later drop it on. The percentage shown beside the slider is rounded back from the same decimal, and the offset values are emitted in pixel units. Pair it with the box shadow generator for surfaces, and pass the finished sheet through a CSS minifier before shipping.

Where it stops

  • Only one shadow layer is generated; there is no way to stack comma-separated offsets for a neon look.
  • Text size, weight and font family are fixed in the preview, so what you see is not your typography.
  • There is no inset option, since the CSS property does not support one.
  • The unitless opacity in the rgba value may need rounding if you hand-edit the declaration.

Questions people ask

Why does the copied CSS include a spread value of zero?

The page always writes all four lengths, and a zero spread is simply the neutral case.

Can I make the shadow a different colour than black?

Yes, the shadow colour picker is independent of the text colour, so tinted glows are straightforward.

Will older browsers show the spread?

Some legacy engines ignore spread on text, in which case the offsets and blur still apply.