Text Cleaner

Fix messy copied text in one click — strip extra spaces, stray line breaks, duplicate lines, HTML tags and invisible characters. Free, instant and unlimited.

About this text cleaner

Text copied from PDFs, emails, websites and chat apps arrives full of junk: line breaks in the middle of sentences, double spaces, empty lines, stray HTML, invisible zero-width characters and curly "smart" quotes that break code. This tool fixes all of it in one pass — you choose exactly which cleanups to apply.

How to clean messy text

  1. Paste the messy text into the box.
  2. Tick the cleanups you want — the defaults (collapse spaces, trim lines, remove empty lines, strip invisible characters) fix the most common paste problems.
  3. Choose Remove all line breaks when a PDF has chopped every line short, or Remove duplicate lines for lists and log files.
  4. Press Clean text, then copy or download the result.

What each option does

Frequently asked questions

What are invisible characters and why remove them?

Zero-width spaces and non-breaking spaces sneak in when copying from websites and chat apps. They're invisible but break code, spreadsheets, form validation and search — this tool strips them in one pass.

Why do PDFs paste with broken lines?

PDFs store text line by line as it appears on the page, so pasting carries a line break at the end of every visual line. Tick 'Remove all line breaks' to rejoin the text into flowing paragraphs.

Will cleaning change my actual words?

No — every option only affects whitespace, duplicate lines, markup and special characters. Your wording stays exactly as written.