Skip to content
hateitall

Remove Extra Spaces

Clean up text with double spaces after full stops, tabs between words or odd spaces from a PDF.

Processed locallyIn: Text, TXTOut: Text

Loading tool…

How to use remove extra spaces

  1. Paste your text.

  2. Choose whether tabs and no-break spaces count as spaces.

  3. Keep or drop indentation, and optionally remove spaces before punctuation.

  4. Copy or download the result.

What this tool does

  • Collapses any run of spaces into one, and optionally tabs too.
  • Turns no-break, thin and full-width spaces into normal ones.
  • Keeps indentation at the start of lines when you want it.
  • Optionally removes spaces before , . ; : ! ? and inside brackets.

How the result is verified

The result is cleaned a second time with the same options and must not change, which shows no double spaces are left.

Frequently asked questions

Will it remove the two spaces after a full stop?

Yes. Any run of two or more spaces becomes one, wherever it is.

Will it break the indentation of my code?

Not with Keep indentation on: the spaces at the start of each line are left exactly as they are, and only runs inside the line are collapsed.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Strip spaces and tabs from the start or end of every line

Text · TXT · CSV→ TextLight on device

Hidden characters, spaces, blank lines and quotes cleaned in one pass

Text · TXT→ TextLight on device

Delete blank lines, or keep one between paragraphs

Text · TXT→ TextLight on device

Curly quotes to straight, or straight to curly with sensible rules

Text · TXT→ TextLight on device