CSS neon text shadow

Make neon text with CSS text-shadow: stacked blurs, five real presets, readability and Tailwind.

loading CSS neon text shadow
About this tool

CSS neon text: how the glow is made

text-shadow draws a shadow behind each letter, with an offset, a blur and a color (there is no spread, unlike box-shadow). A neon effect is a stack of shadows with no offset and increasing blur: a small white one for the hot core of the tube, and larger ones in a saturated color for the halo. The generator opens on the "neon" preset, with three layers, and lets you change the color, the blur of each layer and the text of the preview.

A real result

text-shadow: 0 0 4px #ffffff,
    0 0 12px #ffb224,
    0 0 24px #ffb224;

Tailwind arbitrary property:

[text-shadow:0_0_4px_#ffffff,0_0_12px_#ffb224,0_0_24px_#ffb224]
.neon {
  color: #fff;
  background: #141413;
  text-shadow: 0 0 4px #ffffff, 0 0 12px #ffb224, 0 0 24px #ffb224;
}

The five presets

PresetLayerstext-shadowLook
neon30 0 4px #ffffff, 0 0 12px #ffb224, 0 0 24px #ffb224;glowing signs and headings on a dark background
retro23px 3px 0 #ffb224, 6px 6px 0 #3b82f6;hard, offset color layers: a 80s poster look
soft10 2px 4px rgba(0, 0, 0, 0.35);a faint lift for text over photos
emboss20 1px 0 rgba(255, 255, 255, 0.8), 0 -1px 0 rgba(0, 0, 0, 0.4);letters that look pressed into the surface
outline4-1px -1px 0 #141413, 1px -1px 0 #141413, -1px 1px 0 #141413, 1px 1px 0 #141413;a thin outline made of four hard shadows

Readability and performance

  • Glow only works on dark backgrounds: on white, a light halo disappears. For light pages use a colored text with a dark soft shadow instead.
  • Keep the text itself light (white or near white) and bold enough: the blur lowers the edge contrast, so thin letters get hard to read. Use it for short headings, not paragraphs.
  • Animating text-shadow (a flicker) repaints the text on every frame; keep it to a single heading and honor prefers-reduced-motion.

Common mistakes

  • A single big blur: it reads as a smudge, not a glow. Neon needs the small bright layer under the large ones.
  • Setting the text color to the glow color: the letters then melt into their halo. White letters with a colored halo look like a lit tube.

How to use the generator

  1. The neon preset is loaded; type your own text in the preview.
  2. Change the color of the halo layers and their blur; add or remove layers.
  3. Copy the CSS or the Tailwind class.

Frequently asked questions

How do I make neon text with CSS?

White text on a dark background with three text-shadow layers: a small white blur and two larger ones in a bright color, as in the preset.

Is there a spread value in text-shadow?

No: text-shadow takes only the two offsets, the blur and the color. To thicken a glow, stack more layers.

Can I make a text outline with text-shadow?

Yes, the "outline" preset uses four hard shadows at the diagonals. -webkit-text-stroke is shorter, but it is centered on the glyph edge and eats into the letter.

Report a problem