Free Text Tool

Trim Lines

Strip leading and trailing spaces and tabs from every line in one click. Perfect for cleaning pasted code, CSVs and lists.

100% Free No signup Runs in your browser No uploads
0 characters
Trims leading and trailing spaces and tabs from every line at once. Empty lines stay empty, and your original line ending style (Windows CRLF, Unix LF or old Mac CR) is preserved.

Frequently asked questions

Does it trim spaces inside the line?

No. Only the edges of each line are trimmed. Spacing between words is left exactly as it was.

What about tabs and non-breaking spaces?

Both are trimmed, along with regular spaces, from the start and end of every line.

Will blank lines be removed?

No, blank lines are kept as blank lines. Use the Remove Blank Lines tool if you want them gone.

Preview

Trim Lines tool preview
Live preview of the Trim Lines tool running in your browser. Your data never leaves your device.

Related free tools