Build a text-shadow visually: stack as many layers as you like, tune offset, blur, color and opacity, and preview it on your own words, font and colors. Start from presets such as neon, 3D, outline, retro and fire, then copy clean CSS.
Presets
Shadow
Shadow layers
The first layer is drawn on top.
Edit layer 1
px
px
px
%
Generated CSS
Advertisement
Advertisement
How to use the CSS Text Shadow Generator
Pick a preset like Neon, 3D or Outline, or start from the default soft shadow.
Type your own text and set the font, size, weight, text color and background to match your design.
Select a layer and adjust its x and y offset, blur, color and opacity. Add more layers for glow, depth or outlines.
Reorder or hide layers with the arrow and eye buttons to see how each one contributes.
Press Copy CSS and paste the rule into your stylesheet.
Moves the shadow right (positive) or left (negative)
2px
offset-y
Moves the shadow down (positive) or up (negative)
2px
blur-radius
Softens the shadow; 0 gives a sharp copy of the text
4px
color
Any CSS color; defaults to the text color
rgba(0, 0, 0, 0.3)
Combine several shadows with commas. The first one is painted on top, so put the small, sharp layers first and the large, soft glows last.
Recipes for popular effects
Effect
How it is built
Subtle readability shadow
0 1px 2px rgba(0, 0, 0, 0.3) for light text on photos
Neon
Light text on a dark background, 0 offsets, blur doubling from 4px to 80px, white near the letters and a bright color further out
3D / extruded
Sharp shadows offset 1px, 2px, 3px… downwards in slightly darker grays, then a few soft dark shadows for depth
Outline
Eight sharp shadows offset by 1–2px in every direction, all in the outline color
Long shadow
Dozens of sharp shadows offset 1px, 2px, 3px… diagonally, in a darker shade of the background
Letterpress
Text slightly darker than the background plus 0 1px 0 rgba(255, 255, 255, 0.75)
Anaglyph / glitch
Two sharp shadows, red to the left and cyan to the right
Tips
Use rgba() colors for natural shadows: a black shadow at 20–40% opacity blends with any background.
Large blurs on big headings look great, but keep body text shadows tiny or none to keep it readable.
text-shadow also applies to ::first-letter, ::selection and SVG text, and it can be animated with transitions for hover glows.
Frequently asked questions
What is the syntax of text-shadow?
text-shadow: offset-x offset-y blur-radius color. The two offsets are required; blur is optional and defaults to 0 (a sharp copy); the color defaults to the text color. Separate several shadows with commas.
How do I add multiple text shadows?
List them in one text-shadow declaration separated by commas, for example text-shadow: 0 0 5px #fff, 0 0 20px #ff00de. The first shadow is drawn on top and the following ones underneath it.
How do I make a neon text effect in CSS?
Use light-colored text on a dark background and stack several shadows with 0 offset and growing blur: a small white glow (0 0 5px #fff) close to the letters, then colored glows at 10px, 20px, 40px and 80px. The Neon preset does exactly this.
Can text-shadow create an outline?
Yes. Four to eight sharp shadows (blur 0) offset by 1 to 2px in every direction draw an outline around the letters. For thicker or perfectly even outlines, -webkit-text-stroke or paint-order with SVG text can work better.
Why does text-shadow not have spread like box-shadow?
The CSS specification defines text-shadow without spread or inset. To fake spread, repeat a shadow with the same color, or stack several sharp offset copies as the Outline preset does.
Does text-shadow affect performance or accessibility?
A few shadows are cheap to render, but dozens of large blurred layers on big blocks of text can slow scrolling on low-end devices. Shadows can also reduce legibility: keep body text shadows subtle and check color contrast between text and background.