CalcTimer

Remove Extra Spaces

Reduces runs of repeated spaces to a single space.

How to use the Remove Extra Spaces

  1. Paste the text with uneven spacing into the input box on this page.
  2. The output box updates as you type, each run of whitespace becoming one space.
  3. Whitespace at the very start and end of the text is trimmed away.
  4. Press the copy button to take the tidied text with you.

Line breaks count as whitespace and disappear

A run of whitespace means spaces, tabs and line breaks alike, so text pasted with hard wraps comes back as one line and a tab-separated table loses its columns.

The invisible spaces word processors leave behind

The rule also catches characters that look like a space without being one, which is what usually defeats a find and replace after a paste from a PDF or a document.

CharacterResult
TabOne space
Line breakOne space
Non-breaking spaceOne space
Ideographic spaceOne space

Frequently asked questions

Can it strip every space?

It collapses repeated spaces rather than removing them all, so words stay separated.

Does it remove line breaks?

Yes, it does. Line breaks are whitespace, so several lines come back as one line with single spaces between them.

Why did my paragraphs merge into one line?

Because line breaks are whitespace, and any run of it collapses into a single space. Paragraph gaps go the same way.

Does it delete the indentation at the start of lines?

Yes, in effect. Indentation sits beside the line break before it, and the two collapse together into one space.

Are double spaces after a full stop reduced?

Yes. Two spaces after a sentence become one, which is what current style guides ask for. The full stop is untouched.