Free online text tool

Remove Extra Spaces

Remove Extra Spaces turns double spaces and other extra spaces into a single space. Paste your text, click the button and copy the result. It is free and runs in your browser.

Remove Unwanted Spaces Tool

0Character Count
0Character Count (without spaces)
0Word Count
0Sentence Count
0Paragraph Count
0Line Count

Remove Extra Spaces Example

Before
The truth        is that you pay for            your lifestyle in          hours.
After
The truth is that you pay for your lifestyle in hours.

Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.

Suggest a New ToolProvide Feedback on This Tool

What does Remove Extra Spaces do?

This tool replaces every run of extra spaces with a single space. Double spaces, triple spaces and longer gaps between words all become one space.

Your lines are not joined and empty lines stay. By default the spaces at the start and end of each line are removed too. Untick that option to keep them. Two or more tabs or non-breaking spaces in a row also become one space.

When you are working with a long document, it can take a long time to find and remove extra spaces by hand. Use this tool for text copied from PDFs, websites or emails, and for text typed with double spaces after periods.

Remove extra spaces examples

Each example shows the text before and after. The option to remove spaces at the start and end of each line is on unless the example says otherwise.

CaseBeforeAfter
Example
The truth        is that you pay for            your lifestyle in          hours.
The truth is that you pay for your lifestyle in hours.
Several lines
a   b
c    d
a b
c d
Spaces at the start and end (option on)
   hello   world   
  next  line  
hello world
next line
Spaces at the start and end (option off)
   hello   world   
 hello world 
Tabs and spaces together
a		b  	 c
a b c
A single tab is kept
a	b
a	b
Empty lines are kept
a  b

c   d
a b

c d
No extra spaces
one two three
one two three

How to remove extra spaces

  1. 1
    Add your text
    Paste your text into the box, or import a text file.
  2. 2
    Choose the option
    Leave Remove spaces at the start and end of each line ticked to trim every line, or untick it to keep them.
  3. 3
    Click Remove Extra Spaces
    The extra spaces are removed. Use Undo if you change your mind.
  4. 4
    Copy it
    Click Copy and paste the result where you need it.

When to remove extra spaces

Good for

Cleaning text copied from PDFs, websites and emails, fixing double spaces after periods, and tidying text before you publish it.

Check first

One space between words is kept. Your lines are not joined and empty lines stay. A single tab between words is left as it is. The result replaces your text, so use Undo if you need the original.

Other tools

To remove every space try Remove Spaces. To remove empty lines try Remove Empty Lines. To join all lines into one try Remove Line Breaks.

Remove extra spaces FAQ

What does the Remove Extra Spaces tool do?

It replaces every run of two or more spaces with a single space, so double spaces and other extra spaces between words are removed. Your lines stay as they are.

How do I remove extra spaces?

Paste your text into the box and click Remove Extra Spaces. The extra spaces are removed. Click Copy to use the result, or Undo to go back.

Does it remove double spaces?

Yes. Two, three or more spaces in a row all become one space.

What about spaces at the start and end of a line?

By default they are removed. Untick Remove spaces at the start and end of each line if you want to keep them. Then a run of spaces at the start or end of a line is reduced to one space.

Does it join my lines together?

No. Every line stays on its own line and empty lines stay too. To remove empty lines use Remove Empty Lines. To join the lines use Remove Line Breaks.

What about tabs and non-breaking spaces?

Two or more spaces, tabs or non-breaking spaces in a row are replaced with one normal space. A single tab between two words is left as it is.

Does it remove all spaces?

No. It keeps one space between words. To remove every space use Remove Spaces.

What if there are no extra spaces?

Your text is left as it is and you see the message No extra spaces found.

Is this tool free and is my text private?

Yes. It is free, needs no account and runs in your browser, so your text is not uploaded to a server.

Looking for more text tools?

Browse Remove Tools

Last updated: 11 November 2026