Remove Extra Spaces

Paste text and every run of two or more spaces between words becomes a single space, as you type. Spaces before a comma, full stop or question mark are removed and spaces at the end of a line go too. Tick tabs to treat tabs and non-breaking spaces the same way, or keep indentation for code and lists.

What to do
Your text
Result
Lines in
0
Lines out
0
Blank lines in
0
Longest line
0

Everything runs in your browser. What you type never leaves this device.

Features

  • Double, triple and longer runs of spaces become one

  • Removes the space before , . ; : ! and ?

  • Optionally treats tabs and non-breaking spaces as spaces

  • Keep indentation at the start of lines if you need it

  • Line breaks are kept

  • Copy or download the result

  • Runs in your browser: your text is never uploaded. Free, no signup

Typical fixes

Typed documents

Old habits of two spaces after a full stop, or spacing done with the space bar, tidied in one go.

Text from PDFs and OCR

Copies from PDFs and scanned text often have uneven gaps between words.

Forms and product listings

Clean titles and descriptions before pasting them into a marketplace or form that rejects odd spacing.

How spaces are tidied

Rules applied to each line

  • Two or more spaces in a row become one space.
  • A space before , . ; : ! or ? is removed, so "Hello , world" becomes "Hello, world".
  • Spaces at the end of a line are removed.
  • With Tabs and non-breaking spaces too, those count as spaces; without it, tabs stay as they are (useful for tab-separated data).
  • With Keep indentation, spaces at the start of each line are left alone.

What is not changed

Line breaks, words and punctuation stay. To remove blank lines as well, use Remove Empty Lines or the Text Cleaner.

Other line tools

Remove Extra Spaces - FAQ