Outlined Hero Heading
A bold text outline can make a large hero heading stand out without using a solid fill color.
Free CSS Typography Tool
Create outlined CSS text effects visually. Adjust stroke width, stroke color, text color, font size, font weight and shadow settings, then copy clean CSS code.
This CSS Text Stroke Generator is a free visual tool for creating outlined
typography with the -webkit-text-stroke property. It lets you control
stroke width, outline color, text fill, font size, font weight and optional shadow
effects.
Text stroke effects are useful for hero headings, posters, logos, gaming interfaces, event pages and decorative typography. The generator produces copy-ready CSS that can be applied to normal HTML text.
A bold text outline can make a large hero heading stand out without using a solid fill color.
Transparent text fill combined with a visible stroke creates clean outlined typography for banners and modern landing pages.
Thick strokes, strong colors and offset shadows can recreate retro poster and vintage advertising styles.
Heavy text outlines improve readability and add visual impact to game titles, streaming overlays and esports graphics.
A restrained stroke can help a wordmark remain visible over colored backgrounds, images or gradients.
CSS text stroke adds an outline around each text glyph. The most widely used property
is -webkit-text-stroke, which accepts a width and a color.
.outlined-text {
-webkit-text-stroke: 2px #e74c3c;
color: #2c3e50;
}
Stroke width controls the thickness of the outline. Small values work well for regular headings, while larger values are better suited to oversized display text.
.thin-stroke {
-webkit-text-stroke: 1px #111827;
}
.thick-stroke {
-webkit-text-stroke: 4px #111827;
}
The stroke color should contrast with both the text fill and the background. Strong contrast helps preserve the letter shapes and improves readability.
.heading {
color: #ffffff;
-webkit-text-stroke: 2px #111827;
}
Setting the text color to transparent creates pure outlined typography. This style works best on large headings with a thick font weight.
.outline-only {
color: transparent;
-webkit-text-stroke: 2px #2563eb;
}
Text stroke defines the outline, while text-shadow can add depth,
separation or a retro offset effect.
.stroke-shadow {
color: #ffffff;
-webkit-text-stroke: 2px #111827;
text-shadow: 4px 4px 0 #e74c3c;
}
Multiple shadows can create layered, 3D or chromatic effects behind outlined text.
.layered-title {
color: #ffffff;
-webkit-text-stroke: 2px #111827;
text-shadow:
3px 3px 0 #ef4444,
6px 6px 0 #2563eb;
}
Text stroke generally works better with medium or heavy font weights. Thin fonts may lose clarity when a thick outline is applied.
The -webkit-text-stroke property is supported by modern Chromium
browsers, Safari and current Firefox versions. Since it remains prefixed in common
use, include a normal text color as a fallback.
Outlined text should remain readable without relying entirely on the stroke. Avoid thin outline-only text at small sizes and make sure the text remains distinct from the background.
Use the -webkit-text-stroke property with a width and color, such as
-webkit-text-stroke: 2px #000000;.
Yes. Set color: transparent and apply a visible text stroke.
Yes. Text stroke creates the outline, while text shadow can add depth, glow or an offset effect.
Medium, bold and extra-bold fonts usually work best because they preserve clear letter shapes when an outline is applied.
Yes. Modern browsers broadly support -webkit-text-stroke, although the
prefixed property remains the most commonly used syntax.
It can be, provided the text remains readable and has enough contrast. Avoid using thin outline-only text for small sizes or important body content.
Yes. Stroke width and color can be animated, but large changes may reduce readability and should be used carefully.