Text Cleaner

Tidy up text copied from PDFs, emails or spreadsheets: remove extra spaces, empty lines and duplicates, or join broken lines.

Counted in your browser — nothing is uploaded.

You can also drop a .txt, .md, .docx, .pdf or .epub file onto the text box.

Text analysis

Clean up

Change case

How to use it

  1. Paste the messy text into the box.
  2. Pick a clean-up action. Each one is applied immediately and can be undone.
  3. Check the new word and character counts, then copy the cleaned text.

How we count

“Remove extra spaces” turns runs of spaces and tabs into one space and trims spaces at the start and end of every line.

“Join lines” replaces single line breaks with a space (or with nothing between Chinese or Japanese characters) and keeps blank lines as paragraph breaks.

“Remove duplicate lines” keeps the first occurrence of each line and deletes later identical ones; “Remove empty lines” deletes lines that contain only whitespace.

Frequently asked questions

How do I fix line breaks in text copied from a PDF?

Use “Join lines”. It joins lines that were broken mid-sentence while keeping blank lines between paragraphs.

Will removing extra spaces change my words?

No. Only whitespace changes: double spaces become single spaces and stray spaces at line ends disappear.

Is the duplicate-line check case-sensitive?

Yes. Lines must match exactly, including capitals and spaces, to count as duplicates, so nothing is removed by accident.

Can I undo a change?

Yes. Press “Undo” in the message after each action, or use Ctrl+Z (Cmd+Z on a Mac).

Does it handle full-width spaces?

Yes. Full-width spaces used in Chinese and Japanese and no-break spaces are treated as spaces.

Is my text uploaded?

No. Every number is calculated by JavaScript in your browser. Your text is not uploaded, not put in the URL and not sent with analytics. A draft is kept in your browser's local storage on this device only, and you can delete it at any time.