Skip to content

Remove duplicate spaces from text

Clean up repeated spaces and tabs in a text, leaving a single space between words. Very useful for text copied from a PDF or Word.

Processed on your device. Nothing is sent to any server.

Replaces any sequence of consecutive spaces or tabs with a single space, without touching line breaks.

Use cases

  • Cleaning text pasted from a PDF or Word document.
  • Normalizing data before importing it.
  • Preparing text for exact comparisons.

How it works

  1. 1

    Paste your text

    Type or paste the text with extra spaces on the left.

  2. 2

    Copy the result

    The cleaned text appears automatically on the right.

Technical details

  • Example: "Hello␣␣␣world" → "Hello world". A tab counts as a space, so "a⇥⇥b" becomes "a b".
  • Spaces at the start or end of a line are reduced to one, but not removed entirely.
  • The non-breaking space (which sometimes appears when pasting from Word or a web page) isn't a regular space and is left untouched.

Frequently asked questions

Does it also remove line breaks?

No, it only collapses spaces and tabs within a line. Use the dedicated tool to remove line breaks.

Does it help clean up text copied from a PDF?

Partly: it fixes double spaces. If the PDF also breaks sentences across lines, use the remove line breaks tool afterward.

← Text