Whitespace Cleaner
Turn on only the cleanups you want, then run the tool. Extra spaces and blank lines are not removed unless those boxes are checked. The original text stays in the left box until you clear it.
Limit: 400 KB. Ctrl or Cmd+Enter runs the selected options.
What each option does
Options run in this order: collapse spaces, remove blank lines, trim, sort, then unique. Trim removes leading and trailing spaces on every line, then trims the whole block. Collapse replaces runs of spaces or tabs with a single space; it does not delete line breaks. Removing blank lines collapses two or more newlines into one. Sort uses English letter order and ignores case. Unique keeps the first time a line appears. If every option is off, the result matches the input.
When this tool helps
Use this cleaner after a copy from a spreadsheet, an email, or a PDF, when extra spaces make a later count or slug look wrong. Sort and unique help when a list has repeats. Leave “Remove blank lines” off if you still want paragraph gaps. The tool does not change letters inside a word. Check lists and poetry before you accept a collapse of blank lines, because those forms often use empty rows on purpose.
Questions
Will this delete my paragraph breaks?
Only if you check “Remove blank lines.” A single line break between two lines of a paragraph is left in place.
Are tabs treated as spaces?
When collapse is on, tabs and spaces in a run become one space. Tabs are not converted if that option is off.
Does sort change letters inside a line?
No. Whole lines are reordered. Unique then drops later copies of the same full line.
Does the text leave this tab?
No. Cleaning runs in the browser from the boxes on this page.