Trim Lines

Ragged spacing off the ends of every line.

Ragged spacing off the ends of every line.

How to use it

  1. Paste the text. Anything with ragged spacing: copied columns, indented output, a badly wrapped paste.
  2. Decide about inner spaces. The ends are always trimmed. Runs of spaces inside a line are left alone unless you ask.
  3. Copy the result. Line count is unchanged, so nothing has gone missing.

When you would use this

Whitespace at the ends of lines is invisible and causes an unreasonable amount of trouble. It breaks exact comparisons, defeats deduplication, turns a clean list into a messy one when pasted into a spreadsheet, and survives every visual check because there is nothing to see. Text copied out of a terminal, a PDF or an indented code block arrives full of it. Trimming the ends is unambiguous and always applied. Runs of spaces inside a line are a different matter: sometimes they are accidental double spaces after a full stop, and sometimes they are deliberate column alignment that collapsing would destroy, so that is a switch rather than a default. Blank lines are preserved rather than removed, which keeps the line count the same and makes it obvious nothing was lost.

Questions

Does it remove tabs?
At the ends of a line, yes: tabs and spaces are both whitespace. Inside a line, only if you turn on collapsing, which replaces any run of whitespace with a single space.
Will it delete my blank lines?
No. A line of spaces becomes an empty line rather than disappearing, so the line count stays the same. Removing empties is a separate tool.
Is my list sent anywhere?
No. The work happens in the page. There is no server here, which is also why it keeps going with the network disconnected.