Skip to content

Trim Whitespace

Remove spaces and tabs at the start or end of each line

Runs on your device

How to use Trim Whitespace

  1. Type or paste your text into the box, or press Sample to see an example.

  2. Set the options: “Trim”, “Also non-breaking and other Unicode spaces” and “Also blank lines at the top and bottom”. Reset puts them back.

  3. The result updates as you go. Copy it or download it.

About Trim Whitespace

Remove spaces and tabs at the start or end of each line.

Trim Whitespace: common questions

Is Trim Whitespace free?

Yes. There's no sign-up, no limit on how often you use it and no watermark.

Is your text uploaded anywhere?

No. Trim Whitespace works on this device only, so your text stays private. You can even turn off the internet once the page is open.

What can I change?

3 settings, including “Trim”, “Also non-breaking and other Unicode spaces” and “Also blank lines at the top and bottom”. Every setting has a sensible default, and Reset puts them all back.

Does it work on a phone?

Yes, in any current browser on Android, iPhone, iPad and desktop.

More text tools

All 74 text tools