CSS Text Shadow Generator

Create beautiful, layered CSS text shadows with real-time preview and instant code generation.

#000000

Preview Text

text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);

About the CSS Text Shadow Generator

Set the shadow’s horizontal and vertical offset, blur radius, colour and opacity, preview it on sample text, and copy the CSS text-shadow rule.

Everything you enter is processed in your browser; nothing is uploaded or stored.

How to use it

  1. Adjust the X and Y offsets and the blur radius.
  2. Choose the shadow colour and opacity.
  3. Type your own preview text, then copy the CSS snippet.

How text-shadow is written

text-shadow: x-offset y-offset blur-radius colour;

Positive x moves the shadow right and positive y moves it down. Blur 0 gives a hard shadow; larger values soften it. Several shadows can be listed, separated by commas, for outlines or glow effects.

Example

text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); gives a soft drop shadow that lifts white headings off a photo.

Tips

  • Subtle shadows (low opacity, small offset) help text over images stay readable.
  • For a glow, use zero offsets and a large blur in a bright colour.

Frequently asked questions

How do I make an outline around text with CSS?

Stack four 1px shadows in each direction, or use -webkit-text-stroke.

Does text-shadow affect performance?

Small shadows are cheap; very large blurs on lots of text can slow scrolling on older phones.

What is the difference between text-shadow and box-shadow?

text-shadow follows the letters; box-shadow follows the element’s box.