DevTools Logo

Text Shadow Generator

Text Shadow Generator

Compose multi-layer CSS text shadows with a live preview and copy-ready values.

Runs in your browser

Shadow stack

1/1 visible
Layer 1

0px 2px 4px rgba(0, 0, 0, 0.25)

Preview & CSS

1 layer active
Shadowed heading

1 layer active. Text-shadow has no spread or inset values.

Examples

Soft heading

Input
x: 0 · y: 2 · blur: 4 · color: #000000 · alpha: 0.25
Output
0px 2px 4px rgba(0, 0, 0, 0.25)

The default one-layer value for a subtle lift on light backgrounds.

Retro stack

Input
three zero-blur layers at 2/4/6px in orange, pink and indigo
Output
2px 2px 0px rgba(249, 115, 22, 1), 4px 4px 0px rgba(219, 39, 119, 1), 6px 6px 0px rgba(79, 70, 229, 1)

Hard layers stack behind one another for the classic poster treatment.

Neon glow

Input
white 4px core, cyan 12px, violet 28px
Output
0px 0px 4px rgba(255, 255, 255, 1), 0px 0px 12px rgba(34, 211, 238, 0.9), 0px 0px 28px rgba(139, 92, 246, 0.7)

Wider, gradually transparent layers simulate a glowing tube on a dark surface.

About this tool

Text Shadow Generator composes CSS text-shadow values visually. Each layer has an X and Y offset, a blur radius, a hex color and an opacity slider; layers stack in the order you choose, with the first one painted on top. Add, duplicate, reorder, hide or solo layers while the preview updates on your own sample text.

Presets cover the recurring effects — soft, hard, retro stack, neon glow, emboss and an eight-layer long shadow — and stay editable once loaded. The preview switches between light and dark surfaces, editable text, three font stacks and sizes from 16 to 120 pixels, so a value can be judged in a realistic setting before it is copied.

The output is either the bare CSS value or a complete selector rule, with per-layer values available for fine tuning. Text-shadow has no spread radius and no inset keyword; those controls are intentionally absent. Everything runs locally and the emitted CSS is inert text.

What this tool does not do

  • Only text-shadow is generated; box shadows, gradient text and text stroke are separate properties.
  • The font selector uses bundled system, serif and monospace stacks and loads no web fonts.
  • Preview uses the browser's CSS engine, so exact glyph rendering differs between platforms.
  • Layer count is capped at 24 to keep the editor responsive.

How to use this tool

  1. Choose a preset

    Start from soft, hard, retro, neon, emboss or long shadow, or build a stack from scratch.

  2. Edit the layers

    Set offsets, blur, color and opacity for each layer. Use the up/down buttons to reorder — the first layer is the topmost shadow.

  3. Judge in context

    Type your own sample text, pick a font and size, and toggle the dark surface to check visibility.

  4. Copy the CSS

    Copy the comma-separated value or the full CSS rule, or download it as a stylesheet.

Use cases

Typography experiments

Explore layered effects interactively instead of guessing hex and pixel values in a stylesheet.

Social graphics

Design readable text over photos by comparing soft and hard shadows on the preview surface.

Design hand-off

Copy a complete CSS rule with the exact rgba layers so implementation matches the mockup.

Layer syntax

PartMeaning
X offsetHorizontal shift; negative values move the shadow left
Y offsetVertical shift; negative values move the shadow up
BlurSoftening radius; zero yields a hard-edged silhouette
rgba colorHex converted to rgba with the slider's alpha (0–1)
Comma separatorLayers are painted first-to-last, so the first entry is on top

Offsets are clamped to ±50px and blur to 0–50px; there is no spread or inset in text-shadow.

Common mistakes

Mistake:Expecting a spread or inset option as in box-shadow.

Fix:text-shadow has neither; use blur and offset layers, or a separate box-shadow tool for element shadows.

Mistake:Putting the largest glow first in the stack.

Fix:The first layer is painted on top, so keep small, sharp cores first and wide, transparent glows last.

Mistake:Leaving opacity at zero and wondering why nothing renders.

Fix:A fully transparent layer is flagged in the editor; raise its alpha or hide it to clean the output.

Mistake:Pasting a named color such as rebeccapurple.

Fix:The layer editor accepts strict hex colors; invalid input falls back to black instead of generating invalid CSS.

Frequently asked questions

What is the order of text-shadow layers?

The first comma-separated layer is painted on top and later layers sit behind it. Use the up/down buttons in the layer stack to reorder; for neon effects keep a small white core first and put wide colored glows last.

Why is there no spread value in text-shadow?

The CSS text-shadow property accepts only x offset, y offset, blur radius and color. Spread and inset belong to box-shadow, which targets an element's box rather than its glyphs.

How do I make neon glow text?

Load the Neon preset or stack a 4px white blur, a 12px colored blur at about 0.9 alpha and a 28px blur at about 0.7 alpha, then preview on the dark surface. Wider, more transparent layers read as glow.

Does text-shadow work with web fonts?

Yes, the generated CSS applies to whatever font your page uses. This preview deliberately loads no web fonts; it offers system, serif and monospace stacks so it stays local and fast.

How do I prevent blurry text?

Use zero blur with small offsets for a crisp hard shadow, keep high-contrast colors, and avoid stacking many semi-transparent blurred layers over thin glyphs. The Hide and Solo controls help isolate the layer causing the blur.

Can I copy one layer at a time?

Yes. Each layer row has a Copy layer button that copies that layer's exact value, and the output panel can copy either the whole comma-separated value or a complete CSS rule.

References & standards