CSS text-shadow generator — glows, drop shadows and 3D lettering

Type one shadow per line as x, y, blur and colour, and the generator turns the list into a single text-shadow declaration you can paste into your stylesheet, with a live headline preview.

Live demo · real result from this tool

Press Generate to create a result.

Processed on your device — nothing is uploaded.

How to use the CSS text shadow generator

  1. In Shadow layers, write one shadow per line: x offset, y offset, an optional blur, then a colour. For example 2px 2px 0 #1e3a8a.
  2. Change Preview text, Font size, Text colour and Background so the preview looks like your real heading.
  3. If a line cannot be read, the tool tells you which one.
  4. Copy the .headline rule and rename the class to suit your page.

What it does and when to use it

text-shadow draws copies of the letter shapes behind the text, shifted and blurred. One soft shadow lifts a heading off a photo. Several sharp shadows, each one pixel further out, build the stepped “3D” letters seen on posters. Shadows with zero offset and growing blur make a neon glow.

Use it for headings, logos and short labels, not body text, where shadows blur letter edges. If you want a clean outline instead of a shadow, the text stroke generator is a better fit, and for shadows on boxes rather than letters use the box shadow generator.

How it works

Each line is parsed into lengths and one colour. Bare numbers get px, colours in any CSS form are written back as hex, or as rgba() when they are see-through. The layers are joined with commas into one declaration, together with your text colour:

.headline {
  color: #3b82f6;
  text-shadow: 2px 2px 0 #1e3a8a, 4px 4px 14px rgba(0, 0, 0, 0.35);
}

That is the default output. MDN lists text-shadow as Baseline widely available since July 2015, so no prefixes are needed.

Worked examples

Neon glow. Two layers, 0 0 8px #ff00ff and 0 0 16px #ff00ff, with white text on a dark background, give text-shadow: 0 0 8px #ff00ff, 0 0 16px #ff00ff; The small blur sharpens the glow near the letters and the larger one spreads it out.

Stepped 3D letters. Four hard layers, each moved one more pixel down and right, the last one darker, with amber text #fbbf24: text-shadow: 1px 1px 0 #b45309, 2px 2px 0 #b45309, 3px 3px 0 #b45309, 4px 4px 0 #92400e;

A box-shadow habit. Typing inset 0 2px 4px #000 returns the message "inset" is not allowed in text-shadow, because text shadows cannot be inset.

Limits and tips

  • Many blurred layers cost paint time. Each blurred layer is redrawn whenever the text moves, so keep animated headings to one or two layers.
  • Glows reduce contrast at the edges. Pick text and background colours that pass on their own, and test them with the contrast checker.
  • The preview is fixed at weight 800, so check the result with your real font.
  • For gradient text or motion, pair the shadow with the CSS gradient generator or the animation generator.

Frequently asked questions

Which shadow is drawn on top when I add several?
The first line. Browsers paint the first shadow in the list closest to the text and each later one behind it, so put the sharp, small shadow first and the big soft one last.
Can text-shadow have a spread or be inset like box-shadow?
No. A text shadow takes only an x offset, a y offset, an optional blur and a colour. The generator rejects the word inset, and it only accepts up to three lengths per line.
What happens if I leave out the colour?
The generator fills in rgba(0, 0, 0, 0.25), a soft black. Plain CSS would instead use the text's own colour, so the generator always writes the colour out to avoid surprises.
Does a shadow make light text readable on a busy photo?
It helps, but do not rely on it alone. Check the text colour against the lightest part of the image with a contrast checker, and add a dark overlay behind the text if the ratio is still too low.
Do bare numbers work?
Yes. A line such as 2 2 4 #000 is read as 2px 2px 4px.

Sources

  1. text-shadow - CSS | MDN — MDN Web Docs, accessed 2026-10-08

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close