Remove Extra Spaces
Collapse repeated spaces, trim the start and end of each line and optionally strip blank lines. It is handy for text copied from PDFs, emails and spreadsheets.
Words: 0Characters: 0Sentences: 0Lines: 0Reading time: –
Text case
For developers
Extra tools
Select formatting to remove
Result
Example
Before
This text has far too many spaces.
After
This text has far too many spaces.
How to use this tool
- Type or paste your text into the box above.
- Tick the formatting you want to remove, then click Remove selected.
- Copy the result, or save it to a file with Save.
Frequently asked questions
What counts as an extra space?
Two or more spaces or tabs in a row are collapsed into a single space. Line breaks are only touched when you tick Line breaks or Empty lines.
Can I also remove line breaks?
Yes. Tick Line breaks to join everything into one line, or Empty lines to delete blank lines but keep the others.