Multiple Whitespace Remover
Collapse runs of spaces and tabs into one, trim each line, reduce blank lines, or join everything into a single line.
How to remove extra spaces from text
Paste your text
Paste or type it into the box, or press Try an example.
Choose what to clean
Trim line ends, reduce blank lines or join everything into one line.
Copy or download
Paste the tidy text where you need it.
Worked example
This is what Multiple Whitespace Remover gives for its own sample values. Open the tool above and change anything to try your own.
Text
Too many spaces here. And too many blank lines.
- Trim spaces at the start and end of each line
- Yes
- Reduce runs of blank lines to one
- Yes
- Keep line breaks (untick to join everything into one line)
- Yes
Result
Too many spaces here. And too many blank lines.
About Multiple Whitespace Remover
Collapse runs of spaces, tabs and non-breaking spaces into a single space. It is handy for text pasted from a PDF or an email, where lines often carry extra gaps.
FAQs
Does it remove line breaks?
Only if you untick Keep line breaks. By default the lines stay as they are.
What counts as whitespace?
Spaces, tabs, non-breaking spaces and the thin spaces used in some typesetting.
Is anything else changed?
No. Letters, digits and punctuation are untouched.