CSS Text Shadow Generator
This free online CSS text shadow generator builds neon glows, fire effects, 3D pop, and layered drop shadows with a live preview — drag the text to set the offset, stack multiple shadows, and tune blur, color, and opacity. Start from a preset or build from scratch, then copy and paste the text-shadow as CSS or Tailwind. No signup required, runs entirely in your browser.
Shadow layers
The first layer paints on top. Drag the text on the preview to move the selected shadow. Max 8 layers.
Editing layer
Offset X
Offset Y
Blur
Color
Opacity
Preview text
Font size
Font weight
Text color
Background
Syntax
- x y blur color
- The value order
- a, b, c
- Comma = multiple shadows
- no inset
- text-shadow has no inset
- no spread
- text-shadow has no spread
Glow recipe
- Zero offsets
- No directional shift
- Large blur
- Spreads the glow outward
- Stack 2–3 layers
- Intensifies the effect
- Dark bg
- Required for neon to read
3D recipe
- Zero blur
- Hard, crisp steps
- Step offset by 1px
- Each layer adds depth
- Same color
- Decreasing opacity per step
- 6–10 layers
- More = stronger 3D pop
Tailwind v4
- text-shadow-sm
- Built-in scale
- text-shadow-[…]
- Arbitrary custom value
- text-shadow-none
- Remove shadow
- Multi-shadow
- Use style attribute
What is text-shadow in CSS?
The text-shadow property casts one or more shadows behind the letters of a text element. Each shadow is written as a horizontal offset-x, a vertical offset-y, an optional blur radius, and a color — for example text-shadow: 2px 2px 8px rgba(0,0,0,0.5). Unlike box-shadow, text-shadow has no inset keyword and no spread radius — the property is strictly positional. The blur value softens the shadow's edge; set it to 0 for a hard, crisp outline-style shadow.
You can stack as many shadows as you like by separating them with commas — the first shadow in the list renders on top. This is the basis of every neon glow, fire effect, and 3D pop text you see on the web. This free CSS text shadow generator writes that syntax for you while you drag the text and tune each layer, then exports the result as CSS, Tailwind, or HTML ready to copy and paste.
text-shadow not showing? The most common causes: all values are zero (an invisible shadow), the color is fully transparent or matches the background, or a parent element's overflow: hidden is clipping it. Use browser DevTools to check the computed text-shadow value on the element — if it reads none the property isn't reaching the element at all (check specificity).
How to use this generator
Drag the text in the preview to set the selected shadow's offset, or use the Offset X/Y sliders for precision. Adjust blur, color, and opacity in the Shadows tab, and click Add layer to stack more shadows (up to eight). Use the Text tab to change the preview string, font size, font weight, text color, and page background — critical for effects like neon glow that require a dark backdrop. Start from a preset (Neon, Fire, 3D, Emboss, Retro, Long Shadow) or hit Random, then click Copy to copy and paste the CSS or Tailwind code directly into your project — no conversion needed.
CSS text-shadow Examples: Neon, 3D, Fire & Emboss
A few real-world effects and the CSS behind them, all reproducible with this generator. Select a preset above to apply any of these instantly, then copy and paste the output:
- Neon glow — stack two or three zero-offset shadows with increasing blur and the same bright color against a dark background:
text-shadow: 0 0 8px #22d3ee, 0 0 24px #22d3ee, 0 0 48px #0ea5e9; - Fire / sunset — layer warm colors (yellow → orange → red) at zero offset with escalating blur:
text-shadow: 0 0 6px #fbbf24, 0 0 18px #f97316, 0 0 36px #ef4444; - 3D pop — step the offset by one pixel per layer with no blur, and decrease opacity gradually:
text-shadow: 1px 1px 0 rgba(0,0,0,.7), 2px 2px 0 rgba(0,0,0,.5), 3px 3px 0 rgba(0,0,0,.35), 4px 4px 0 rgba(0,0,0,.2); - Emboss — a light shadow up-and-left and a dark shadow down-and-right creates a pressed-into-paper look:
text-shadow: -1px -1px 2px rgba(255,255,255,.9), 1px 1px 2px rgba(0,0,0,.5); - Text outline — four directional hard shadows at zero blur fakes a CSS text stroke:
text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000;
text-shadow in Tailwind CSS
Tailwind v4 ships a native text-shadow scale: text-shadow-sm, text-shadow, text-shadow-md, text-shadow-lg, text-shadow-xl, and text-shadow-none (to remove). For a custom value, use an arbitrary class with spaces replaced by underscores: text-shadow-[2px_2px_8px_rgba(0,0,0,0.5)].
For multiple stacked shadows, a comma inside an arbitrary class would be parsed as a class separator, so apply them with the style attribute instead: <p style="text-shadow: 0 0 8px #22d3ee, 0 0 24px #22d3ee;">. The Tailwind tab in this generator outputs the correct form automatically — a single arbitrary class for one shadow, a style attribute for two or more.
If your project still uses Tailwind v3, the native utilities aren't available — you'll need a third-party plugin (such as @designbycode/tailwindcss-text-shadow) or apply shadows directly with a style attribute. A common cause of "text-shadow not working in Tailwind" is exactly this version mismatch: the class exists in v4 but not v3, and fails silently rather than erroring.
text-shadow vs box-shadow
text-shadow follows the shape of each glyph (letter), painting behind the rendered text pixels. box-shadow follows the element's rectangular border box, regardless of what's inside it. The practical differences:
text-shadowhas no inset (you can't draw a shadow inside the letters) and no spread radius.box-shadowsupports bothinsetand aspreadvalue that grows or shrinks the shadow before blurring.- For glow effects on text, use
text-shadow— it traces the letter shapes. For glow on a card or button, usebox-shadow.
Neither property affects layout: both are purely visual effects that don't change an element's size or push neighboring content. Modern browsers composite them on the GPU, so even layered shadows are generally performant — though very large blur values on large blocks of text can trigger an occasional repaint cost.
Building the rest of the component? Pair this with our CSS Box Shadow Generator for element-level shadows, the CSS Border Radius Generator for corners, and the CSS Gradient Generator for fills.
Frequently asked questions
text-shadow adds one or more shadows behind the letters of a text element. Each shadow takes a horizontal offset, a vertical offset, an optional blur radius, and a color — for example text-shadow: 2px 2px 8px rgba(0,0,0,0.5). Unlike box-shadow, there is no inset keyword and no spread radius. Multiple shadows are separated by commas and the first one listed renders on top.
text-shadow: 0 0 10px #22d3ee, 0 0 30px #22d3ee, 0 0 60px #0ea5e9. The first shadow in the list is painted on top. Click Add layer in this generator to stack up to eight shadows for neon glows, fire effects, 3D depth, and more.
0 gives a hard, sharp shadow. All three accept px units. The color is technically optional (defaults to the element's color) but should always be set explicitly.
text-shadow: 0 0 8px #22d3ee, 0 0 20px #22d3ee, 0 0 40px #0ea5e9. Use white or a bright color for the text itself. More layers with larger blur radii create a more intense, diffuse glow. The Neon preset above applies this recipe instantly.
text-shadow: 1px 1px 0 #444, 2px 2px 0 #444, 3px 3px 0 #444, 4px 4px 0 #444. Each layer adds a slice of depth. Decreasing the opacity slightly per step gives a more natural falloff. The 3D preset builds a four-step stack you can customize further.
text-shadow utilities: text-shadow-sm, text-shadow, text-shadow-md, text-shadow-lg, text-shadow-xl, and text-shadow-none. For a custom value use an arbitrary class such as text-shadow-[2px_2px_8px_rgba(0,0,0,0.5)] (spaces as underscores). For multiple stacked shadows, the comma would be parsed as a class separator, so apply them via the style attribute instead. The Tailwind tab above outputs the correct form automatically.
text-shadow follows the shape of individual glyphs, painting behind the rendered letters. box-shadow follows the element's rectangular border box. text-shadow has no inset keyword and no spread radius; box-shadow supports both. Use text-shadow for typographic effects like neon glow, 3D depth, and emboss; use box-shadow for cards, panels, and UI elevations.
text-shadow is purely a visual effect — it never changes the element's size, shifts neighboring content, or causes layout reflow. Modern browsers composite it on the GPU, so even multiple layered shadows are generally performant. Very large blur values on a large block of text can create a repaint cost, but this is rarely noticeable in practice.
overflow: hidden — this clips shadows just like it clips box-shadow. (4) CSS specificity — another rule with higher specificity or !important may be setting text-shadow: none. Open browser DevTools, inspect the element, and check the computed text-shadow value. If it shows none the property isn't reaching the element at all.