Collapse whitespace by replacing every run of whitespace characters (spaces, tabs, newlines) with a single ASCII space. Useful after copying from PDFs or web pages where invisible spacing is inconsistent.
When to use it
- Normalize user input before comparison or hashing
- Clean prose before word-count or readability metrics
- Prepare text for single-line display without removing words
Limitations
Does not trim leading or trailing spaces on the whole string beyond what the regex pass achieves. Does not convert non-breaking spaces (U+00A0) unless they match the whitespace class used.
Example
For example, enter the default sample values on the form and compare the output with a known reference; adjust one input at a time to see how the result changes.
Notes
This guide summarizes the behavior of the text/collapse whitespace tool on Tool Plaza. Processing runs locally in your browser unless the tool explicitly calls a server action.