Text tool
Remove Extra Spaces
Turn repeated spaces into one space and trim each line.
Extra spaces inside a line are always cleaned. Turn this on when empty lines should disappear too.
Tip: press Ctrl+Enter (or ⌘+Enter) to run from a text box.
Result will show here after you run the tool.
How to remove extra spaces
- Paste the text.
- Click Clean spaces.
- Copy the tidied text.
Repeated spaces and tabs on a line become one space. Each line is trimmed, and three or more blank lines become one blank line.
Frequently asked questions
Are single spaces kept?
Yes. Only repeated spaces and tabs are collapsed, and the ends of each line are trimmed.
Is the text uploaded?
No. Cleaning runs in your browser.
Related text tools
Keep working without leaving the site.
Word counter
Count words, characters, lines, and sentences.
Open toolSlug generator
Turn a title into a lowercase hyphenated slug.
Open toolSort lines
Put each line into alphabetical order.
Open toolFind and replace
Replace every match, or use a regular expression.
Open toolShuffle lines
Reorder a list at random, or pick one line.
Open toolRemove line breaks
Join wrapped lines and keep a gap between paragraphs.
Open tool