Skip to content
ToolInstant

Trim Whitespace

Local

Trim leading and trailing spaces and tabs from every line of your text at once, or only one side. Shows how many lines changed. Free and runs in your browser.

Loading tool…

Ready · Runs in this browser · nothing uploaded

Text tools · Free · No upload · No sign-up

How to use the trim whitespace for free

  1. 1Paste your text.
  2. 2Choose to trim the start, the end, or both sides of each line.
  3. 3Copy or download the trimmed text.

Also useful for: trim whitespace, trim spaces each line, remove leading spaces, remove trailing spaces, strip whitespace online.

  • Completely free, no account needed
  • Your data never leaves your device
  • Works on desktop and mobile

Frequently asked questions

Is this whitespace trimmer free?+

Yes. Every tool on ToolInstant is free to use with no sign-up and no limits on how often you use it.

Is my data uploaded anywhere?+

No. Everything is processed inside your browser using JavaScript. Your input never leaves your device.

Does it work on mobile?+

Yes. ToolInstant works in any modern browser on phones, tablets and desktops.

Are spaces inside a line removed?+

No, only at the start and end of each line. To collapse double spaces inside lines, use Remove Extra Spaces.