Skip to content
Takikit

Trim Whitespace from Lines

Removes spaces and tabs from the start, the end or both sides of each line.

Loading tool...

Runs in your browser. Nothing is sent anywhere.

When to use it

Good when data copied from Excel, a PDF or an email has invisible spaces at the start or end of lines that break matching, deduplication or imports.

Choose end of line only when working with code, YAML or indented lists, so leading indentation is kept. Spaces in the middle of a line are left alone.

How to use

  1. Paste your text into the left box.
  2. Choose which side to trim.
  3. Click Copy or Download.

Frequently asked questions

Is my text sent to a server?

No. The tool runs entirely in JavaScript in your browser, and the text you paste never leaves your device.

Related tools

More Text tools

See all text tools