Remove Extra Spaces

Collapse double spaces, trim lines and turn tabs into spaces.

Original

0 chars

Result

Runs on this device. Nothing is uploaded.

About the Remove Extra Spaces

Clean up spacing left by copy and paste, old typing habits or exported data. Collapse runs of spaces into one, trim the start and end of every line, turn tabs into spaces and squeeze extra blank lines, with each step on its own switch. Non-breaking spaces, which look like spaces but are not, are treated as spaces too.

How to use it

  1. Paste your text.
  2. Choose which kinds of space to fix.
  3. Copy the cleaned text.

Example

Input
Two spaces here. Tabs too.
Result
Two spaces here. Tabs too.

Questions

Will it remove the line breaks too?

No. Line breaks are kept. To join lines, use Remove Line Breaks, or send the result there.

What is a non-breaking space?

A space character (U+00A0) that stops a line from wrapping. Word processors and web pages insert it, and it breaks searches and comparisons because it is not a normal space.

Does it change indentation in code?

Trim each line removes leading spaces, which removes indentation. Switch it off to keep indentation and only collapse spaces.

Related tools