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
- 1Paste your multi-line text
- 2Click Convert
- 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
Remove Line Breaks
Replace every line break in your text with a single space, turning multi-line text into one continuous line.
Remove Extra Spaces
Collapse any run of whitespace (multiple spaces, tabs, line breaks) down to a single space, and trim the ends.
Remove Duplicate Lines
Remove repeated lines from a list, keeping only the first occurrence of each unique line, in original order.
Remove Empty Lines
Delete every blank or whitespace-only line from your text, keeping only lines with actual content.