Remove Extra Spaces
Clean up text copied from PDFs, emails and web pages. Collapse runs of spaces, convert tabs and hidden non-breaking spaces, trim the edges of every line, squash blank lines and, if you want, join everything into a single line. The tiles show exactly how many characters were removed.
Remove Extra Spaces from Your Text
Cleaned text
What was removed
How to Use the Remove Extra Spaces
- Paste your text into the box.
- Tick the clean-up options you need; the common ones are already on.
- Check the cleaned text and the count of removed characters.
- Copy the result or download it as a .txt file.
About This Tool
Writers and editors cleaning pasted text, developers preparing data, and anyone who needs text without stray double spaces before publishing or importing it.
Input: Plain text · Output: Cleaned text.
Features and Limitations
Features
- Ten independent options, so you decide what counts as extra.
- Treats non-breaking spaces and other invisible Unicode spaces like normal spaces, which ordinary find-and-replace often misses.
- Optional removal of zero-width spaces and of spaces before punctuation.
- Shows characters and lines before and after.
Limitations
- Spaces inside code, tables or Markdown that rely on indentation will be changed too; do not use the tool on whitespace-sensitive text.
- “Remove all line breaks” joins lines with a single space, so words split by hyphenation at a line end stay split.
- Only space-like characters are touched; other invisible characters, such as zero-width joiners, are left alone.
- Results are computed in your browser; nothing you enter is sent to a server.
Example
The text “ Hello world ” followed by three blank lines and “Next” and “line” separated by a tab becomes “Hello world”, one blank line, then “Next line”, and the tiles show how many characters were removed.
Frequently Asked Questions
How do I remove double spaces after a full stop?
Leave Collapse repeated spaces into one ticked. Two or more consecutive spaces anywhere in the text become one.
Why do some spaces survive normal cleaning?
Text copied from the web or from Word often contains non-breaking spaces (U+00A0). They look like spaces but are different characters. The Unicode option converts them first.
Can I turn a multi-line paragraph into a single line?
Yes. Tick Remove all line breaks; each line is joined to the next with one space.
Will it remove the space after a comma?
No. Only spaces before , . ; : ! ? are removed, and only if you tick that option. Spaces after punctuation are kept.
Related Tools
More like this: all Text Cleanup tools, all Text & Writing tools or the TinySandy home page.