CSS Text Shadow Generator
Outline, neon, engraved and embossed. Stack up to six layers.
Sharp shadows
text-shadow: 0px 2px 6px rgb(15 23 42 / 0.35);
/* Tailwind */
[text-shadow:0px_2px_6px_rgb(15_23_42_/_0.35)]There is no inset text-shadow
text-shadow looks like box-shadow with one value missing, and the
differences catch people out: there is no spread, and there is no inset. Engraved
and embossed text — the two effects most often searched for as "inset text shadow" — are built
out of two ordinary shadows pointing opposite ways.
How to use it
-
Start from a preset
Soft, Hard, Outline, Neon, Engraved and Embossed. Each is a working effect, and the Engraved one demonstrates how inset text is faked.
-
Set your own text
Type the real words, at the real size and weight. Shadows that look right on a 56px sample often disappear at 16px.
-
Stack layers
Outlines need four hard shadows and glows need three soft ones. Add up to six and tune each independently.
-
Copy it
The text-shadow declaration, or the Tailwind arbitrary-property form since Tailwind has no core text-shadow utility.
Faking engraved text
Put a dark shadow one pixel above the glyph and a light one one pixel below. The eye
reads a light edge on the bottom as a surface catching light from above, and a dark edge on top
as a recess — so the text appears cut into the page. Swap the two and it appears raised
instead. That is the whole trick, and it is why no inset keyword was ever needed.
Outlines: four shadows, zero blur
One hard shadow in each diagonal direction at one pixel produces a clean outline. For anything
thicker, -webkit-text-stroke is now supported across all current browsers and
scales better than stacking more shadow layers.
Test at the real size
A shadow tuned on a 56px display heading is usually far too heavy at 16px, where it turns into a smudge that hurts legibility. Type your actual copy into the preview and drop the size down before committing.
Frequently asked questions
Is there an inset text-shadow in CSS?
text-shadow has no inset keyword, unlike box-shadow. Engraved text is faked with two shadows: a dark one slightly above the glyph and a light one slightly below, which the eye reads as a cut into the surface. The Engraved preset does exactly this.How do I add a text shadow in CSS?
text-shadow: 0 2px 6px rgb(15 23 42 / 0.35) — offset-x, offset-y, blur, colour. Unlike box-shadow there is no spread value, and you can stack any number of shadows with commas.How do I outline text with text-shadow?
-webkit-text-stroke instead, which is now supported across all current browsers.How do I make a neon glow effect?
Does text-shadow hurt performance?
opacity on a layer instead.How do I use text-shadow in Tailwind?
[text-shadow:0_2px_6px_rgb(15_23_42_/_0.35)]. This tool emits that form directly.