CSS Text Shadow Generator
Build a text-shadow with live preview on real text, and copy the CSS.
Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.
How to use the css text shadow generator
- Adjust the controls and watch the preview update.
- Read the generated CSS below the controls.
- Copy it into your stylesheet.
About this tool
text-shadow works like box-shadow but without spread: two offsets, a blur radius and a colour. Its most useful job is not decoration but legibility — a dark, blurred shadow behind light text keeps it readable over a photograph whose brightness you cannot control.
For that purpose keep the offsets at zero and use blur alone, which produces a halo rather than a directional drop shadow. A hard shadow with no blur, offset by one or two pixels, gives the opposite effect: a retro, printed look.
Unlike box-shadow, text-shadow is inherited, so setting it on a container applies it to all the text inside.
Common uses
- Keeping caption text readable over an image.
- Adding a subtle lift to a heading.
- Reproducing a retro hard-edged type effect.
Frequently asked questions
- Why does my text look blurry rather than shadowed?
- The shadow colour is probably too close to the text colour. A shadow should contrast with the text, not match it.
- Can I layer several text shadows?
- Yes, comma-separated. Four hard shadows at 1px in each direction is a common way to fake an outline.
- Is text-shadow inherited?
- Yes, unlike box-shadow. Setting it on a parent applies it to descendant text unless overridden.
Related tools
CSS Box Shadow Generator
Build a box-shadow with live preview and copy the CSS, including inset and spread.
CSS Button Generator
Design a button — colours, padding, radius, border and shadow — and copy the CSS.
Colour Contrast Checker
Check text and background colours against the WCAG 2.1 contrast requirements for AA and AAA.