Remove Extra Spaces & Line Breaks
Clean up text pasted from PDFs and emails: collapse double spaces, trim lines, join broken lines into paragraphs and remove blank lines.
Paste messy text and choose how to treat line breaks - the clean version updates as you change options.
More Text & Writing Tools
View all 28Text from PDFs sometimes hides special spaces; the non-breaking space option turns those into normal spaces too.
What Does This Tool Do?
Text copied from PDFs, emails and some websites arrives broken: a line break at the end of every line, double spaces between words, tabs and blank lines everywhere. This tool cleans it up. It can join broken lines back into paragraphs, collapse repeated spaces, trim the start and end of lines, remove blank lines, or put everything on one line.
Common Problems It Fixes
- A paragraph from a PDF that breaks in the middle of every sentence.
- Double spaces after full stops and between words.
- Several empty lines between paragraphs.
- Non-breaking spaces and tabs that stop text from wrapping properly.
How to Use It
- Paste the messy text.
- Choose what to do with line breaks - Keep paragraphs, join broken lines suits most PDF text.
- Tick or untick the spacing options. The clean text updates as you go.
- Copy the result.
Example
A paragraph copied from a PDF with a break after "copied", "line" and "place", double and triple spaces, four blank lines and an indented second paragraph becomes two clean paragraphs: This paragraph was copied from a PDF, so every line breaks in the wrong place. and The second paragraph has extra spaces too. - 11 characters shorter than before.
Hyphenated Line Ends
Printed documents often split long words with a hyphen at the end of a line, such as "infor-" and "mation". Tick Re-join words split with a hyphen to put them back together. It only joins when the next line starts with a lowercase letter, so real hyphenated names are less likely to be affected.
Limitations
The tool cannot tell a line break that ends a short line on purpose - in an address or a poem - from one added by a PDF, so choose Keep lines for that kind of text. Some invisible characters are not spaces at all; find them with the Hidden Character Detector. For targeted changes, use Find and Replace Text.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.