How to use the text shadow generator
- Type your text and set its color, background and size.
- Start from a preset: Soft, Hard, Neon, 3D, Outline, Retro, Fire or Letterpress.
- Select a layer to change its offset, blur, color and opacity, or add up to eight layers.
- Copy the
text-shadowdeclaration.
The text-shadow syntax
text-shadow: offset-x offset-y blur color; Unlike box-shadow, text shadows have no spread and no inset. Several shadows are separated by commas and the first one is drawn on top.
- Glow and neon: no offset, increasing blur, the same bright color repeated.
- 3D and retro: several hard shadows (blur 0), each moved one more pixel.
- Outline: four hard shadows offset in every direction. For thicker outlines,
-webkit-text-strokeis cleaner. - Letterpress: a 1px light shadow below darker text on a mid-tone background.
Readability tips
- Use heavy effects on large display headings only. On body text, shadows reduce legibility.
- A subtle dark shadow helps white text on photos, but a semi-transparent overlay behind the text is more reliable.
- Shadows do not count toward contrast. Text must still pass the contrast checker without them.
- Many shadow layers on long text can slow scrolling on older phones; keep layer counts low for large blocks.
Combine shadowed headings with gradient backgrounds from the CSS gradient generator in your hero sections.