Give your letters a shadow: choose how far it falls, how soft it is and its color, then copy the text-shadow line.
FluffyShieldProtected workspace
Loading the tool…
The tool didn't load. Reload the page, or check whether an extension or network filter blocks .
Free · No upload · No sign-up · No usage quotas
How do you outline text with text-shadow?
By stacking shadows. A text shadow can't be made any thicker, but four thin ones, each nudged a different way, make a ring around every letter.
FluffyBench · 4 min read · Reviewed
White words on a busy picture
You've put a white headline over a photo of a beach. Where it crosses the sky it reads fine; where it crosses the bright sand, parts of the letters go missing. The letters need an edge that's dark whatever is behind them.
A text shadow is a second printing of the letters. It works like a rubber stamp pressed twice: once in black, slightly off to one side, then again in white on top. The black shows only where the two prints don't overlap. In CSS the first two numbers say how far off the black print lands, right and down, and the third blurs it.
Why one shadow can't make a ring
A box shadow has a fourth number, spread, which makes the shadow bigger than the box all round. A text shadow has no such number: the CSS specification gives it two or three lengths and a color, and says outright that spread is not allowed. So the box above shows no Spread field for text.
One shadow
Four shadows
Each shadow is the word again, 2 pixels off in one direction, behind the letters. How we worked it out
A single copy, moved 2 pixels right and 2 down, thickens only the right and lower edges of each letter. To edge the top and left too you need more copies, moved the other ways, and CSS lets one text-shadow carry as many as you like, separated by commas.
Making the first of the four in the box above
The generator stacks shadows, so start with the copy that goes down and to the right, then add the other three.
Set both offsets, X and Y, to 2.
Put Blur at 0, so the copy of the letters keeps a hard edge.
Replace the color with #000000.
Raise Opacity to 1.
Copy the line with Copy CSS.
You now have text-shadow: 2px 2px 0px #000000;
Joining the copies into one line
The other three are the same copy with the signs of the offsets flipped: -2 and 2, then 2 and -2, then -2 and -2. All four go after one text-shadow, with commas between them, and this line can be copied as it is:
Use the box above when one copy needs changing, say to another color or a thicker ring. The first shadow in the list is drawn on top and the last at the bottom. With one color it makes no difference; with two, say a black ring and a soft colored glow, put the ring first so the glow sits behind it.
A hard ring isn't the only fix for the beach headline. A single soft shadow, such as 1px 2px 4px rgba(0, 0, 0, 0.4), darkens the sand just around the letters without drawing a line. That one is a single run of the box above, with no joining.
When the shadow belongs on something else
The headline sits on a card that should lift off the page
A transition can carry the headline from one text-shadow to the other. How it speeds up and slows down on the way is a timing curve, and that page reads the four numbers of one.
You'd like to switch between a text shadow and a box shadow while you design