← All tools
Text cleanup
Collapse whitespace
Replace runs of whitespace including line breaks with one space.
Input
Runs entirely in your browser. Input is not uploaded.
Output
Live resultHello world again
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 spaces per lineCollapse spaces and tabs while retaining line boundaries.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.