CSS Text Shadow Generator

Adjust text-shadow sliders, choose an effect example and change the preview background.

On-device No sign-up Free to use

Generate text shadow controls

?

Shown in the preview only. It is never part of the generated CSS.

?

Colour of the panel behind the sample text. It is shown in the preview only and never appears in the generated CSS, so you can check a shadow against the page colour you really use.

?

Adds four hard shadows around the text using the same color. Check readability against your actual background.

?

Optional. One shadow per line as x y blur #hex, for example 0 4px 12px #1f2937. Up to eight shadows in total, counting the first one and any outline.

Processed in your browser. Your inputs stay on this device.

Showing an example. Change the fields, then use generate text shadow to update it.

Result

Showing an example.

Add a 2-pixel right/down black shadow with a 4-pixel blur.

Generated 1 text shadow: 2px 2px 4px #000000. Copy the CSS below.

Loading the tool. Your result will appear here.

https://usefreetools.net/css-text-shadow-generator · 20 November 2026

Was this helpful?

How to use CSS Text Shadow Generator

  1. Set the first shadow’s offsets, blur and color, or apply Neon, 3D, Retro, Outline or Glow and adjust its values.
  2. Enter sample text and a preview background. Compare weights 400, 600 and 800; Sample weight marks one of them for review.
  3. Optionally add a 1px outline or extra shadow rows as x y blur #hex. The first layer, four outline shadows and extra rows share the eight-shadow limit.
  4. Select Generate text shadow and copy the CSS. Replace .headline with your selector and check it with the real font, text color and background.

Example: CSS Text Shadow Generator

Add a 2-pixel right/down black shadow with a 4-pixel blur.

You add
Sample text: Free Tools; Sample weight: 600; Horizontal offset (px): 2; Vertical offset (px): 2; Blur radius (px): 4; Shadow color: #000000; Preview background: #ffffff; Add a 1px outline: false
You get
Generated 1 text shadow: 2px 2px 4px #000000. Copy the CSS below.

Options

Offsets, blur and color
Offsets accept -50 to 50 pixels; negative values move left or up. Blur accepts 0 to 100 pixels, with zero giving a hard edge. Each layer uses an opaque hex color.
Preview text and background
The preview shows the first 60 sample characters across weights 400, 600 and 800. Sample weight marks a selected row, and Preview background changes only the sample panel. None of these settings is exported as a font, text or background declaration.
Outline and extra layers
The outline checkbox adds four hard 1px shadows in the first layer’s color. Enter other layers one per line as x y blur #hex, with up to 4,096 characters. Eight shadows total allows seven extra rows without an outline, or three with the outline.

Supported inputs and limits

  • Up to eight shadows in total, including the first shadow, extra rows and four outline shadows.
  • Offsets range from -50 to 50 px and blur from 0 to 100 px.
  • With the outline on, sample text color adapts to the shadow; copied CSS contains only shadows.
  • Preview fonts and colors do not establish readability on your actual page.
  • Neon, 3D, Retro, Outline and Glow buttons fill supported shadow settings.
More details

Preview background affects the sample only and is excluded from generated CSS.

Where your input is processed

This tool does not upload your inputs. See the limits for anything saved on your device.

Keep the letters readable

A shadow can make an edge more visible, but it does not guarantee readable text. Test the actual text color, background, size and font separately before adding the rule to a page.

Questions about CSS Text Shadow Generator

What does each number in a shadow row mean?

The first moves the shadow horizontally, the second vertically and the third sets blur, all in pixels. A negative offset moves left or up.

Does the outline use a font stroke?

No. It places shadows around the text. Review corners and thin letters in the font you will use.

Why does the preview differ on another computer?

The sample uses available local fonts. Letter shapes and font rendering can differ between systems.

Page updated · Project managed by Tony Hines · Report a problem with CSS Text Shadow Generator