Paste a text to see how many characters are removed.
Paste any text and this tool cleans the whitespace in one pass: double spaces, spaces at the start and end of lines, tabs, empty lines and line breaks. Pick the options you need, and the result appears below at once, with a count of how many characters were removed.
It is built for text copied from PDFs, Word files, emails and web pages, which often carries invisible spaces and broken lines. Everything runs in your browser, so the text is never uploaded.
Six cleanups in one pass
| Option | Effect |
|---|---|
| Multiple spaces → one | “hello world” becomes “hello world” |
| Trim start and end | Removes spaces at both ends of each line |
| Remove empty lines | Deletes blank lines |
| Remove line breaks | Joins all lines into one paragraph |
| Remove tabs | Replaces tabs with a space |
| Remove all spaces | “h e l l o” becomes “hello” |
Where the spaces you cannot see come from
Text copied from a PDF keeps the line breaks of the page, so a paragraph arrives chopped into short lines. Word and web pages add non-breaking spaces and tabs that look like normal spaces but behave differently in search, sorting and databases.
This tool turns the special whitespace characters (non-breaking, zero-width and similar) into ordinary spaces before cleaning, so the options work on text from any source.
How to clean your text
- 1Paste the text in the top box.
- 2Tick the options you need. The first two are on by default.
- 3Copy the result with the button. Changing an option updates the result immediately.
Common uses
- Text from PDFs: join the broken lines of a paragraph.
- Data and spreadsheets: remove stray spaces that stop two cells from matching.
- Forms and databases: trim values before saving them.
- Writing and publishing: fix double spaces after full stops.
Three common cleanups
| Input | Options | Result |
|---|---|---|
| “ hello world ” | Multiple spaces + trim | “hello world” |
| Line 1⏎⏎Line 2 | Remove empty lines | Line 1⏎Line 2 |
| one⏎two⏎three | Remove line breaks | one two three |
Limitations
The tool does not tell paragraphs from simple line wraps: with “Remove line breaks” on, everything becomes one paragraph. To keep paragraphs, remove the empty lines only after joining by hand, or clean the paragraphs one at a time. There is no undo, so keep the original text.
Frequently asked questions
How do I remove double spaces from a text?
Paste the text and keep “Multiple spaces → one” on. Every run of two or more spaces becomes a single space.
How do I remove line breaks from text copied from a PDF?
Tick “Remove line breaks”. All lines are joined with a single space, giving one continuous paragraph.
Can I remove all spaces from a text?
Yes. Tick “Remove all spaces” and every space and tab disappears, so “h e l l o” becomes “hello”.
What does remove empty lines do?
It deletes the lines that are blank or contain only spaces, and keeps the others in their original order.
Why does text copied from Word or a web page have odd spaces?
Those sources use non-breaking spaces, tabs and zero-width characters to control layout. This tool converts them to normal spaces first, so they can be cleaned.
In what order are the options applied?
Special spaces are normalised first, then tabs, line breaks, empty lines, trimming, multiple spaces and finally the removal of all spaces.
How do I join PDF lines without losing paragraphs?
Clean paragraph by paragraph, or replace the double line break with a marker using Find and Replace, remove the line breaks, then restore the marker.
Does it remove non-breaking spaces and other special spaces?
Yes. Non-breaking, narrow and zero-width spaces are turned into normal spaces before the options run.