Remove Extra Spaces

Cleans up double spaces, stray tabs, spaces at the ends of lines, and empty lines.

Advertisement

What each button does

  • Clean up spaces squeezes runs of spaces down to one, removes tabs and invisible control characters, and deletes empty lines.
  • Trim each line removes spaces from the start and end of every line but leaves the spaces between words alone. Good for lists pasted from spreadsheets.
  • Remove empty lines deletes blank lines and changes nothing else.

Extra spaces are the most common reason two items that look identical aren’t treated as duplicates. Clean up first, then remove duplicates.

Clean up spaces

Before
too    many   spaces



and  blank   lines   
After
too many spaces
and blank lines

Trim each line

Before
   apple
banana   
   cherry   
After
apple
banana
cherry

Questions

Will this remove the spaces between words?

No. Words keep a single space between them.

Can I remove all spaces?

Use Find and replace: find a single space and replace it with nothing.