Remove Extra Spaces: clean up messy text in one click. Collapse double spaces, trim the spaces at the start and end of every line, and delete blank lines, all at once. This free tool works entirely in your browser, and nothing you paste is uploaded or saved. If the same line appears more than once, remove the repeats first with the Remove Duplicate Lines tool.
How this tool works: paste your messy text, and the tool reads it line by line. It turns every run of spaces and tabs into a single space, trims each line, and drops lines that are empty. You can switch each step on or off, so the result looks exactly the way you want it.
Paste some text above. The clean text appears in the result box below.
How to Use the Remove Extra Spaces Tool
- Paste your messy text into the box above.
- Choose which steps to use: collapse spaces, trim lines, and remove blank lines.
- Click Clean up my text.
- Read the report to see how many extra characters were removed.
- Click Copy clean text to copy the result, or use Try a sample and Clear to start over.
When to Remove Extra Spaces
- Text copied from a PDF often has extra spaces and line breaks.
- Text pasted from emails and chats can have ragged spacing and blank lines.
- Lists copied from a spreadsheet or a web page often need a tidy-up before use.
- Drafts and notes written quickly are easier to read once the spacing is even.
Frequently Asked Questions
What counts as an extra space?
An extra space is any space that is not needed: two or more spaces in a row, spaces at the start or end of a line, and whole blank lines. Tabs count as spaces too.
Will it delete the single spaces between my words?
No. A single space between two words is kept. Only runs of two or more spaces are collapsed into one.
What happens to blank lines?
Blank lines are removed when the remove blank lines option is on. Turn it off if you want blank lines to stay, for example between paragraphs.
Does this tool save my text?
No. Everything runs in your browser. Your text is never saved, uploaded, or sent anywhere.
Disclaimer: this tool only changes spacing. It does not change words, punctuation or spelling, so always proofread the result before you use it. To change a word throughout the text, use the Find & Replace Text tool.
More free tools: browse all tools, or try our Remove Duplicate Lines tool to remove repeated lines.