Handitab

Whitespace Remover

Remove extra spaces, tabs, and blank lines from text: collapse repeated spaces, trim line edges, or strip all whitespace entirely.

About Whitespace Remover

A whitespace remover is a tool that deletes unwanted spaces, tabs, and blank lines from text. The default mode collapses runs of spaces and tabs into one space, trims every line, and reduces three or more consecutive line breaks to a single blank line. Other modes trim line edges only, remove all spaces and tabs, remove every whitespace character including line breaks, or delete blank lines. Non-breaking spaces inside a line are only removed by the all-whitespace mode.

Also known as: Remove Extra Whitespaces, Multiple Whitespace Remover.

How to use Whitespace Remover

  1. Type or paste into the "Input text" box, or press "Use example" to try it with sample data.
  2. Set "What to remove" if the defaults do not fit.
  3. The result appears below and updates as you type.
  4. Copy the result with the copy button, or download it as a file where that is offered.

Questions about Whitespace Remover

How do I remove double spaces but keep single spaces between words?

Use the default mode, "Extra spaces and line edges". It replaces every run of spaces or tabs with one space and trims the start and end of each line, so normal word spacing stays intact.

Runs in your browser. Page last updated .

More text tools

All 56 text tools