Trim Lines
Remove leading and trailing spaces and tabs from every line while keeping the spacing inside each line. Clean pasted lists and data. Free whitespace trimmer.
Runs in your browser. Nothing is uploaded.
About Trim Lines
Trim Lines removes spaces and tabs from the start and end of every line, and nothing else. Spacing between words is left exactly as it was, which matters for aligned columns and code.
Use it on lists pasted from PDFs, spreadsheets or emails, where invisible trailing spaces break lookups and comparisons.
How to use Trim Lines
- Type or paste your text into the input box. Press Sample to see an example.
- The result appears instantly as you type.
- Copy the result, or press Use as input to chain another transformation.
Frequently asked questions
Does it collapse double spaces?
No. Use Remove Extra Spaces if you also want runs of spaces inside lines reduced to one.
Are empty lines removed?
No, they stay. Use Remove Empty Lines for that.
Is Trim Lines free and private?
Yes. Trim Lines is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.