Whitespace cleanup
Trim line edges, collapse repeated spaces and tabs, and tidy excessive blank lines. Clean copied text locally while retaining paragraph separation.
About Whitespace cleanup
Whitespace cleanup replaces runs of spaces, tabs and nonbreaking spaces within a line with one ordinary space, then trims line edges. It also limits consecutive newline runs and removes whitespace at the outer edges of the text.
It helps with prose copied from documents or web pages. It is deliberately destructive for indentation, so do not use it on Python, YAML, aligned tables or any file where whitespace has structural meaning.
How to use Whitespace cleanup
- Paste or open text with unwanted spacing.
- Keep Clean whitespace selected in the mode toolbar.
- Review indentation, paragraph breaks and any aligned columns in Output.
- Copy or download the cleaned result if the spacing is appropriate.
Features
- Collapses runs of spaces, tabs and nonbreaking spaces.
- Trims leading and trailing whitespace from every line.
- Reduces long runs of blank lines to a single blank-line gap.
- Retains normal line breaks and provides a side-by-side preview.
Common uses
- Tidying prose copied from a browser or document viewer.
- Removing accidental tabs in a plain-text label list.
- Standardizing spacing before a human comparison or deduplication.
Tips
- Always inspect copied tables and code before replacing the original with cleaned text.
Frequently asked questions
Will indentation be preserved?
No. Line edges are trimmed and runs of spaces or tabs collapse. Avoid this tool for indentation-sensitive code or structured data.
Does it join wrapped lines?
No. Existing newline characters remain, apart from long consecutive newline runs being shortened.
Does it remove all paragraph separation?
No. It keeps a normal blank-line paragraph gap while reducing longer runs. Use Remove empty lines to remove blank lines completely.
Is my text uploaded or saved?
The tool processes the text in this page, on your device. It does not send the input to a conversion service or save it to an account. Advertising and ordinary website requests are separate from this local text processing. Copy or download any result you want to keep before leaving the tool.
Is my input uploaded?
Tools run in your browser. Files, text and results are not uploaded to our servers and are cleared when you leave the tool.
Your privacy comes first
Tools run in your browser. Files, text and results are not uploaded to our servers and are cleared when you leave the tool.