Text Cleaner Tools

Trim Text Online

Trim spaces from both ends of every line.

PrivateYour text is processed on your device and never uploaded.
Input
Result
0 chars · 0 words · 0 lines

Lists and tables pasted from mixed sources end up with uneven padding, some lines indented, others with trailing spaces, which makes them hard to align or compare.

Trim Text Online removes spaces and tabs from both ends of each line at once so every line is flush.

How to use Trim Text Online

  1. Paste a list or block where lines have uneven padding.
  2. Trim Text Online removes spaces and tabs from both the start and end of every line.
  3. Copy the trimmed lines, now aligned at both edges.

Use cases

Good to know

Trim Text Online combines leading and trailing cleanup, removing spaces and tabs from each end of every line in a single pass. Inner spacing inside a line is preserved, and line breaks are kept. It is the quickest way to make a ragged block flush on both sides.

Frequently asked questions

What is trimmed from each line?

Spaces and tabs at the start and the end of the line. Spacing in the middle of the line is left as it is.

Does it collapse multiple inner spaces?

No. Only the two ends are trimmed; use the extra-spaces tool to collapse runs inside a line.

Are empty lines removed?

Empty lines become truly empty after trimming, but they are not deleted; line breaks remain.

Related Whitespace Tools