Text tool

Trim Lines

Remove leading and trailing whitespace from each line while preserving internal spaces.

Fast browser processing Private — no uploads Free to use
HOW IT WORKS

Use Trim Lines in three simple steps

1

Add text

Paste your content or import a UTF-8 TXT file up to 5 MB.

2

Review the result

Paste copied lists and review edge whitespace removal line by line.

3

Copy or download

Copy the result or save it as a TXT file.

ABOUT THIS TOOL

Trim Lines

Remove leading and trailing whitespace from each line while preserving internal spaces.

No. Internal spaces and tabs remain; only whitespace at the edges is removed.

FAQ

Frequently asked questions

Are spaces inside a line changed?

No. Internal spaces and tabs remain; only whitespace at the edges is removed.

Are empty lines deleted?

No. Blank lines remain. Use Remove Empty Lines to delete them.

Is this tool free and private?

Yes. No account is needed, and your input is processed locally in your browser without being uploaded to FormatKit.