Text UtilitiesText CleanersFree Tool

Strip Leading Trailing Spaces

Trim whitespace from the start and end of every individual line in your text.

How to Use Strip Leading Trailing Spaces
  1. 1Paste your multi-line text
  2. 2Click Convert
  3. 3Copy the result with each line trimmed
Frequently Asked Questions

Each line separately — every line is split, trimmed on both ends independently, and rejoined, so indentation or trailing spaces on any individual line are removed regardless of the others.

No — a blank or whitespace-only line stays as a blank line (now truly empty after trimming); use the Remove Empty Lines tool if you also want those removed entirely.

No — only leading and trailing whitespace on each line is removed; internal spacing (like double spaces between words) is left as-is.

No — the trimming happens entirely in your browser.

Related Tools

Related Articles

More from Text Utilities