Text Cleaner
Tidy up text copied from PDFs, emails and web pages: collapse extra spaces, rejoin broken lines and strip invisible characters.
Result
Paste text to clean up spaces and line breaks.
How to use this tool
- Paste your text and choose the clean-up options.
- Join broken lines rejoins text that was split across lines (common when copying from PDFs) while keeping paragraph breaks.
- Straighten curly quotes turns “ ” ‘ ’ into plain " and '.
How it works
The cleaner normalises line endings, turns tabs and unusual space characters into ordinary spaces, removes zero-width characters, then applies the options you choose: collapsing runs of spaces, trimming lines, joining lines within paragraphs and removing blank lines. More than one blank line in a row is always reduced to one.
Example
Messy spacing
“␣␣Hello␣␣␣␣world␣␣” followed by several blank lines and “Bye⇥now” becomes “Hello world”, one blank line, “Bye now”.
Privacy and limitations
- Cleaning happens in your browser; nothing is uploaded.
- Joining lines cannot always tell a deliberate line break (such as in an address or poem) from a broken one — review the result.
Frequently asked questions
Why does text from PDFs have line breaks in the middle of sentences?
PDFs store text as positioned lines, so copying keeps a break at the end of every printed line. “Join broken lines into paragraphs” fixes this.
What are invisible characters?
Characters such as zero-width spaces and non-breaking spaces look like nothing or a normal space but can break searches, spreadsheets and code.