A non-breaking space looks exactly like a normal space but is a different character, and that difference causes a surprising amount of trouble. Here is how to clear them out.
What a non-breaking space is
A non-breaking space (Unicode U+00A0) is a space that prevents a line break at that point. It is used to keep things together, like a number and its unit. The problem is that it looks identical to a regular space (U+0020) on screen, so you cannot tell them apart by eye, but software treats them as completely different characters.
There is a whole family of these: the narrow no-break space, the ideographic space, the various typographic spaces. They all masquerade as ordinary spacing.
Why they cause problems
- Odd gaps and spacing that you cannot fix because the character is not a normal space.
- Broken code, where a non-breaking space instead of a regular one causes errors that are invisible in the editor.
- Failed search and find-and-replace, because searching for a normal space does not match a non-breaking one.
- Data corruption, where a non-breaking space inside a CSV field or key changes the value.
They are extremely common in text pasted from web pages, PDFs, and AI tools.
The quick fix: a cleaner
Paste your text into a tool that normalizes spaces and it converts the non-breaking space and its exotic relatives into regular spaces in one pass. textscrubr does this and then collapses any resulting double spaces, so you end up with clean, ordinary spacing. It also strips the truly invisible characters at the same time, since they usually travel together.
Find and replace
In an editor you can target it directly:
- Copy a non-breaking space from your text, or use your editor's option to search by character code (U+00A0).
- Replace it with a regular space.
If your editor supports it, enabling "show invisibles" or "show whitespace" can reveal where the non-breaking spaces are, since some editors display them with a distinct marker.
Prevent them coming back
Non-breaking spaces re-enter your text every time you paste from a styled source. If you paste from the web, documents, or chatbots regularly, running the text through a cleaner first turns this from a recurring mystery into a solved problem.