What Is CSS Text Shadow?
The text-shadow property adds shadow effects to text — from subtle depth cues to dramatic neon glows and 3D letterpress effects. Unlike box-shadow (which shadows the element box), text-shadow follows the actual shape of each character, creating precise, typography-specific effects.
Popular Text Shadow Techniques
Subtle depth — a light 1px offset creates readable text lift on light backgrounds. Neon glow — stack multiple shadows at 0 0 with increasing blur and a bright color. 3D / Letterpress — layer shadows at incremental offsets to simulate extruded text. Long shadow — dozens of shadows at 1px increments create a trendy long-shadow effect.
How to Use This Text Shadow Generator
- Enter your text — Type the text you want to apply a shadow to — works best with large, bold headings.
- Adjust shadow offsets — Set the horizontal (X) and vertical (Y) offset in pixels. Positive X moves right, positive Y moves down.
- Set blur and color — Control the blur radius for soft vs. sharp shadows, and choose the shadow color.
- Layer multiple shadows — Add additional shadow layers for effects like neon glow, 3D text, or retro outlines.
- Copy the CSS — Grab the complete
text-shadowproperty declaration.
Worked example: how far a blur actually spreads
The Blur slider runs 0–100 px, offsets ±50 px, and the preview text 16–120 px. Blur radius is not the size of the glow you see: the spec draws it as a Gaussian with a standard deviation of half the radius, so the edge fades gradually and thin letters lose most of the colour. On October 12, 2026 we drew one white 0 0 Npx shadow behind a black 72 px letter I in Chromium and measured how far from the glyph the glow stays visible:
| Blur radius | Visible at ≥1% brightness | Visible at ≥10% brightness |
|---|---|---|
| 4 px | 5 px | 3 px |
| 10 px | 10 px | 6 px |
| 20 px | 21 px | 13 px |
| 40 px | 41 px | 19 px |
| 80 px | 70 px | never reaches 10% |
| 100 px (slider maximum) | 79 px | never reaches 10% |
Up to about 40 px the faint edge reaches roughly the blur radius, but the clearly visible part is only about half of it. Past 40 px a single shadow behind a thin letter is spread so wide that it never gets brighter than 10%. That is why the neon presets stack a tight shadow (10 px) under wide ones: the tight layer gives the bright core, the wide layers the haze.
How far the presets spill outside the text box
Shadows do not change layout, so this space is not reserved; a parent with overflow: hidden cuts the glow off and the next element can sit on top of it. Measured in Chromium at 72 px, weight 900:
| Preset | Layers | Shadows | Visible beyond the text box |
|---|---|---|---|
| Neon Glow | 3 | blur 10/40/80 px | 58–61 px on every side |
| Fire | 3 | upward offsets 2/4/8 px, blur 4/10/20 px | 18 px above, 12 px each side |
| 3D Depth | 5 | 1–5 px diagonal, no blur | 2 px right |
| Outline | 4 | four 1 px diagonals | none |
- Always give each shadow a colour. The generator does, but if you hand-edit the CSS and drop the colour, Safari draws that shadow transparent while Chrome and Firefox use the text colour (MDN compatibility notes).
- Outlines. The Outline preset fakes a stroke with four 1 px diagonal shadows, which works at 1–2 px. For thicker outlines
-webkit-text-strokedraws a real stroke but eats into the letter shapes;paint-order: stroke fillkeeps the fill on top (HTML text since Chrome 123, Safari 11 and Firefox 60, per MDN).
Sources
Checked on .
Frequently Asked Questions
📖 Learn More
Related Article How to Generate CSS Text Shadows →Built by Derek Giordano · Part of Ultimate Design Tools