Skip to main content

CSS Text Shadow Generator

Type the words you are styling, then build their shadow layer by layer — soft depth for headings, stacked offsets for a crisp outline, wide blur for a glow. The code underneath is the exact text-shadow declaration to paste into your stylesheet.

Private by construction: everything is computed in your browser — nothing is uploaded or logged.

Shadow 1

Your CSS

text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3)

Private by construction: every value is turned into CSS in your browser — nothing is uploaded, sent, or logged.

Embed this calculator on your website →

The formula

text-shadow: offset-x offset-y blur color

  • offsets — how far the shadow copy of the text shifts right and down. Negative values shift it left and up.
  • blur — how soft the shadow's edges are. Zero keeps the letterforms crisp — the trick behind outline and 3D effects. A negative blur is invalid CSS, so this tool clamps it to 0, stated openly.
  • what text-shadow does NOT have — no spread and no inset, by specification: a shadow cannot grow the letters or clip inside them. (Its sibling box-shadow has both — there is a generator for it in the related tools.)
  • layers — shadows stack in order, the first painting on top. Removing every layer prints none.

Worked example: the tool's starting state — 2 right, 2 down, 4 of blur, black at 30% opacity — prints text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3).

How it works

A shadow is a copy of the text. The browser draws the text again behind itself — shifted by the offsets, softened by the blur, in the shadow color. Because the copy follows the actual glyphs, the effect works at any font size and on any words.

Outlines are four crisp shadows. One unblurred shadow a pixel up, one down, one left, one right — the copies peek out on every side and read as an outline. Stack more directions and diagonals for a thicker, smoother ring.

Glow is blur plus repetition. A wide-blurred shadow in a saturated color makes text look lit; stacking the same shadow two or three times intensifies the halo without changing the code's shape.

Examples

  • A crisp outline — four zero-blur layers: 1px 0px 0px #000000, -1px 0px 0px #000000, 0px 1px 0px #000000, 0px -1px 0px #000000
  • A neon glow — the same shadow three times at growing blur: 0px 0px 6px rgba(23, 192, 138, 0.9), 0px 0px 12px rgba(23, 192, 138, 0.7), 0px 0px 24px rgba(23, 192, 138, 0.5)
  • A retro hard shadow — one solid offset, no blur: 3px 3px 0px #0b7a5c

Frequently asked questions

Why is there no spread slider like box-shadow has?

Because the CSS specification gives text-shadow no spread radius and no inset keyword — those exist only on box-shadow. A tool that printed them would hand you code browsers ignore, so the controls simply are not here.

How do I make the shadow a solid outline instead of a blur?

Set blur to 0 and add four layers — one pixel in each direction. Each crisp copy shows on one side of the letters; together they read as a continuous outline.

Which layer paints on top?

The first in the list. When layers overlap — as in glow stacks — the earliest, tightest shadow stays most visible at the core, which is why glow recipes list small blurs first.

Does text-shadow hurt readability?

It can: heavy blur or low contrast between shadow and background muddies letterforms, especially at small sizes. Keep shadows subtle for body text and reserve the dramatic stacks for large headings — and check the pairing with the WCAG Contrast Checker in the related tools.