Text Cleaner

Clean up the messy line breaks and spaces in text copied from a PDF or web page, exactly the way you want.

How to use it

  1. Paste the text you want to clean up into the left box.
  2. Toggle the cleanup options above and the result on the right updates instantly.
  3. Grab it with Copy result, or press Use result as input to run another round of cleanup on it.

Why is text copied from a PDF broken into pieces?

A PDF stores text line by line as it appears on screen, so when you copy it you get a line break in the middle of every sentence. Turn on Join line breaks inside paragraphs and paragraphs separated by an empty line are kept, while line breaks inside a paragraph become spaces, giving you natural sentences again. Words split with a hyphen (-) at the end of a line are rejoined with the hyphen removed.

In what order are the options applied?

Trim → join paragraphs → remove all line breaks → collapse spaces → remove empty lines → remove duplicate lines → sort → change case. That is why two lines that differ only in leading or trailing spaces are still caught as duplicates, for example.

FAQ

Can I remove duplicates from a list copied from Excel?

Yes. Copy a column from Excel, paste it in and turn on Remove duplicate lines; only the first occurrence of each line is kept. To sort it as well, pick A to Z under Sort lines.

Does case conversion work on Korean or other non-Latin text?

Korean, Chinese and similar scripts have no upper and lower case, so they are left unchanged. Case conversion only affects letters of the Latin alphabet.

Is my text stored on a server?

No. Everything is processed inside your browser and your text is never sent anywhere. Only the options you picked are remembered in your browser so they're ready next time.