aitextcleaner.top

Non-Breaking Space Remover — Strip   and U+00A0 from Any Text

Paste your text. The tool finds every U+00A0 non-breaking space hiding among the ordinary spaces, then hands you a clean copy ready for search, code, and data work.

Hidden character report

Paste text to scan

What a non-breaking space is and how it differs from an ordinary space

Unicode assigns code point U+00A0 to the non-breaking space character. In every standard font it renders visually identical to a regular space — U+0020 — and most text editors, browsers, and word processors display the two characters indistinguishably. The sole functional difference is how the line-breaking algorithm treats them. U+0020 is a legal line-break opportunity: a renderer may wrap the line at that point to fit content within its container. U+00A0 carries an explicit instruction to hold the adjacent words together no matter how narrow the container becomes. A product label that reads "500 ml" will always appear on a single line; the same label with a plain space may split with the number on one line and the unit on the next.

That instruction is the only functional difference U+00A0 adds over U+0020. The two characters have the same visual width and the same glyph in every font. Their byte representations differ: U+0020 is the single byte 0x20 in both ASCII and UTF-8; U+00A0 is two bytes — 0xC2 followed by 0xA0 — in UTF-8. Every system that processes strings byte-by-byte sees two distinct characters. Every system that renders strings to pixels sees the same visible gap. That mismatch between visual identity and computational identity is the root cause of every problem non-breaking spaces create in downstream systems.

Where non-breaking spaces come from

Word processors generate non-breaking spaces deliberately. Microsoft Word inserts U+00A0 automatically between a number and its unit of measurement — 5 km, 3 pm, 42 % — between a person's first and last name in certain language configurations, and anywhere the user presses Ctrl+Shift+Space. LibreOffice and Apple Pages follow similar conventions. These are intentional typographic insertions designed to prevent awkward line breaks in printed documents. When you copy a paragraph authored in Word and paste it into a plain text field, CMS editor, or database input form, every one of those non-breaking spaces travels with it. A document handed off by a writer may look clean on screen and carry dozens of U+00A0 characters that no reviewer noticed.

Web pages are the second major source. HTML authors write the named entity   deliberately to create fixed spacing — navigation separators, padding in table cells, blank lines in older email templates. When a browser parses that entity, it stores U+00A0 in the DOM. When a user selects and copies visible text from the page, the browser copies the underlying character stream rather than the original HTML markup. The copied text contains U+00A0 wherever the source HTML contained  . Content management systems compound the problem: their rich-text editors emit   automatically when they detect consecutive spaces, because two ordinary spaces collapse in HTML rendering and the editor tries to preserve the visual gap the author intended.

OCR software is a third significant source. When a scanner converts a printed page to text, the OCR engine reads spacing from pixel measurements rather than from any semantic encoding. A printed number followed by a percent sign, an abbreviation followed by its expansion, a product name followed by a model number — each follows typographic conventions the OCR engine recognizes. Many engines map those visually cohesive groups to U+00A0 rather than U+0020 because the pixel evidence suggests the author intended them as single units. The resulting file looks correct on screen but carries non-breaking spaces that cause failures in every downstream system that performs exact string comparisons.

Real failures non-breaking spaces cause

Search matching fails first. A product catalog that stores "iPhone 16" with U+00A0 returns zero results for a query that sends "iPhone 16" with U+0020. The two strings look identical in every user interface; the comparison fails because the byte sequences differ. This failure is widespread in e-commerce, where product names are copied from manufacturer press releases that use non-breaking spaces for typographic consistency. Support queues fill with tickets that describe correct-looking data that search cannot find, and the investigation usually ends with a developer running a hex dump to spot the character that made the strings unequal.

Excel formulas break in a predictable way. A cell displaying "42 000" looks like the number forty-two thousand but is stored internally as a text string, because U+00A0 is not a digit character. The SUM function skips it entirely. A VLOOKUP against a column of numbers finds no match. Excel's TRIM function does not help because TRIM removes only U+0020. The cell appears cleaned after TRIM and continues to misbehave in every formula that references it, silently producing wrong totals or empty lookups with no error message.

CSS text rendering exposes non-breaking spaces as layout anomalies in specific situations. An element styled with letter-spacing applies the extra spacing around U+00A0 just as it would around any other character. In dense layouts — card titles, navigation labels, data tables — a non-breaking space injected via paste produces a visible gap at a position where no gap belongs. In Chinese and Japanese text, where words run together without explicit separators, a single U+00A0 pasted from a foreign source creates a gap that looks like intentional design but appears in no style rule and breaks character-counting logic that assumes uninterrupted runs of CJK glyphs.

CSV parsing errors follow a reliable pattern. A value of "New York" with U+00A0 does not match a lookup for "New York" with U+0020. Geographic datasets exported from GIS software, financial records from trading platforms, and HR data from payroll systems frequently carry non-breaking spaces in proper nouns, place names, and measurement strings. Joining such a dataset against a reference table that uses ordinary spaces leaves rows unmatched that look correct in every preview tool but fail every automated join or lookup.

Programmatic traps and the whitespace matching problem

The whitespace shorthand character class in most regex engines matches ASCII whitespace: space U+0020, tab U+0009, newline U+000A, carriage return U+000D, and form feed U+000C. U+00A0 falls outside that set by default in Python's re module, Go's regexp package, Ruby's built-in regex, and PCRE. A pattern written to split text on whitespace, strip trailing spaces, or validate that a field contains no embedded spaces passes a string containing U+00A0 without complaint. The string reaches the database or downstream API looking clean from the pattern's perspective and fails every equality comparison that follows.

JavaScript is the exception that creates confusion. The ECMAScript specification requires JavaScript's whitespace class to match all Unicode characters in the White_Space property, which includes U+00A0. A developer who tests a whitespace-stripping pattern in a browser console sees it work correctly against non-breaking spaces, then deploys the same logic in a Python service and finds it fails against production data. JavaScript's trim method also strips U+00A0 from both ends of a string; Python's str.strip does not. The same input string behaves differently depending on which layer processes it first, and the difference is invisible until data reaches a system that performs byte-exact comparisons.

How to spot a non-breaking space without a tool

Three manual tests identify U+00A0 reliably. The first uses cursor movement: place the cursor immediately before a suspicious gap and press the right arrow key one character at a time. If the cursor takes two keystrokes to cross what looks like a single space, an extra character is present at that position. This test works in Microsoft Word, most browser input fields, and code editors that do not render non-printable characters as visible glyphs.

The second test uses Find and Replace with the exact visible string — the word before the space, the space itself, and the word after. If the search finds no match even though the text is clearly visible on screen, the space in the document is not U+0020. The third test uses a developer console: paste the suspicious text and read the character code at the space position. A value of 160 confirms U+00A0. A value of 32 confirms U+0020. The decimal difference of 128 maps exactly to the byte offset between the two code points in the Latin-1 Supplement block of the Unicode standard, and knowing that offset is the fastest way to write a targeted replacement in any language.

HTML entities for non-breaking spaces and Unicode relatives

HTML provides three interchangeable ways to write a non-breaking space in source markup. The named entity   appears in virtually every HTML reference and is the most recognizable form. The decimal numeric reference   expresses the same character using its decimal code point value. The hexadecimal numeric reference   uses the hexadecimal code point. All three expand to U+00A0 when a browser or HTML parser processes the document. When a user copies visible text from a rendered page, the copy operation captures U+00A0 regardless of which entity form appeared in the source markup, so the downstream string always contains the raw character rather than any of the three entity notations.

Two Unicode relatives are rarer but cause identical comparison failures when they appear. U+2007, the figure space, has the same advance width as a digit in fonts with fixed-width numerals and appears in financial documents and typeset tables where numeric columns must align cleanly. U+202F, the narrow no-break space, is explicitly non-breaking and appears in French typographic conventions before punctuation marks including guillemets, colons, semicolons, and exclamation marks. Both characters look like spaces in rendered output, both prevent line breaks, and both cause string comparison failures in systems that do not account for them. Neither is removed by a simple replacement that targets only decimal 160.

Characters this tool looks for

25 invisible characters and formatting controls, with the action taken on each one.

CharacterCode pointActionWhat it does
Zero-width characters
Zero Width SpaceU+200BRemovedInvisible separator with no width. Commonly left behind when text is copied out of a chat window.
Zero Width Non-JoinerU+200CRemovedInvisible character that blocks two letters from joining in scripts such as Arabic or Devanagari.
Zero Width JoinerU+200DRemovedInvisible character used to glue emoji sequences together. Stray copies can break word wrapping.
Zero Width No-Break Space (BOM)U+FEFFRemovedByte order mark. Harmless at the start of a file, invisible noise anywhere else.
Word JoinerU+2060RemovedTells a text engine not to break a line here. Invisible, and easy to carry along by accident.
Mongolian Vowel SeparatorU+180ERemovedA legacy invisible separator from Mongolian script that now renders as nothing at all.
Bidirectional controls
Left-to-Right MarkU+200ERemovedDirectional hint for mixed-script lines. Invisible on screen but present in the character stream.
Right-to-Left MarkU+200FRemovedMirror of the left-to-right mark, used to steer the order of mixed-direction text.
Arabic Letter MarkU+061CRemovedInvisible directional marker for Arabic text. Rarely intentional outside its original document.
Left-to-Right EmbeddingU+202ARemovedOpens an embedded left-to-right run. Unpaired copies can scramble the order of a sentence.
Right-to-Left EmbeddingU+202BRemovedOpens an embedded right-to-left run. Left behind after copy-paste, it can flip nearby punctuation.
Pop Directional FormattingU+202CRemovedCloses an embedded directional run. Without its partner it is pure invisible noise.
Left-to-Right OverrideU+202DRemovedForces following characters to display left-to-right regardless of their own direction.
Right-to-Left OverrideU+202ERemovedForces following characters to display right-to-left. A common cause of text that looks reversed.
Left-to-Right IsolateU+2066RemovedModern replacement for the embedding controls. Still invisible, still travels with copied text.
Right-to-Left IsolateU+2067RemovedIsolates a right-to-left run from the surrounding paragraph direction.
First Strong IsolateU+2068RemovedIsolates a run whose direction is decided by its first strong character.
Pop Directional IsolateU+2069RemovedCloses an isolate opened by one of the isolate controls above.
Formatting controls
Soft HyphenU+00ADRemovedA hyphen the reader only sees if the word happens to break at the end of a line.
Carriage Return (CR)U+000DRemovedHalf of a Windows line ending. Kept on its own it produces doubled spacing in most editors.
Markdown Asterisk MarkerU+002ARemovedBold or italic marker such as ** left behind when text is copied in its raw form. Turn this group off to keep Markdown styling marks.
Markdown Backtick MarkerU+0060RemovedInline-code backtick left behind after copying raw assistant output. Turn this group off to keep inline code marks.
Invisible spaces
No-Break SpaceU+00A0→ spaceLooks exactly like a space but stops a line from breaking there. A frequent copy-paste leftover.
Figure SpaceU+2007→ spaceA space as wide as a digit, used to align numbers in tables. Replaced with a normal space.
Narrow No-Break SpaceU+202F→ spaceA thin, non-breaking space from French typography. Replaced with a normal space.

Frequently Asked Questions

▸Why does Excel's TRIM function not remove non-breaking spaces?

Excel's TRIM strips only U+0020, the ordinary ASCII space. It was defined this way to match legacy spreadsheet behavior that predated Unicode. Non-breaking spaces sit at code point U+00A0, decimal 160, which TRIM does not recognize as whitespace. To remove them, use SUBSTITUTE: =SUBSTITUTE(A1,CHAR(160),"") replaces every U+00A0 with an empty string. To also clean ordinary leading and trailing spaces in the same step, combine the functions: =TRIM(SUBSTITUTE(A1,CHAR(160)," ")) first converts each U+00A0 to a regular space, then TRIM collapses multiple spaces and removes any at the edges.

▸Is a non-breaking space the same as a zero-width space?

No. A non-breaking space (U+00A0) is a full-width character that occupies the same horizontal space as an ordinary space and is visible as a gap in rendered text. Its purpose is to prevent a line break between the two words it separates. A zero-width space (U+200B) takes up no horizontal space at all and is completely invisible in rendered output. Its purpose is to mark a potential line-break point without introducing a visible gap. Both characters cause string comparison failures in systems that perform exact matching, but they sit in different blocks of the Unicode table and require different replacement logic in code.

▸Does the tool also remove figure spaces and narrow no-break spaces?

This tool targets U+00A0 specifically, which is the character inserted by Word, HTML entities, and most OCR engines. The related characters U+2007 (figure space) and U+202F (narrow no-break space) are distinct code points — decimal 8199 and 8239 respectively — and this tool does not alter them. They appear far less frequently in everyday text copied from web pages and word processors. If your source contains those variants, an invisible character remover that covers a broader set of Unicode space separators would handle them.