How to clean messy text: extra spaces, blank lines and PDF line breaks

Text copied from PDFs, emails or web pages brings odd spaces, hard line breaks and hidden characters. Text cleaner fixes them.

Steps

  1. Paste your text.
  2. Tick the clean-ups you want: trim line edges, collapse repeated spaces, handle empty lines (keep, at most one, or remove), join everything into one line, replace curly quotes and long dashes with plain ones, remove HTML tags, and remove invisible characters.
  3. Copy the result.

Fixing text copied from a PDF

PDF text often breaks lines in the middle of sentences. Tick Join everything into one line, then add paragraph breaks where needed. If the PDF is a file rather than a copy, PDF to text extracts it first.

Invisible characters

Zero-width and non-breaking spaces cause odd bugs in code, spreadsheets and URLs. The tool removes them by default.

Tips

  • Check the new length with Word counter.
  • Replacing curly quotes with plain ones is important for code and CSV files.

All guides

↑ ↓ navigateEnter openEsc close