Quick answer: a non-breaking space looks like a normal space but is a different character (Unicode U+00A0, code 160). To remove it in Excel, use =SUBSTITUTE(A1, CHAR(160), " "). In Google Sheets, use =SUBSTITUTE(A1, CHAR(160), " "). In Word, find ^s and replace with a space. For any text, paste it into an invisible character remover.
Why non-breaking spaces cause trouble
A non-breaking space stops a line from breaking between two words, such as "10 km". That's useful in typesetting, but elsewhere it:
- Makes numbers like "1 250" count as text in spreadsheets
- Stops TRIM from cleaning cells in Excel
- Makes find and replace miss matches
- Causes errors in code and data files
Excel
Replace inside a cell with a formula:
=SUBSTITUTE(A1, CHAR(160), " ")
Wrap it in TRIM to clean up extra spaces too:
=TRIM(SUBSTITUTE(A1, CHAR(160), " "))
Replace across a whole sheet: open Find and Replace (Ctrl+H). Click in the "Find what" box, hold Alt and type 0160 on the number pad, then type a normal space in "Replace with" and choose Replace All.
If a number still won't calculate, convert it with =VALUE(...) after substituting.
Google Sheets
Use the same formula:
=SUBSTITUTE(A1, CHAR(160), " ")
Or open Edit → Find and replace, tick Search using regular expressions, search for \x{00A0} and replace with a space.
Microsoft Word
Open Replace (Ctrl+H), type ^s in "Find what" (Word's code for a non-breaking space), type a normal space in "Replace with", and choose Replace All.
Google Docs
Docs' find and replace doesn't make non-breaking spaces easy to target. The quickest route is to copy the text, clean it with the invisible character remover, and paste it back.
Code editors
In VS Code, open search with regular expressions enabled and search for \u00A0, replacing with a space. Many editors can also highlight unusual whitespace; in VS Code, the "Unicode highlight" settings do this.
In Python:
text = text.replace("\u00a0", " ")
In JavaScript:
text = text.replace(/\u00a0/g, " ");
Other spaces to watch for
Non-breaking spaces have relatives that cause the same problems: the narrow no-break space (U+202F), thin space (U+2009) and figure space (U+2007). The invisible character remover handles all of them at once and also removes zero-width characters, which formulas like the ones above miss.
How to tell if a cell contains one
In Excel or Google Sheets, these quick tests reveal a hidden non-breaking space:
- =LEN(A1) returns more characters than you can see.
- =CODE(MID(A1, 2, 1)) returns 160 for a non-breaking space in position 2 (a normal space returns 32).
- A value that looks like a number is left-aligned and won't sum.
Cleaning a whole column at once
- Insert a helper column next to the data.
- Enter =TRIM(SUBSTITUTE(A1, CHAR(160), " ")) and fill down.
- Copy the helper column and Paste Special → Values over the original.
- Delete the helper column.
- If the values are numbers, select the column and convert them with Data → Text to Columns → Finish in Excel, or set Format → Number in Google Sheets.
Other places they hide
Copied web tables. Prices like "1 299" or "€ 25" often use a non-breaking space between the digits or the currency.
PDF text. Copying from PDFs often brings in odd spacing characters.
CSV exports from some systems use them as thousands separators in European number formats.
Word documents. Word inserts non-breaking spaces automatically in some languages, such as before a colon or question mark in French.
When to keep them
Non-breaking spaces are useful in finished documents: between a number and its unit ("10 km"), in names ("Mr. Lee"), and in dates, they stop awkward line breaks. Remove them from data and code, but consider keeping them in published text where line breaks matter.
Common mistakes
Relying on TRIM alone. TRIM doesn't remove character 160.
Replacing them with nothing. Deleting a non-breaking space joins the words on either side. Replace it with a normal space instead.
Missing related characters. The narrow no-break space (U+202F) and thin space (U+2009) cause the same problems and need their own replacement, or a tool that handles them all, such as the invisible character remover.
Notepad++: open Replace, set Search Mode to Regular expression, find \x{00A0} and replace with a space.
Microsoft Word, the other way round: if you want to insert a non-breaking space, press Ctrl+Shift+Space. Knowing the shortcut helps you spot where they came from.
Command line (Linux or macOS): many text tools can replace the character in a file using its byte sequence; in UTF-8 a non-breaking space is the two bytes C2 A0.
Google Docs: clean the text externally and paste it back, since Docs' search can't easily target the character.
Quick checklist
- Test suspicious cells or text with LEN or CODE.
- Replace character 160 with a normal space.
- Run TRIM to remove extra spaces.
- Convert text back to numbers if needed.
- Check for related characters like U+202F.