Text Cleaner
Tidy up spaces and messy line breaks
About Text Cleaner
The text cleaner fixes messy whitespace in pasted text, and offers three modes. Clean spaces and blank lines works line by line: runs of spaces, tabs and other non-newline whitespace become a single space, each line is trimmed, three or more consecutive newlines are reduced to one blank line, and the result is trimmed at both ends. A line that contains only spaces becomes an empty line. Trim each line only removes leading and trailing whitespace from every line, leaving spacing inside lines and all blank lines exactly as they were. Join into one paragraph replaces every whitespace run, including line breaks, with one space and trims the ends, which is useful for text copied from a PDF or a hard-wrapped email. All modes normalise Windows and Mac line endings to plain newlines, except that paragraph mode removes them entirely. The cleaner does not strip punctuation, fix spelling, change case or remove duplicate lines, and it does not touch invisible characters such as zero-width spaces. For example, the input two lines with a double space between words and four blank lines in the gap becomes two lines separated by one blank line in Clean mode. Input is limited to 500,000 characters.
How to use Text Cleaner
- Paste the messy text into the Your input box.
- Choose Clean spaces and blank lines, Trim each line, or Join into one paragraph from the Mode menu.
- Review the cleaned text in the Result box.
- Press Copy result or Download to save it.