Text Shadow Generator
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free CSS text shadow generator. Set the offset, blur, color and opacity with a live preview, start from glow or drop presets, and copy the code.
DeepRit
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the text shadow generator
- Type preview text, such as your headline or logo text.
- Start from a style (soft drop, hard drop, neon glow, lifted or letterpress), or set the shadow yourself.
- Adjust the sliders: horizontal and vertical offset, blur, opacity and font size.
- Pick colours for the shadow, the text and the background.
- Copy the CSS.
The text shadow generator shows the result live and writes the text-shadow declaration, with the shadow colour converted to rgba for the opacity you chose, plus the text colour.
The text-shadow syntax
text-shadow: offset-x offset-y blur-radius color;
- offset-x: how far the shadow moves right (negative moves it left).
- offset-y: how far it moves down (negative moves it up).
- blur-radius: how soft the edge is. 0 is a sharp copy of the text; larger values spread and soften it.
- color: usually with transparency, such as
rgba(0, 0, 0, 0.4).
For example, a soft drop shadow:
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.35);
Unlike box-shadow, text-shadow has no spread value and no inset option.
Popular text shadow effects
Soft drop shadow (2px 2px 4px, 35% black): lifts text slightly off the background. Subtle and readable.
Hard drop shadow (4px 4px 0, solid): a retro, poster-style offset copy. Great for bold display headings.
Neon glow (0 0 16px, bright colour, on a dark background): no offset, just blur, so the colour glows around the letters. Stacking two or three glows of increasing blur makes it brighter:
text-shadow: 0 0 4px #00c2ff, 0 0 12px #00c2ff, 0 0 24px #00c2ff;
Lifted (0 6px 14px, 30% black): a soft shadow below the text, like it's floating.
Letterpress (0 1px 0, light colour, on a mid-tone background with darker text): looks pressed into the surface.
Outline (several shadows with no blur in every direction): fakes a stroke around text. For a true outline, -webkit-text-stroke is cleaner in modern browsers.
Multiple shadows
You can stack shadows by separating them with commas. The first is drawn on top:
text-shadow: 1px 1px 0 #fff, 3px 3px 0 #c0392b;
The text shadow generator creates one layer, which covers most needs; copy its value and add more layers by hand for glows and 3D effects.
Readability and accessibility
Text shadows can help or hurt readability:
- Text over photos: a soft dark shadow behind light text helps it stand out on busy images. A semi-transparent overlay behind the text is often even better.
- Body text: avoid shadows on paragraphs. They make small text blurry and tiring to read.
- Contrast: a shadow doesn't fix low contrast between text and background. Check your colours with the color contrast checker.
- Glows: keep them for short headings and logos, not anything people must read at length.
Performance
text-shadow is cheap to draw for headings. Very large blur values on lots of text, or animating shadows, can slow down rendering on older phones. Keep heavy effects to a few elements.
Text shadow vs box shadow
text-shadow follows the shape of the letters. box-shadow follows the element's rectangular box (including rounded corners). For cards, buttons and panels, use the box shadow generator. For frosted panels behind text, try the glassmorphism generator.
Colours
Shadows look most natural when they're a darker, transparent version of the background colour rather than pure black. On a warm beige background, a deep brown shadow at 30% looks softer than black. The text shadow generator lets you pick any colour and opacity; for exact colour codes, the HEX to RGB converter helps.
Tips
- Smaller is usually better. 1 to 3 px offsets and a little blur look polished; big offsets look dated unless the style is intentional.
- Match the light direction. If other shadows on the page fall down and right, make text shadows do the same.
- Scale with font size. A shadow that suits 64 px text may be too strong at 20 px; use em units (0.05em) if you want it to scale.
- Test on mobile, where screens are smaller and sharper.
Privacy and accuracy
Everything happens in your browser. Nothing is uploaded. The text shadow generator writes standard CSS that matches the preview exactly, with no AI involved. Designers, developers and marketers use it free on any device.
Text shadows in email and on social images
Many email clients ignore CSS text-shadow, so don't rely on it for readability in newsletters: use strong colour contrast instead. For social media images, the shadow has to be part of the picture itself. The add text to image tool draws text with an outline and a background band directly onto a photo.
Long shadows and 3D text
A long shadow is a flat-design effect where the shadow stretches diagonally from the letters. It's made by stacking many shadows, each one pixel further away:
text-shadow: 1px 1px 0 #c0392b, 2px 2px 0 #c0392b, 3px 3px 0 #c0392b, 4px 4px 0 #c0392b;
A 3D look uses a similar stack in gradually darker colours. Use the text shadow generator to choose the colour and offset of one layer, then repeat it.
Dark mode
A dark shadow that looks soft on a light background can vanish on a dark one. In dark themes, lighter or coloured glows often work better. You can switch shadows with a media query:
@media (prefers-color-scheme: dark) { h1 { text-shadow: 0 0 12px rgba(255, 255, 255, 0.25); } }
Use the background colour picker in the text shadow generator to preview both themes.
Units
The text shadow generator writes pixel values, which is what most designers use. If you want the shadow to scale with font size, convert to em: a 3px offset on 48px text is 0.0625em.
Quick reference
- offset-x / offset-y: how far the shadow moves.
- blur-radius: how soft it is (0 is sharp).
- color: usually rgba with transparency.
- Multiple shadows: comma-separated; the first is on top.
- text-shadow vs box-shadow: letters vs the element's box.
Ready-made values
| Effect | text-shadow |
|---|---|
| Subtle | 0 1px 2px rgba(0, 0, 0, 0.25) |
| Soft drop | 2px 2px 4px rgba(0, 0, 0, 0.35) |
| Hard drop | 4px 4px 0 #000000 |
| Lifted | 0 6px 14px rgba(0, 0, 0, 0.3) |
| Glow | 0 0 16px #00c2ff |
Load any of these into the text shadow generator by setting the same numbers, then fine-tune.
Checking your design
Before publishing, look at your headline on a phone in daylight, at different screen brightness levels, and in dark mode if your site supports it. A shadow that looks subtle on a bright monitor can disappear on a dim phone, or look heavy on a high-contrast display. If the text is hard to read anywhere, increase the colour contrast rather than the shadow. When you're happy, copy the final values from the text shadow generator into your stylesheet and reuse them for every heading of the same style.
Fonts matter too
Text shadows look different on thin and heavy fonts. Bold, chunky headings handle stronger shadows well, while thin, elegant fonts can look smudged with any blur. If your font is light, use a very small offset with little or no blur, or rely on colour contrast instead. Try your actual font in your page while you fine-tune the values from the text shadow generator, since the preview uses a bold sans-serif.
A worked example
A café is designing a website hero: a photo of coffee with the headline "Freshly roasted, every morning" in white. Over the darker parts of the photo it reads well, but over the light froth it disappears.
The designer opens the text shadow generator, types the headline, chooses "Soft drop" and adjusts it to 0 horizontal, 2 px vertical, 8 px blur and 45% black. The CSS is:
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
color: #ffffff;
The headline is now readable over the whole photo. For the café's evening events page, she makes a neon sign heading with the "Neon glow" preset on a dark background.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.
Frequently asked questions
How do I add a shadow to text in CSS?
Use text-shadow: x y blur color;, such as text-shadow: 2px 2px 4px rgba(0,0,0,0.35);. The text shadow generator writes it for you.
How do I make glowing text?
Use a shadow with no offset and some blur in a bright colour: text-shadow: 0 0 16px #00c2ff;, on a dark background.
Can I use more than one text shadow?
Yes. Separate them with commas; the first is drawn on top.
Does text-shadow have spread or inset?
No. Those are only available on box-shadow.
Are text shadows bad for accessibility?
Not if used carefully on headings. Avoid them on body text, and make sure the text has enough contrast without the shadow.
Is the text shadow generator free?
Yes, completely free, with no sign-up.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.