Space remover
What the space remover does
Paste text, press the button, and every whitespace character disappears: spaces, tabs and line breaks alike. What you get back is one continuous string with the visible characters in their original order.
There is deliberately no mode picker. This route does one thing to the whole input, which makes it fast to use and easy to predict. The jobs next door, collapsing repeated spaces and joining wrapped lines, are separate routes on this site rather than checkboxes here.
It all happens in your browser. Nothing is uploaded, so there is no length cap, no run limit and no account step.
Workflow
How to remove spaces from text in three steps
Worth doing in this order, because the operation is not reversible from the output.
- Step 1
- Keep your original somewhere. Once the spaces are gone, nothing in the result records where they were.
- Step 2
- Paste the text and run it. The whole box is processed at once, on your own machine.
- Step 3
- Read the output before you use it. Line breaks go too, so a paragraph comes back as one long token and that is expected.
Pick the right route
Which space tool you actually want
Three near-identical searches lead to three different behaviours. Choosing wrong is the usual reason a result looks broken.
- Remove every space
- This page. Output is a single unbroken string, suitable for a value rather than a passage.
- Collapse repeated spaces
- The whitespace minifier route. Runs of whitespace become one plain space, so text stays readable.
- Join wrapped lines
- The remove line breaks route, for text copied out of a PDF where every line ended early.
- Strip invisible characters
- The zero-width space remover, for characters that are invisible but are not whitespace at all.
What gets removed
The space characters this catches, beyond the space bar
Text that has been through a word processor, a chat window or a PDF export carries space characters that are not the ordinary one. They look identical on screen and behave differently underneath, which is why a search or a comparison fails on text that looks perfectly normal.
- Tabs and line breaks
- Both are whitespace, so both are removed, which is what makes the output one line.
- No-break space, U+00A0
- Inserted by word processors to keep two things on one line. The single most common invisible space in pasted text.
- Narrow no-break space, U+202F, and hair space, U+200A
- Typographic spaces that arrive with formatted or justified content.
- Ideographic space, U+3000
- The full-width space in Japanese and Chinese text.
- Byte-order mark, U+FEFF
- Not a space by intent, but it is treated as whitespace here and removed along with the rest.
Scope, stated honestly
Invisible characters that survive a space removal
Not every invisible character is whitespace. The zero-width space, U+200B, takes up a position, renders nothing and is not whitespace, so it comes through this tool untouched. The zero-width joiner and the soft hyphen behave the same way.
That matters for your workflow: if a value still fails a comparison after every space has been removed, stop looking for spaces. Run it through the zero-width space remover, which is the route built for exactly those characters.
Where this fits
Where space removal belongs in a cleanup workflow
Treat it as the last step on a single value, not the first step on a document. On a reference number, a key, a hash or a code that was wrapped across two lines, stripping all whitespace turns a broken value back into a usable one in a single move.
On prose it is almost always the wrong first move, because it destroys the structure you will want later. Clean the invisible characters first, collapse the spacing second, and only reach for total removal when the thing you are holding is a value rather than a sentence.
When not to run it
When removing every space is the wrong call
On an article, a post or an email, the result is one enormous word. That is the tool working correctly, and it is not what most people searching for a space remover actually want.
On code it is worse than useless. Space separates tokens in every language and indentation carries meaning in several, so a code block run through here does not come out minified, it comes out broken.
Who it's for
Who uses a space remover, and when
Four situations where this is the fastest fix available.
- Fixing a copied value
- A reference or order number that picked up a stray space in an email and now fails every lookup.
- Rejoining a wrapped key
- A token or hash that broke across two lines in a terminal or a message and needs to be one string again.
- Comparing two strings
- Strip whitespace from both and see whether what is left actually matches, before blaming the system.
- Cleaning exported cells
- Where the padding around a value came from the export rather than from the data.