Home / Guides

What Is a Non-Breaking Space (NBSP)? How to Find and Replace It

Published 2026-09-30

A non-breaking space looks exactly like a normal space, but it behaves differently. It is one of the most common reasons that copied text will not match, will not wrap, or throws a strange error in code. Here is what it is and how to deal with it.

What is a non-breaking space?

A non-breaking space (NBSP) is the Unicode character U+00A0. It has two properties that a normal space does not:

In HTML it is written  . In programming languages it is usually "\u00a0" or "\xa0".

What is it used for?

NBSP has real, good uses in typography:

Why does it cause trouble?

The trouble starts when an NBSP ends up where a normal space was expected. Common symptoms:

Other unusual spaces

NBSP has several cousins. All of them look like a gap but are different characters:

CodeName
U+00A0No-break space
U+202FNarrow no-break space
U+2009Thin space
U+2003Em space
U+3000Ideographic space (full-width)

How to type a non-breaking space

How to find and replace non-breaking spaces

In the AI Text Cleaner

Paste your text. Any NBSP appears in the Characters found list as U+00A0. Keep Replace unusual spaces switched on and every one becomes a normal space.

In Microsoft Word

Open Find and Replace (Ctrl+H on Windows, Cmd+Shift+H on Mac). In the Find box, type ^s, which stands for a non-breaking space, and put a normal space in the Replace box.

In a spreadsheet

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

Wrap it in TRIM if you also want to remove extra spaces afterwards:

=TRIM(SUBSTITUTE(A1, UNICHAR(160), " "))

In Python

clean = text.replace("\u00a0", " ")

In JavaScript

const clean = text.replace(/\u00a0/g, " ");

In Google Docs

Use Find and replace with Match using regular expressions ticked, search for \x{00A0} and replace it with a normal space.

When you should keep it

If you typeset a document on purpose, for instance a report where every number stays with its unit, those non-breaking spaces are doing their job. Replace them only in text that you will paste into code, a data file, a form or a system that compares strings.

Quick answers

What does nbsp stand for? Non-breaking space.

Is nbsp the same as a tab or several spaces? No. It is a single character that looks like one space but cannot wrap.

Why does copied text from a web page contain nbsp? Web pages often use   for spacing, and the browser copies it as an NBSP character.

Can I just use find and replace with a normal space? Not if you type a normal space in the Find box; it will not match an NBSP. You need to search for the NBSP itself, as shown above.

Try it on your own text. Unusual spaces are replaced automatically, and the list shows how many it found. Open the AI Text Cleaner

Related guides