Remove extra spaces
Replaces runs of spaces and tabs with a single space and trims spaces at the start and end of each line. Line breaks stay where they are.
How it works
- Paste the text or load a text file.
- Decide whether indentation at line starts should be removed or kept.
- Copy the result or download it as a .txt file.
Works well for
- Text with double spaces after sentences or between words
- Copied text full of non-breaking and other Unicode spaces
- Lines with trailing spaces before the line break
- Preparing text for word counts, imports or comparisons
Limitations
- Tabs count as spaces, so tab-separated data (TSV) turns into space-separated text.
- Columns aligned with spaces lose their alignment.
- Indentation is removed by default – switch that off for code, Markdown or nested lists.
- Line breaks are not touched – use Remove line breaks to join lines.
Frequently asked questions
Which characters count as spaces?
Normal spaces, tabs, non-breaking spaces and the other Unicode space characters. Each run of them inside a line becomes one normal space.
Can I keep indentation?
Yes. Turn off trimming at line starts and indentation stays, while double spaces inside lines and spaces at line ends are still removed.
Is my text uploaded?
No. The cleanup runs in your browser and the text is never sent to a server.
Is there a limit?
Up to 1 MB of text without an account, 2 MB with a free account and 10 MB with Pro.