CSS hyphenate-character Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Typography

What You’ll Learn

The hyphenate-character property lets you choose which character appears when a word breaks across lines. It is a typography tool for polishing hyphenation in narrow columns and editorial layouts.

01

Hyphenation

Line breaks.

02

auto

Default value.

03

Strings

Custom chars.

04

hyphens

Works with it.

05

Language

lang matters.

06

Inherited

Set on parent.

Introduction

The hyphenate-character property in CSS is used to specify the string that appears when words are split at the end of a line. It gives you more control over typography and helps hyphenation match your design style.

This property is especially useful in magazines, blogs, sidebars, and any layout with narrow text columns where automatic hyphenation improves readability.

Definition and Usage

Apply hyphenate-character on text containers such as paragraphs, articles, or columns. Pair it with hyphens: auto so the browser can break words automatically, and set a valid lang attribute so hyphenation rules match the language.

💡
Beginner Tip

hyphenate-character only changes the character shown at the break. You still need hyphenation enabled with the hyphens property for automatic word splitting.

📝 Syntax

The syntax for the hyphenate-character property is straightforward:

syntax.css
element {
  hyphenate-character: auto | string;
}

Here, string can be a single character like "-" or a sequence such as "—" or "–".

Basic Example

hyphenate-character-basic.css
p {
  width: 200px;
  hyphens: auto;
  hyphenate-character: "—";
}
hyphenate-character: auto; hyphenate-character: "-"; hyphenate-character: "—"; hyphenate-character: "–";

Default Value

The default value of the hyphenate-character property is auto, which means the browser selects an appropriate hyphen based on the content language’s typographic conventions.

Syntax Rules

  • Accepts the keyword auto or a quoted <string> value.
  • The property is inherited.
  • Works best with hyphens: auto on narrow text blocks.
  • Set a correct lang attribute on HTML for language-aware hyphenation.
  • Browsers may truncate very long custom strings.

⚡ Quick Reference

QuestionAnswer
Initial valueauto
Applies toAll elements
InheritedYes
AnimatableDiscrete
Common useCustom hyphen marks in hyphenated text columns

💎 Property Values

ValueDescription
autoThe browser chooses a language-appropriate hyphenation character. This is the default.
<string>A custom string used at the end of the line before a hyphenation break.
"-"Standard hyphen-minus character.
"—"Em dash for a stronger visual break.
"–"En dash for a softer alternative.

Works With the hyphens Property

hyphenate-character controls which character appears at a hyphenation break. The related hyphens property controls whether hyphenation happens:

  • hyphens: none — No automatic hyphenation. Custom characters will not appear on automatic breaks.
  • hyphens: manual — Breaks only at soft hyphens (&shy;) or explicit break points.
  • hyphens: auto — The browser may hyphenate words automatically. This is the usual pairing for hyphenate-character.
Language Requirement

Add lang="en", lang="de", or another valid language code on the element or <html> tag so the browser knows which hyphenation rules to apply.

👀 Live Preview

A narrow paragraph with hyphens: auto and hyphenate-character: "—" (resize the window to see breaks in supporting browsers):

This paragraph demonstrates custom hyphenation styling. When words break across lines in a narrow column, the browser may display an em dash instead of a standard hyphen.

Examples Gallery

Use an em dash, explicit hyphen, en dash, and compare auto against a custom character in narrow columns.

🔢 Custom Hyphen Characters

Start with the reference example — an em dash used during automatic hyphenation.

Example 1 — Em Dash Hyphenation

Replace the default hyphen with an em dash when words break at line ends.

hyphenate-em-dash.css
p {
  width: 200px;
  hyphens: auto;
  hyphenate-character: "—";
}
Try It Yourself

How It Works

With hyphens: auto, the browser may split long words. hyphenate-character: "—" tells it to show an em dash at the break.

Example 2 — Explicit Standard Hyphen

Force the classic hyphen-minus character for hyphenation breaks.

hyphenate-hyphen.css
p {
  hyphens: auto;
  hyphenate-character: "-";
}
Try It Yourself

How It Works

Setting "-" explicitly ensures a standard hyphen even when a parent or user-agent default might differ.

📈 Language & Comparison

Try alternative characters and compare browser-default hyphenation against a custom value.

Example 3 — En Dash in German Text

Use an en dash with German content, which hyphenates readily in narrow columns.

hyphenate-en-dash.css
p {
  width: 160px;
  hyphens: auto;
  hyphenate-character: "–";
}
Try It Yourself

How It Works

German text with lang="de" gives the browser strong hyphenation rules. The en dash provides a subtler break marker than an em dash.

Example 4 — auto vs Custom Character

Compare the default auto behavior against a custom em dash on the same paragraph text.

hyphenate-compare.css
.auto { hyphenate-character: auto; }
.custom { hyphenate-character: "—"; }
Try It Yourself

How It Works

auto uses language conventions. A custom string overrides that choice for a consistent design look.

♿ Accessibility

  • Hyphenation is visual — Screen readers typically read the full word, not the break character.
  • Do not over-hyphenate headings — Long headings split across lines can be harder to scan.
  • Keep language accurate — Correct lang values help both hyphenation and pronunciation.
  • Test readability — Very decorative break characters may distract in body text.
  • Provide fallbacks — Text remains readable even when hyphenation is unsupported.

🧠 How hyphenate-character Works

1

Hyphenation is enabled

You set hyphens: auto and a valid lang attribute on the text.

Setup
2

A word needs to break

In a narrow column, the browser finds a valid hyphenation point within a long word.

Line wrap
3

hyphenate-character is applied

The browser inserts your custom string or the auto language default at the break.

Rendering
=

Styled hyphenation

Line breaks look consistent with your typography while keeping text readable.

🖥 Browser Compatibility

The hyphenate-character property is supported in modern browsers including Chrome 106+, Firefox 98+, Safari 17+, and Edge 106+. It reached Baseline status in 2023.

Baseline · Modern browsers

Custom hyphen marks in today’s browsers

Current versions of Chrome, Firefox, Safari, and Edge support hyphenate-character for automatic and soft hyphens.

94% Modern browser support
Google Chrome 106+ · Desktop & Mobile
Full support
Mozilla Firefox 98+ · Desktop & Mobile
Full support
Apple Safari 17+ · macOS & iOS
Full support
Microsoft Edge 106+ · Chromium
Full support
Opera 92+ · Modern versions
Full support

Fallback behavior

When unsupported, text still wraps normally with the browser’s default hyphen character.

💻
Older browsers Ignore custom character · Default hyphenation remains
Partial
hyphenate-character property 94% supported

Bottom line: Safe to use as progressive enhancement in modern projects. Text remains readable without it.

🎉 Conclusion

The hyphenate-character property gives you fine control over how hyphenation looks in web typography. By customizing the character used at line breaks, you can keep narrow columns readable and visually consistent with your design.

For beginners, remember the pairing: enable hyphens: auto, set a valid lang attribute, then choose auto or a custom string for the break character.

💡 Best Practices

✅ Do

  • Pair with hyphens: auto for automatic breaks
  • Set a correct lang attribute on text
  • Use narrow columns to test hyphenation behavior
  • Keep custom characters subtle in body text
  • Override inherited values when needed with auto

❌ Don’t

  • Expect breaks without enabling hyphenation
  • Use very long custom strings
  • Hyphenate short labels or button text
  • Forget mobile column width changes
  • Rely on hyphenation alone for layout spacing

Key Takeaways

Knowledge Unlocked

Five things to remember about hyphenate-character

Use these points when styling hyphenated text columns.

5
Core concepts
auto 02

Default auto

Language-based.

Default
" 03

String Value

Quoted chars.

Syntax
hyphens 04

Needs hyphens

Enable auto.

Pattern
lang 05

Inherited

Set on parent.

Cascade

❓ Frequently Asked Questions

hyphenate-character sets the character or string shown at the end of a line when a word is hyphenated.
The default is auto, which lets the browser choose an appropriate hyphen based on the content language.
Automatic hyphenation usually requires hyphens: auto. Without it, line breaks may not show a custom hyphenation character.
Yes. The value is a string, so you can use characters like an em dash or en dash. Browsers may truncate very long strings.
Yes. hyphenate-character is inherited, so you can set it once on a parent container like article or p.

Practice in the Live Editor

Open the HTML editor, combine hyphens and hyphenate-character, and compare break styles in narrow columns.

HTML Editor →

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.

5 people found this page helpful