Writing toolsTrim whitespace

Trim whitespace

Remove spaces and tabs from the start and end of each line. You can also tidy the gaps between words.

Add or drop TXT, Markdown, CSV, TSV, LOG, DOCX, ODT, or PDF files.

What Trim Whitespace is for

A space after a label can keep two spreadsheet entries from matching. Trimming both entries removes that stray space without changing the words.

How to use Trim Whitespace

Paste one entry per line. Leave Collapse internal spaces unchecked to keep the gaps between words or columns. Check the preview and choose Apply changes.

  North  gate  
  South  gate  

Picture the first line as ··North··gate··, with a dot for each space. By default, trimming removes the two spaces at each end and keeps the two between the words.

When should I collapse internal spaces?

Select Collapse internal spaces to get “North gate” and “South gate,” one entry per line and one space between each pair of words. This also turns a tab between words into a space. If those tabs mark columns in a spreadsheet, collapsing them would put the fields together when you paste the text back.

Trimming a line filled with spaces leaves an empty line there. To close that gap altogether, use Remove Blank Lines. If your list still has repeated entries after trimming, remove duplicate lines to keep the first copy of each one.