Trim Lines — Free Online Tool

Remove unwanted spaces and tabs from the beginning and end of every line while leaving internal spacing intact.

This private tool runs locally in your browser. Your text is never uploaded or sent to a server.

How to use Trim Lines

  1. Paste the indented or padded lines
  2. Apply line trimming
  3. Copy the cleaned text

Example

“ value ” becomes “value” without changing spaces inside a line.

Useful tips

  • Avoid trimming indentation-sensitive code
  • Combine with deduplication for cleaned lists

JavaScript enables the interactive tool above.

More TextJam tools