Skip to content
Test versionSearch

Developer tools

Single CSS text shadow

Generate one CSS text-shadow from horizontal and vertical offsets, blur up to 100 px and a hex colour with separate alpha, shown on sample text.

How it worksFAQRelated tools

Content reviewed:

The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. Nothing is saved or sent automatically.

Creates one text shadow; text shadows have no spread value. A shadow does not fix low contrast, so check the text colour against its background separately. The preview depends on your browser, so check the result on your own page. Copy the code or download it as TXT or CSV; JSON and printable HTML files also keep your inputs. Nothing is saved or sent automatically and entered addresses are never opened.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

Your values are checked against the allowed ranges and written as a single CSS rule. Creates one text shadow; text shadows have no spread value. A shadow does not fix low contrast, so check the text colour against its background separately. The preview depends on your browser, so check the result on your own page. Copy the code or download it as TXT or CSV; JSON and printable HTML files also keep your inputs. Nothing is saved or sent automatically and entered addresses are never opened.

Worked example

With these example values the calculator gives the result below. You can change any value in the form above.

Inputs

Horizontal offset: ±100px
4
Vertical offset: ±100px
8
Blur: 0–100px
12
Opaque hex colour
#2979FF
Alpha: 0–1
0.5

Result

CSS text shadow
text-shadow: 4px 8px 12px rgba(41, 121, 255, 0.5);

Frequently asked questions

How do I create a CSS text shadow?

The single CSS text shadow generator takes a horizontal and vertical offset, a blur radius, a hex colour and a separate alpha value and writes one text-shadow declaration inside a CSS class.

What does the text shadow example produce?

With x 4, y 8, blur 12, colour #2979FF and alpha 0.5, the generator writes text-shadow: 4px 8px 12px rgba(41, 121, 255, 0.5);

Which values are allowed for a CSS text shadow?

Offsets range from −100 px to 100 px and the blur from 0 to 100 px. The colour is an opaque hex base with a separate alpha value.

Can I create several text shadow layers or a spread?

No. The generator creates a single text shadow only, without spread or multiple layers.

What class name can I use for the text shadow?

The class name has 1 to 64 ASCII characters, starting with a letter or underscore, followed by letters, digits, underscores or hyphens. It is entered without the dot.

Will the text shadow look the same in every browser?

The CSS values are exact, but browser rendering and layout can differ. The preview gives no contrast, accessibility or device guarantee.