Shadow layers

Text colour
Background
Layers1
Largest blur ÷ size0.083 — scales with type
Scale rulekeep offsets in px and derive them from font-size for responsive shadows
Layer 1
Colour

Preview

Depth

css output
.shadow-text {
  color: #111827;
  background: #ffffff;
  font-size: 4.5000rem;
  text-shadow: 0px 2px 6px rgba(0,0,0,0.25);
}

You Might Also Need

The shadow text generator builds a shadow from stacked layers, because every convincing text shadow is a stack rather than a single offset. A small hard layer gives definition and a larger soft one gives depth, and each layer carries its own alpha so overlaps never go solid.

What is Shadow Text Generator?

The shadow text generator takes a string, a size, two colours and a list of text shadow layers, then renders the result and exports the shadow declaration.

  • Five shadow preset options cover the common cases: a soft lift below the type, a hard offset for a printed feel, a long soft shadow for depth, an emboss pair with a light layer above and a dark layer below, and a neon haze of two accent layers at different blurs.
  • Each layer carries an offset in x and y from minus 40 to 40 pixels, a blur radius from 0 to 60 pixels, and a colour chosen from a list of alpha values including black at 90, 55, 25 and 12 percent, white at 75 percent and two accent values.
  • Layers can be added and removed, so a three-layer effect can be built from a two-layer preset.
  • The largest blur radius is reported as a ratio of the type size, with a warning above 0.3 that the effect is very soft and may look fuzzy.
  • The CSS writes the size in rem and the shadow as a comma-separated list, which is how the layers survive the copy.

The alpha values are why the stack works. A shadow in solid black over solid black does not read as depth; it reads as a second copy of the text. Using a partly transparent colour means the overlap between layers accumulates gradually, and a light layer placed above a dark one produces the embossed edge that neither layer gives alone. The blur-to-size ratio is the other rule the panel states: offsets and blurs in pixels do not scale with the type, so a shadow tuned on a 72px heading becomes a blur when the same class is applied to a 20px label. Keeping the ratio under about a third of the type size is a working threshold, and deriving the pixel values from the font size is the responsive answer when the same treatment has to work at several sizes.

  • The layer colours are a fixed list, so an arbitrary shadow colour has to be edited into the CSS after copying.
  • Offsets are absolute pixels, so the shadow does not scale automatically with the type size, which is the reason for the ratio warning rather than a fix.
  • The preview renders a single line, so a shadow that behaves well on one line is not tested for how it stacks over several.
  • There is no support for a stroked or outlined letter underneath the shadow, though the two treatments can be combined by hand.
  • Nothing reports the paint cost, which matters when a heavily layered shadow sits on an element that animates.

Use it when a heading needs depth or lift and a single offset looks flat, and again when a shadow has to be diagnosed: three layers with descending alpha is almost always the answer, whatever the effect is called. Where the letter wants an edge rather than a shadow, the outlined text generator draws a stroke, the 3D text effect preview stacks hard shadows into an extrusion, and the neon text previewer layers glow around a light core. The shadow presets are also the quickest reference for the difference between definition and depth, and the neon text previewer shows the same layer technique applied to glow.

How to use Shadow Text Generator

  1. Start from the preset closest to the effect you have in mind, then read the note under the preview to see how many layers it uses.
  2. Set the size and the text and background colours before adjusting layers, since both change how much shadow the eye can read.
  3. Adjust each layer's offsets and blur, keeping the largest blur under about a third of the type size, and add or remove layers as needed.
  4. Copy the CSS and check the value of the blur ratio readout, converting the offsets to size-relative units if the treatment will be reused at other sizes.

When to use Shadow Text Generator vs related tools

Reach for it when a heading needs lift or depth and a single offset shadow looks flat, when a shadow has to work on both a light and a dark surface, or when an existing shadow has to be made to scale with the type rather than staying fixed. The layer model is the useful idea, not the presets. For an edge rather than a shadow, the outlined text generator draws a stroke; for an extrusion, the 3D text effect preview stacks hard shadows; and for a lit tube, the neon text previewer layers glow around a bright core.

Privacy & Security

This tool runs entirely in your browser — no data ever leaves your device. There is no server round-trip, no upload, no logging, and no account required. Your input is processed locally using client-side JavaScript and is never stored, transmitted, or accessible to anyone else. When you close the tab, everything disappears.

Frequently asked questions about Shadow Text Generator