← All free tools

Collapse Whitespace

collapse repeated whitespace into single spaces

Source

Empty

Result
Example output:
a b c

Empty

About this tool

Collapse Whitespace replaces runs of whitespace with one space and trims the result. Line breaks and tabs are flattened along with repeated spaces.

Inputs, results and saved preferences stay in this browser.

When to use it

  • Turn copied multiline prose into a single line.
  • Clean up spacing in a label or search phrase.

Examples

Questions