← All tools
Text cleanup
Collapse spaces per line
Collapse spaces and tabs while retaining line boundaries.
Input
Runs entirely in your browser. Input is not uploaded.
Output
Live resultA B C D
How to use
Enter your text or numeric values. The result updates immediately. Copy the output or reset the example. Everything is computed locally in your browser.
Related tools
Trim textRemove whitespace only at the beginning and end of text.Trim each lineRemove surrounding whitespace from each line without dropping lines.Collapse whitespaceReplace runs of whitespace including line breaks with one space.Remove blank linesDrop empty or whitespace-only lines; keep other line content unchanged.Deduplicate linesKeep the first occurrence of each exact line.Sort linesSort lines lexicographically by Unicode code units, preserving duplicates.