Skip to content

Remove Extra Spaces

Clean up double spaces, tabs and stray blank lines.

How to use the remove extra spaces

Three steps, all in your browser.

  1. 1

    Add your text

    Type, paste or open a .txt file. Press Sample to try an example.

  2. 2

    Choose what to fix

    Switch options on or off. The cleaned text updates as you go.

  3. 3

    Copy or download

    Copy the result in one click or save it as a .txt file.

Remove Extra Spaces: what to know

Remove Extra Spaces tidies the whitespace in copied text. Runs of spaces become a single space, tabs become spaces, spaces at the start and end of lines are trimmed, a space before a comma, period or other punctuation mark is removed, and several blank lines in a row are reduced to one.

Non-breaking spaces and other Unicode spaces, which often come along when copying from web pages, PDFs and word processors, are treated like ordinary spaces, so they're cleaned up too.

Each step is a separate option. Keep tabs when cleaning tab-separated data, and keep line indentation when tidying code or poetry.

Popular uses

  • Cleaning text copied from PDFs and websites
  • Removing double spaces after periods
  • Tidying data before pasting into a spreadsheet
  • Fixing spacing in documents edited by several people

Tips for the best result

  • Switch off 'Turn tabs into spaces' for tab-separated data you'll paste into a spreadsheet.
  • Switch off 'Trim lines' to keep indentation in code or lists.
  • Use Remove Line Breaks afterwards if lines are also broken in the middle of sentences.

Read how JustYourText works and our privacy details. Text you type or paste is processed in your browser and is never sent to our server.

Frequently asked questions

Runs of spaces become one space, spaces at the start and end of lines are trimmed, a space before a comma or period is removed, and several blank lines in a row become one. Each step can be switched off.

Yes. Non-breaking spaces and other Unicode spaces, often found in text copied from web pages and PDFs, are treated like normal spaces.

No. Every tool runs in your browser, so the text you type or paste is processed on your device and is not sent to our server or stored. Reloading or closing the page clears it.

Yes. Every tool is free with no sign-up and no limits on use. Clearly labeled ads keep it that way.

Yes. The tools work in any modern browser on phones, tablets and computers. Copy and Download work on mobile too.