Code · Made a little simpler

Text Stroke Generator

Preview a CSS text outline with adjustable stroke width, color and fill. Choose filled or outline-only lettering and download the stylesheet.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device
Outline type

Outline-only text uses the fill color when the browser lacks stroke support.

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Text Stroke Generator: how to use it

  1. Enter text and choose a system font, size and weight.
  2. Set a stroke width, stroke color and opaque fill. Select Outline only to see the background through each glyph’s center.
  3. Compare the outline on the preview backgrounds. Copy or download CSS and apply the tm-stroke-text class.

Limits and notes

The preview uses system fonts available on your device. The CSS export contains a class rule and the chosen font settings. It leaves the preview text out of the source file. Stroke width ranges from 0 to 20 pixels. Uses the compatibility property -webkit-text-stroke. Outline-only mode requires a visible stroke of nonzero width.

How your privacy works →

Text Stroke Generator: common questions

What happens when CSS text stroke is unsupported?

The class keeps the specified opaque fill. It applies stroke styling only inside a feature query.

Can the stroke color be translucent?

Yes. Enter four- or eight-digit hex with alpha. Outline-only lettering still needs some opacity in the stroke.

Why did a narrow letter fill in when I raised the stroke width?

The stroke straddles the edges of each glyph. A wider stroke can cover narrow openings or thin marks. Try a smaller width or compare the effect in your chosen font.

Guides