What this tool cleans up
Remove or normalise the whitespace that sneaks into copied text: collapse runs of spaces into one, trim leading and trailing space from every line, delete all spaces, or strip tabs and line breaks entirely.
Trim, collapse or remove everything
The three operations fix different problems, and picking the right one matters:
- Trim removes only the space at the start and end of each line, which is what you want for pasted lists.
- Collapse replaces every run of spaces with a single space, which fixes text copied out of PDFs and web pages.
- Remove all deletes every space, which is useful when joining a code or removing spaces from an ID.
Frequently asked questions
What is the difference between trimming and collapsing spaces?
Trimming only removes whitespace at the beginning and end of a line. Collapsing finds runs of spaces inside the text and replaces them with a single space. Text with internal alignment usually needs collapsing, not trimming.
Can it remove line breaks as well as spaces?
Yes. There are separate actions for removing line breaks and for removing tabs, so you can flatten a wrapped paragraph without destroying anything else.
Will it break my code indentation?
It can, if you choose the wrong action. Removing all spaces or collapsing runs will destroy indentation in code or YAML. Use trim only when you need to clean up pasted code.
Is my text sent to a server?
No. All processing happens locally in your browser.