CSS hyphenate-character Property

Beginner
4 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The hyphenate-character property sets the character or string shown at the end of a line before a hyphenation break. It applies to automatic breaks and to soft hyphens (­).

It applies to all elements and is inherited. The initial value is auto. To see hyphenation, pair it with hyphens: auto (and a language) or place soft hyphens in the text.

Legacy prefix.

Older WebKit engines used -webkit-hyphenate-character. Prefer the unprefixed property in new CSS.

CSS Syntax

syntax.css
hyphenate-character: auto | <string> | initial | inherit;

Property Values

ValueDescriptionTry it
autoDefault. Browser picks a hyphen for the languageTry it
<string>Custom mark, such as "=" or "—"Try it
"—"Example: em dash as the hyphenation markTry it
""Empty string — no visible hyphen markTry it
initialResets to autoTry it
inheritTakes the parent’s hyphenate-characterTry it

How to Use hyphenate-character

Enable hyphenation first, then choose the mark that appears at the break.

  1. Set a language on the text (lang="en").
  2. Turn on hyphenation with hyphens: auto, or insert soft hyphens.
  3. Narrow the box so a long word must wrap.
  4. Set hyphenate-character to auto or a custom string.
PieceRequired?Role
Hyphenation breakYes (to see it)hyphens: auto or soft hyphens
langRecommendedHelps automatic hyphenation dictionaries
hyphenate-characterYesauto or a quoted string

Live Preview

A narrow box with soft hyphens. Switch the mark shown at each break.

Soft hyphens make the breaks reliable. hyphens: auto is also set on the sample.

Word

Super­cali­fragi­listic­expiali­docious

hyphenate-character: "="

CSS Examples

Each snippet focuses on hyphenate-character. Soft hyphens keep breaks predictable. Use Try It Yourself for a live editor.

Example 1 — Custom Equals Mark

Show = at each hyphenation break.

CSS
<style>
  p {
    hyphens: auto;
    hyphenate-character: "=";
  }
</style>

<p lang="en">Super&shy;cali&shy;fragi&shy;listic</p>
Try It Yourself

How It Works

  1. Enable breaks. hyphens: auto plus soft hyphens create wrap points.
  2. Set the string. hyphenate-character: "=" replaces the normal hyphen mark.
  3. Narrow layout. A short line width forces the word to break.
  4. Same for soft hyphens. Soft breaks also show this character.

Example 2 — Default Auto

Let the browser choose the hyphen for the language.

CSS
<style>
  p {
    hyphens: auto;
    hyphenate-character: auto;
  }
</style>

<p lang="en">Super&shy;cali&shy;fragi&shy;listic</p>
Try It Yourself

How It Works

  1. Use auto. This is the initial value.
  2. Language matters. lang="en" guides the default mark and hyphenation rules.
  3. Usual hyphen. Most Latin languages show a standard hyphen-minus.
  4. Override when needed. Switch to a string only for a custom look.

Example 3 — Em Dash Mark

Use an em dash as the visible hyphenation character.

CSS
<style>
  p {
    hyphens: auto;
    hyphenate-character: "\2014";
  }
</style>

<p lang="en">Super&shy;cali&shy;fragi&shy;listic</p>
Try It Yourself

How It Works

  1. Pass a string. "\2014" is the Unicode em dash (—).
  2. Shown at the break. The mark appears at the end of the line before the wrap.
  3. Keep it short. Long strings may be truncated by the user agent.
  4. Check readability. Unusual marks can confuse readers — use them on purpose.

Edge Cases & Pitfalls

If you never see the character, hyphenation never fired.

hyphens

Needs a real hyphenation break

Without hyphens: auto or soft hyphens, nothing is hyphenated, so the character never appears.

lang

Language helps automatic breaks

Set lang on the element or an ancestor so the browser can use the right hyphenation rules.

width

Wide lines may never wrap

If the box is wide enough for the whole word, there is no break and no hyphen mark.

string

Long strings may be truncated

User agents can shorten oversized <string> values. Keep the mark short.

prefix

Old code may use -webkit-

Legacy stylesheets may still list -webkit-hyphenate-character. New CSS can use the standard name alone.

Browser Support

hyphenate-character is a browser typography property. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

hyphenate-character

Chrome 106+, Firefox 98+, Safari 17+, Edge 106+, Opera 92+. Widely available since September 2023.

95% Modern browsers
Google Chrome 106+
Full
Mozilla Firefox 98+
Full
Apple Safari 17+
Full
Microsoft Edge 106+
Full
Opera 92+
Full
Samsung Internet Supported (Chromium)
Full
Internet Explorer No
None
hyphenate-character Widely supported

Bottom line: Safe in current browsers. Remember that hyphenation itself also depends on language support and layout width.

Key Takeaways

  • Role: choose the mark shown before a hyphenation line break.
  • Values: auto or any CSS <string>.
  • Initial value: auto. Inherited.
  • Pair with: hyphens: auto (and lang) or soft hyphens.

One line: hyphenate-character picks what appears at the end of a hyphenated line — default hyphen or your string.

Frequently Asked Questions

It sets the character or string shown at the end of a line before a hyphenation break. Both automatic hyphens and soft hyphens use this value.
The initial value is auto. The browser picks a suitable hyphen based on the content language.
You need a hyphenation break to see it. Use hyphens: auto and a language, or insert soft hyphens (&shy;) in the word.
Yes. The value is a string, so you can use '=', an em dash, or a short sequence. Very long strings may be truncated by the browser.
Yes. You can set it on a parent such as article or p and child text inherits it.
It is Baseline: Chrome 106+, Firefox 98+, Safari 17+, Edge 106+. Older WebKit browsers used -webkit-hyphenate-character. It is a browser typography property, not a Node.js feature.

Next: hyphens

Learn how to enable or disable automatic hyphenation.

hyphens tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful