Text Shadow Generator

Choose a look, type your own headline into the preview, and adjust the layers. The text colour and the background are checked for contrast as you go.

How it works

text-shadow paints a copy of each letter behind the real one, moved across and down by the amounts you set and blurred by the blur radius. Unlike box-shadow, it has no spread and no inset.

One element can have many text shadows, separated by commas, and the first is painted on top. Most of the striking looks come from stacking: a 3D block is six hard shadows, each one pixel further out; a neon glow is a tight white glow under two wider coloured ones.

Each preset also sets the text and background colour it was designed for, because a neon glow on a white page is invisible. Change them freely afterwards.

The contrast line measures the text colour against the background and ignores the shadow, the same way most contrast checkers do.

How to use it

  1. 1 Pick a look from the row of presets.
  2. 2 Type your own words into Sample text and set the size, so you judge the shadow on the real headline.
  3. 3 Adjust the text colour and each layer: across, down, blur, colour and opacity. Add or remove layers.
  4. 4 Press Copy CSS and paste the rule into your stylesheet.

Good to know

  • Big text carries big shadows. A 4px offset that looks bold on a 64px heading turns a 16px paragraph to mush, so keep shadows off body text.
  • For a 3D block, the shadow colour should be a darker shade of the text colour, not grey. Orange text with a brown extrusion reads as one solid object.
  • The Outline preset uses four hard shadows, one towards each corner. It works on any browser, while -webkit-text-stroke gives a cleaner line but eats into the letters.
  • Use the Box Shadow Generator for shadows around boxes, cards and buttons.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

How a 3D block and a neon glow are built from the same few numbers

Start with the 3D block preset. Its text-shadow is six layers: 1px 1px 0 #7a3e00, then 2px 2px 0, and so on up to 6px 6px 0, all in the same dark brown. Each layer is a sharp copy of the letters, one pixel further down and to the right than the last. Because none of them is blurred and each overlaps the one before, they merge into a solid slab 6 pixels deep. The eye reads it as the side of a block, with the orange text as its face.

Why not one layer at 6px 6px? Because one copy six pixels away leaves a gap: you see the letter, a strip of background, then a second letter. The stack of one-pixel steps fills that gap. The cost is six shadows to paint per letter, which a browser does easily for a heading but which is wasteful across paragraphs of text.

The Neon preset uses the opposite idea. All three layers sit at 0 0, so nothing moves; only the blur changes. The first is white at 90% with a 4px blur, which makes the letters look hot at the core. The second is pink with a 12px blur, and the third the same pink at 80% with a 24px blur. Each wider layer is fainter at its edge, so the glow fades out smoothly rather than stopping at a line. On a dark navy background it looks lit; on white it almost disappears, which is why the preset also sets the background.

Contrast is the honest catch. The 3D block preset sets orange #e8590c on a cream #fff6e5 background, which measures 3.33:1. That passes for large text, which WCAG defines as 24px or bigger, or about 18.7px in bold, and fails for body text, which needs 4.5:1. The shadow helps the shape stand out, but it does not change the measured ratio, so the line under the text colour tells you the real figure.

The limits. Shadows are drawn by the browser from the font it has, so a fallback font will carry the same shadow on different letter shapes. Very large blurs on long text can make scrolling slower on old phones. And this tool writes plain text-shadow; it does not add -webkit-text-stroke or background-clip effects, which are different techniques with their own trade-offs.

Frequently asked questions

What is the difference between text-shadow and box-shadow?

text-shadow follows the shape of each letter. box-shadow follows the element's box. text-shadow also has no spread value and no inset keyword.

Does a shadow count towards text contrast?

Contrast checkers, including the one on this page, compare the text colour with the background and ignore the shadow. A dark outline can make light text easier to read on a busy image, but you cannot prove it passes with a ratio, so aim for a passing text colour first.

Why does my 3D text look blurry?

Because a layer has a blur above zero. Solid extrusions need a blur of 0 on every layer, with offsets that step by one pixel.

Is anything uploaded?

No. The CSS is written by code running in this page, and your browser draws the preview.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.