A text shadow can lift a heading off a busy photo, add a soft glow to a game title, or give a retro poster feel to a landing page. The CSS is a list of offset, blur and colour values, simple in theory, but the good effects come from stacking several layers, and that is much easier to judge on screen than in code.
How the presets are built
- Subtle: one soft shadow just below the text. Improves legibility on images without looking like an effect.
- Glow: two wide, blurred layers in one colour with no offset.
- Neon: a tight white core plus three increasingly wide coloured glows on a dark background.
- 3D: five hard shadows, each 1px further down and right, then one soft shadow to ground it.
- Outline: four hard shadows in four directions, a classic way to outline text without extra markup.
- Retro: two hard, offset layers in contrasting colours, like a seventies print.
Start from one of these, then adjust the colours to match your brand.
Practical tips
- Text shadows don’t take up space, so they can overlap nearby content. Leave a little extra margin around large glows.
- Use relative units such as
emin your own CSS if the text size changes across screens; the generator shows pixels for clarity. - For headings over photos, test both a bright and a dark part of the image. A subtle dark shadow usually handles both.
- The shadow is purely visual. Screen readers read the text normally, so effects are safe for accessibility as long as contrast stays high.
How to use the Text Shadow Generator
- Click a preset such as Glow, Neon, 3D or Outline.
- Click the preview text and type your own words.
- Adjust each layer’s X and Y offset, blur, colour and opacity.
- Add or reorder layers, and set the text colour, background and font size.
- Click Copy CSS.
Features
- Unlimited layers in one
text-shadowdeclaration. - Seven presets: subtle, glow, neon, 3D, outline, retro and embossed.
- Editable preview text from 16px to 140px.
- Per-layer opacity using modern
rgb(r g b / a)colours. - Background and text colour controls to test contrast.
Frequently asked questions
How do I make a neon text effect?
Stack several shadows with no offset and growing blur in the same bright colour, with a small white one closest to the text. The Neon preset uses four layers: white at 4px, then pink at 10px, 22px and 44px, on a dark background.
Can text-shadow make an outline?
Yes, with four hard shadows offset 1–2px up, down, left and right. It works for thin outlines. For thicker, smoother outlines, the -webkit-text-stroke property is often a better choice.
Do text shadows affect readability?
A soft, subtle shadow can help light text stand out on photos. Heavy blur or colourful glows make body text harder to read, so keep effects for headings, logos and short display text.
Does text-shadow work in every browser?
Yes. text-shadow, including multiple layers, has been supported in all major browsers for over a decade.
Written by Dewan Razib