Remove Extra Spaces
Clean up double spaces, tabs and stray blank lines.
Your text stays in your browser. Nothing is uploaded.
More Text Tools
All tools- Remove line breaksJoin lines into one paragraph
- Remove empty linesDelete blank lines from text
- Remove duplicate linesKeep only unique lines in a list
- Find and replaceReplace words, with regex support
- Word counterCount words, characters and reading time
- Character counterCharacters with and without spaces
- Case converterUpper, lower, title, sentence case and more
- Text compareFind the differences between two texts
- Title case converterHeadlines in AP or Chicago style
How to use the remove extra spaces
Three steps, all in your browser.
- 1
Add your text
Type, paste or open a .txt file. Press Sample to try an example.
- 2
Choose what to fix
Switch options on or off. The cleaned text updates as you go.
- 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.