Paritian

Work & Productivity

Text Cleaner

Tidies pasted text in one go: extra spaces, ragged ends and blank lines all removed.

Results

Cleaned text Pasted text often arrives like this. Blank lines, stray spaces.
Lines removed 4
Characters removed 27
Lines after 3

What this tool does

Text that has been through a few hands — an email, a web page, a PDF, a spreadsheet cell — accumulates whitespace the way a pocket accumulates receipts. None of it shows on screen and all of it causes trouble later, when a lookup fails to match, a list sorts strangely or an import creates rows that appear to be empty. This does the three tidying jobs at once and tells you how much it took out, so you can see whether the text was as clean as it looked.

Formula

trims the ends, reduces runs of spaces to one and throws away empty lines

Variables

SymbolMeaningUnit
textYour text
OUTCleaned text
LRLines removed
CRCharacters removed
LALines after

Worked example

  • Your text Pasted text often arrives like this. Blank lines, stray spaces.
  • Cleaned textPasted text often arrives like this. Blank lines, stray spaces.
  • Lines removed4
  • Characters removed27
  • Lines after3

Limitations

  • The calculation runs entirely in your browser. The values you type are never sent to a server.

Frequently asked questions

What exactly does it change?

Three things, in this order: runs of spaces and tabs inside each line become a single space, the start and end of each line are trimmed, and any line that is then empty is dropped. Nothing else is touched — the words, their order, the capitals and the punctuation all stay as they were.