Remove Extra Spaces

Collapse double spaces, stray tabs and blank lines.

Runs in your browser Text Tools Free · No account

Input

Processed locally

This tool runs entirely in your browser. The data you paste or load is never uploaded.

Result

Enter your input, then run the tool.

About this tool

Cleans pasted text by collapsing repeated spaces, removing leading and trailing whitespace on each line, converting tabs, and optionally dropping blank lines. Useful before publishing a draft copied from a PDF.

How to use it

  1. Paste the text.
  2. Tick the clean-up rules you need.
  3. Press Clean text and copy the result.

Frequently asked questions

Will it change indentation in code?
It will, because leading spaces are removed when trimming is enabled. Disable trimming when cleaning source code.
What about non-breaking spaces?
They are normalised to regular spaces when “Include non-breaking spaces” is enabled, which fixes copy-pasted web content.

Keep going

More in this category