Text Cleaner: Remove Extra Spaces
Remove extra spaces and blank lines, and rejoin lines broken in text copied from a PDF or an email.
Cleaned text
Paste the text. The cleaned version appears here.
How to use it
- Paste the copied text into the box.
- Leave the options you want switched on.
- Check the cleaned text, then press Copy text.
Examples
- Repeated spacesHello and welcome Hello and welcome
- Blank linesFive blank lines between two paragraphs One blank line
- Broken lineA long PDF line that ends without a full stop, then its continuation One line
Tool details and privacy
Clean up text copied from a PDF, an email or a web page: extra spaces and blank lines are removed, and lines broken in the middle of a sentence are joined again.
Each option works on its own. Turn off the ones you do not want and that part of the text stays as you pasted it.
Options
- Merge repeated spaces: each run of spaces or tabs becomes one space.
- Leave one blank line between paragraphs.
- Join lines broken in the middle of a sentence.
- Remove spaces from the start and end of each line.
Limits
- Up to 100,000 characters at a time.
- Lines are only joined when the text has a line of 35 characters or more, so short lists stay as they are.
- It does not correct spelling or change any words.
Privacy
The text is cleaned in your browser. It is not sent to our server or stored.
Questions
How do I remove extra spaces from text?
Paste the text and leave Merge repeated spaces switched on. Each run of spaces becomes a single space, and you can copy the result.
How do I fix text copied from a PDF with broken lines?
Switch on the option to join broken lines. A line is joined to the next when it is long and does not end with a full stop or another mark that ends a sentence.
When do two lines stay separate?
When the first ends a sentence, when the second starts with a bullet or a number, when the first is short like a heading or the last line of a paragraph, or when a blank line sits between them.
Does the text I pasted change?
No. It stays in the input box as it was, and the cleaned text appears in the result box.