Home / Guides

Non-Breaking Hyphen (U+2011) and Soft Hyphen (U+00AD) Explained

Published 2026-10-18

Two special hyphens control what happens at the end of a line. The non-breaking hyphen looks like a normal hyphen but keeps both halves of a word together on one line. The soft hyphen is the reverse: it stays invisible until a line needs to break there. Both are useful in layout, and both cause quiet problems when they are copied into data. This guide covers how to type them and how to find and replace them.

The two characters side by side

Non-breaking hyphenSoft hyphen
UnicodeU+2011U+00AD
HTML‑ or ‑­ or ­
In a programming string"‑""­"
Visible?Always, as a hyphenOnly when a line breaks at that spot
Line breakNever allowed after itAllowed, and a hyphen is then shown
PurposeKeep a hyphenated term in one pieceSuggest where a long word may be divided

What a non-breaking hyphen is for

A normal hyphen is a legal place to break a line, so software feels free to end a line right after it. Usually that is fine. Sometimes it splits something that reads badly in two pieces:

Replacing the hyphen with U+2011 tells the layout engine that the whole term must stay on one line. On screen and in print it looks like an ordinary hyphen.

What a soft hyphen is for

A soft hyphen marks a point inside a word where it may be divided. As long as the word fits on the line, the soft hyphen shows nothing. If the word lands at the end of a line and does not fit, the line breaks at the soft hyphen and a visible hyphen appears there. It is also called an optional or discretionary hyphen.

It is useful for long words in narrow columns, for technical terms that automatic hyphenation gets wrong, and for languages with very long compound words. On web pages it is written ­, and browsers honour it by default.

How to type them

WhereNon-breaking hyphenSoft hyphen
Word on WindowsCtrl + Shift + -Ctrl + -
Word on MacCmd + Shift + -Cmd + -
Word, by menuInsert > Symbol > More Symbols, then the Special Characters tab, which lists Nonbreaking Hyphen and Optional Hyphen
Google DocsInsert > Special characters, then search by name or enter the code, 2011 or 00AD
Windows, other appsNo dependable Alt code; copy it, or pick it in Character MapAlt + 0173 on the numeric keypad
Mac, other appsOpen the Character Viewer with Ctrl + Cmd + Space and search by name
LinuxIn many apps, Ctrl + Shift + U, then the code and Enter
HTML‑­

In Word, both special hyphens are easier to work with when formatting marks are shown. The optional hyphen then appears as a hyphen with a small hook, ¬, even where no line breaks.

On the web there is a second way to keep a hyphenated term together without any special character. Wrap it in an element styled with white-space: nowrap. The text then contains only normal hyphens, which avoids the copy and paste problems described below.

Problems with the non-breaking hyphen

The non-breaking hyphen is a different character from the hyphen on the keyboard. It only looks the same. Once it is copied out of a document, that difference causes trouble:

Problems with the soft hyphen

How to find and replace them

Soft hyphens

The AI Text Cleaner removes soft hyphens when Remove invisible characters is switched on, which is the default. They are also shown in the list of characters found as U+00AD, with a count, so you can see whether your text had any.

Non-breaking hyphens

The cleaner does not change the non-breaking hyphen, and it does not include it in the list of characters found. Replace it yourself with one of the methods below.

In Microsoft Word

Open Find and Replace. The code ^~ finds a nonbreaking hyphen and ^- finds an optional hyphen. Put a normal hyphen in the Replace box for the first, and leave the box empty for the second.

In a spreadsheet

=SUBSTITUTE(SUBSTITUTE(A1, UNICHAR(8209), "-"), UNICHAR(173), "")

The inner part turns each non-breaking hyphen into a normal one, and the outer part deletes soft hyphens.

In Python

clean = text.replace("‑", "-").replace("­", "")

In a code editor

Switch on regular expressions in find and replace and search for ‑ or ­. Visual Studio Code accepts both patterns.

Other hyphen look-alikes

The non-breaking hyphen is one of several characters that can pass for the keyboard hyphen. If a hyphenated value refuses to match, one of these may be the reason:

CodeName
U+002DHyphen-minus, the keyboard key
U+2010Hyphen
U+2011Non-breaking hyphen
U+2012Figure dash
U+2013En dash
U+2212Minus sign
U+FF0DFullwidth hyphen-minus

The differences between the hyphen and the dashes are explained in em dash vs en dash vs hyphen.

When to keep them

In a document that you lay out for reading, such as a report, a book or a web page, both characters are doing their job and should stay. Replace them when the text is headed somewhere that compares or parses characters: a database, a spreadsheet, a form, a file name, source code or a search box. The same advice applies to the non-breaking space, which is the hyphen's counterpart for gaps between words.

Quick answers

What is the difference between a non-breaking hyphen and a soft hyphen? A non-breaking hyphen is always visible and never lets a line break after it. A soft hyphen is invisible and shows up only when a line breaks at its position.

How do I type a non-breaking hyphen in Word? Press Ctrl plus Shift plus the hyphen key on Windows, or Cmd plus Shift plus the hyphen key on a Mac.

Why does my search not find a word that has a hyphen in it? The hyphen in the text may be a different character, such as a non-breaking hyphen or an en dash, or the word may contain an invisible soft hyphen.

Try it on your own text. Paste text to remove soft hyphens and see which other hidden characters came with it. Open the AI Text Cleaner

Related guides