How to remove extra spaces
- Paste your text into the box.
- Keep the options you need switched on: Collapse repeated spaces, Trim spaces at line ends, Turn tabs into spaces, and optionally Remove blank lines.
- Check the Characters removed tile.
- Copy the cleaned text, or download it.
When it helps
Extra spaces creep in when you copy from PDFs, web pages, spreadsheets and chat apps. They make text look uneven, break exact matching in spreadsheets and databases, and inflate character counts. Typing two spaces after a full stop, an old typing habit, is another common source.
The tool works line by line. It first turns tabs into single spaces if you ask for that, then shrinks every run of two or more spaces, including non-breaking spaces, down to one. Finally it trims spaces from the start and end of each line. Your line breaks and their style are kept, so a file keeps its Windows or Mac format.
Remove blank lines goes one step further and drops lines that are empty or hold only spaces. This is useful for lists, but it also removes the gaps between paragraphs, so leave it off for normal writing.
Tips
- If the text still has odd breaks in the middle of sentences, use remove line breaks.
- Matching names and emails exactly? Clean spaces first, then use remove duplicate lines.
- Changed your mind about a result? Paste the before and after into the text diff checker to review each change.
- Capital letters look off too? Fix them with the case converter.
Good to know
Spaces are only changed within a line. A space between two words is never removed completely, only shortened to one. Non-breaking spaces from web pages are treated like normal spaces when collapsing. Other kinds of space, such as the wide space used in Chinese and Japanese text, are left alone, because they are often written on purpose.
Privacy
Your text is processed on your device. It is not uploaded, saved on a server, or added to the page address.