https://devtools.solutions/tools/text/text-trim-lines.html

Trim Lines

Remove leading and trailing whitespace from every line in multi-line text.

Frequently Asked Questions

Does this preserve line breaks?

Yes. Most operations work line-by-line and keep newline structure.

What does slugify do?

It converts text to URL-safe lowercase words separated by hyphens.

Is text processing private?

Yes. All transformations run in your browser only.

Example input/output

Input: hello world

Output: hello world

How it works

This tool splits the input on newlines, calls String.prototype.trim() on each line, and rejoins the result. This removes spaces and tabs from the start and end of every line without affecting line content. Processing runs in your browser.

Common use cases

Related tools