Non-Breaking Space & Invisible Characters Explained

Igor R.

July 4, 2026

Short answer: A non-breaking space ( , U+00A0) glues two things onto the same line — “10 km”, “Mr. Smith” — so they never wrap apart. Type it with Ctrl + Shift + Space in Word or Google Docs, Option + Space on Mac, or Alt + 0160 on Windows.

Copied!

What is a non-breaking space?

A regular space lets a line wrap between words. A non-breaking space glues them together so they never split across two lines. Reach for it when a break would look wrong:

  • Number + unit: 10 km, 25 MB, $5, 100 %
  • Names & titles: Mr. Smith, J. R. R. Tolkien
  • Labels & references: Figure 1, Chapter 3, page 12

One caveat: don’t use   for indentation or spacing on the web — that’s what CSS is for. Multiple regular spaces collapse to one in HTML, but stacking   is a hack that hurts layout and accessibility.

How to type a non-breaking space

WhereHow
Word / Google DocsCtrl + Shift + Space
Mac (most apps)Option + Space
Windows (Alt code)Alt + 0160 (numeric keypad)
HTML  (or  )
Linux (IBus enabled)Ctrl + Shift + U, type 00a0, then Enter

On iPhone and Android there’s no dedicated key — the simplest route is to copy one from the box above and paste it where you need it.

A non-breaking space shown as a small circle in Word's formatting marks

The non-breaking hyphen (a useful cousin)

Same idea, different character. A non-breaking hyphen (U+2011) keeps hyphenated terms like “F‑16” or “e‑mail” from splitting at the hyphen. In Word: Ctrl + Shift + Hyphen. Don’t confuse it with the soft hyphen below, which stays invisible until a word actually breaks.

Other space characters

Not every “wide” space is a non-breaking space. These fixed-width spaces show up in typeset text, pasted PDFs, and multilingual documents:

SpaceUnicodeNote
Narrow no-breakU+202FFrench espace fine insécable — before ; ? ! (the colon takes a full NBSP)
Thin spaceU+2009tight spacing
En space / Em spaceU+2002 / U+2003fixed widths
Figure spaceU+2007width of a digit — aligns numbers

Invisible characters (zero width)

These are real characters with no visible width at all:

  • Zero-width space (U+200B): allows a line break with no visible gap.
  • Zero-width joiner / non-joiner (U+200D / U+200C): used in emoji sequences and scripts like Arabic and Hindi.
  • Word joiner (U+2060) and BOM / zero-width no-break space (U+FEFF): the BOM often appears at the very start of a file.
  • Soft hyphen (U+00AD): invisible unless the word breaks at the end of a line.
  • Left-to-right / right-to-left marks (U+200E / U+200F): control text direction.

Why invisible characters cause trouble

You can’t see them, so they’re maddening to debug:

  • Code errors: an NBSP or zero-width character sitting where a normal space should be throws an “unexpected token” you’ll stare right past.
  • Search & matching fail: a name with a hidden character won’t match the same name without it.
  • Data & forms break: CSV imports, passwords, and validation choke on stray invisibles — usually pasted in from the web, a PDF, or Word.

The Excel / Google Sheets gotcha

If a number pasted from the web refuses to add up, or =TRIM() won’t clean a cell, a non-breaking space is usually the culprit. TRIM only removes the regular space (CHAR(32)) — it ignores the non-breaking space (CHAR(160)). Strip it with:

=SUBSTITUTE(A1, CHAR(160), " ")

Then wrap that in TRIM if you also have normal padding: =TRIM(SUBSTITUTE(A1, CHAR(160), " ")). The same CHAR(160) trick works identically in Google Sheets.

How to find invisible characters

  • Word: press Ctrl + Shift + 8 (Ctrl + *) to show formatting marks; a non-breaking space appears as a small raised circle.
  • Code editors: turn on render whitespace; extensions can flag NBSP and zero-width characters right in the gutter.
  • Identify one: paste a suspicious character into the Symbol Identifier — it reports the exact code point, even for invisibles.

How to remove them

  • Find & Replace by code point: in a code editor, search for \u00A0, \u200B, or \uFEFF and replace with a normal space or nothing.
  • Catch them all with regex: [\u00A0\u200B-\u200F\u2028\u2029\uFEFF] matches the most common troublemakers — NBSP, the zero-width and directional marks, line/paragraph separators, and the BOM — in one pass.
  • In Word: Find & Replace the special “non-breaking space” (^s) with a normal space.
  • Retype short affected text — often faster than hunting a single character.

Non-breaking space vs zero-width space

They’re opposites:

Width?Line break?Symptom when it’s wrong
Non-breaking space (U+00A0)YesPrevents oneA gap you can’t delete; words won’t wrap
Zero-width space (U+200B)NoAllows oneA word splitting oddly; strings won’t match

Knowing which you have explains the symptom instantly.

Troubleshooting

ProblemFix
My code breaks on a line that looks fineAn NBSP or zero-width character is hiding in it — render whitespace and replace it.
Two strings look identical but won’t matchOne has an invisible character; paste both into the Symbol Identifier to compare code points.
There’s a gap I can’t deleteIt may be a fixed-width space (en/em) or an NBSP — show formatting marks to see it.
My spreadsheet numbers won’t calculateAlmost certainly an NBSP — clean the column with =SUBSTITUTE(A1, CHAR(160), " ").

What is a non-breaking space?

A non-breaking space (NBSP) is a space character that prevents a line break between the words or characters it joins, keeping them on the same line. In HTML it is written as  , and its Unicode code point is U+00A0.

How do I type a non-breaking space?

You can insert a non-breaking space using these methods:
Microsoft Word or Google Docs: Ctrl + Shift + Space
Mac: Option + Space
Windows: Alt + 0160 (numeric keypad)
HTML:  

When should I use a non-breaking space?

Use a non-breaking space whenever two items should stay together on the same line, for example:
A number and its unit: 10 km
A title and a name: Mr. Smith
Labels such as Figure 1 or Table 2

What is a zero-width space or zero-width character?

A zero-width space is an invisible Unicode character, such as U+200B, that has no visible width. It can allow a line break without displaying a space and may unintentionally affect code, searches, or data processing even though it cannot be seen.

How do I find and remove invisible characters?

In Microsoft Word, enable formatting marks to reveal hidden characters. In a code editor, turn on render whitespace or invisible character display. You can then use Find and Replace with Unicode code points such as U+00A0, U+200B, or U+FEFF. If you’re unsure which invisible character you have, paste it into a Unicode or symbol identification tool to determine its code point.

What is the difference between a non-breaking space and a regular space?

A regular space (U+0020) allows text to wrap onto the next line and may collapse with adjacent spaces in some contexts, such as HTML.
A non-breaking space (U+00A0) prevents a line break between the surrounding text and does not collapse, making it useful for keeping related words or numbers together.

Recap

A non-breaking space ( ) keeps words on one line — Ctrl + Shift + Space in Word, Option + Space on Mac, Alt + 0160 on Windows. Invisible characters (zero-width space, BOM, soft hyphen) have no width but quietly break code, search, and spreadsheets. Reveal them with formatting marks or render-whitespace, and remove them with Find & Replace or a quick regex.


Written by Igor R. Tested on Windows 11, macOS, and in Microsoft 365, Google Docs and VS Code. Last updated June 2026. Code points follow the Unicode Standard.

Leave a Comment