Text Cleaner

Tidy up spaces and messy line breaks

Found this useful? Share it

X LinkedIn Reddit WhatsApp

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

  1. Paste the messy text into the Your input box.
  2. Choose Clean spaces and blank lines, Trim each line, or Join into one paragraph from the Mode menu.
  3. Review the cleaned text in the Result box.
  4. Press Copy result or Download to save it.

Frequently Asked Questions

Use Clean spaces and blank lines. Any gap of two or more empty lines is reduced to a single blank line, so paragraphs stay separated while the extra spacing disappears.

It only strips spaces and tabs from the start and end of every line. Double spaces in the middle of a line and every blank line are left alone.

Choose Join into one paragraph. All line breaks and repeated spaces become single spaces, giving one continuous line of text, which is handy for text copied out of PDFs.

No. Clean mode keeps single blank lines between paragraphs. To remove every blank line, use Join into one paragraph, or the duplicate line remover which can drop empty lines.

No. Only whitespace and line breaks are changed. Spelling, capitalisation and punctuation stay exactly as you pasted them.