In Notepad++, the NBSP
stands for Non-Breaking Space, which is a special whitespace character.
-
Unicode code point: U+00A0
-
HTML entity:
-
Unlike a normal space (U+0020
), a non-breaking space prevents automatic line breaks at its position.
-
In Notepad++, when you enable View → Show Symbol → Show All Characters, it is usually displayed as NBSP
(or sometimes as a small dot or highlighted space depending on your settings).
So in short:
👉 NBSP
= non-breaking space character (U+00A0)
Would you like me to also show you how to search and replace all NBSPs with normal spaces in Notepad++?
ChatGPT said:
Perfect 👍 Here’s how you can find and replace NBSP (non-breaking space, U+00A0) with a normal space in Notepad++:
Method 1: Directly Copy & Replace
-
Copy an actual NBSP
from your text (the one showing as NBSP
in Notepad++).
-
Open Search → Replace… (Ctrl + H
).
-
In Find what, paste the NBSP character.
-
In Replace with, press the spacebar once (normal space).
-
Click Replace All.
Method 2: Use Extended Search with \xA0
-
Open Search → Replace… (Ctrl + H
).
-
At the bottom, select Search Mode → Extended (\n, \r, \t, \0, \x...).
-
In Find what, enter:
(this is the hex code for NBSP).
-
In Replace with, enter a normal space.
-
Click Replace All.
Method 3: Using Regex (if mixed whitespace issues)
-
Open Search → Replace….
-
Select Search Mode → Regular expression.
-
In Find what, enter:
-
In Replace with, enter a normal space.
-
Replace all.
👉 Usually, Method 2 (\xA0
) is the easiest.
What's the difference between an NBSP and a normal space? How was NBSPs introduced in a text file?
ChatGPT said:
Great question 👌 Let’s break it down:
🔹 Difference Between NBSP and Normal Space
Feature | Normal Space (U+0020 ) | Non-Breaking Space NBSP (U+00A0 ) |
Appearance |
Looks like a space |
Looks the same as a space |
Line breaking |
Allows text to wrap/line break |
Prevents line breaking at that position |
Width |
Standard width, depends on font |
Usually the same width as normal space (but can differ in some fonts) |
Encoding |
ASCII-compatible (0x20 in most encodings) |
Unicode only (0xA0 in Latin-1, UTF-8: 0xC2 0xA0 ) |
Display in Notepad++ |
Shows as a blank (or dot if symbols visible) |
Shows as NBSP when symbols visible |
👉 So they look identical, but NBSP carries a special “don’t break here” rule.
🔹 How NBSPs Get Into a Text File
NBSPs usually appear unintentionally. Common sources:
-
Copy-paste from websites or documents
-
In HTML,
is used to insert extra spaces (e.g., for indentation or alignment).
-
When you copy text from a webpage, those
s turn into Unicode U+00A0
.
-
Word processors (MS Word, Google Docs, etc.)
-
PDF or scanned documents
-
Keyboard shortcuts
✅ So, in short:
-
Normal space = regular blank, breaks naturally.
-
NBSP = looks the same, but glues words together.
-
They sneak into text mostly via copy-paste from HTML, Word, or PDF.