Text tools
Clean pasted text safely
Remove accidental spacing while retaining intentional formatting.
1. Keep the original
Make a scratch copy first. Indentation and line breaks may carry meaning in code, lists or poetry.
2. Choose a narrow transform
Trim edges or individual lines if that is the problem. Collapse whitespace only where line breaks do not matter.
3. Review
Compare both versions, especially paragraphs and indentation. Do not apply the same transform blindly to code blocks.
4. Paste and verify
Reopen the destination and check line breaks and special characters. Repeat only when needed.
Preserve deliberate line breaks
Paste a scratch copy of a title with extra leading and trailing spaces, followed by a second line. Run Trim text and compare the output; edge trimming should not silently join the two interior lines. Use the separate Trim each line utility only when line-edge spaces are unwanted.
Common pitfall
Whitespace can be significant in source code, poetry, tables and identifiers. Keep the original and choose the narrowest transformation; don't use global whitespace collapse on a structured document.