Text

Collapse Whitespace

Collapse runs of whitespace.

How to use Collapse Whitespace

Collapse Whitespace — Replace runs of whitespace with a single space and trim the ends. Free to use in D2i DevTools — no account required.

Steps

  1. Fill in Input. This field is required.
  2. Click Run and copy the result under the form.

Frequently asked questions

What is Collapse Whitespace used for?

Use it to turn a wrapped paragraph or a column of words into one even line of words.

How do I use the free online Collapse Whitespace tool?

Fill in Input. This field is required. Click Run and copy the result under the form.

What can I paste or upload into Collapse Whitespace?

Paste the text. Spaces, tabs, and newlines all count as whitespace.

What output does Collapse Whitespace give me?

Words separated by single spaces. Line breaks are not preserved.

Is Collapse Whitespace free, and is my input private?

Yes — Your input is processed in memory for this request only. It is not saved to disk or the database, and it is cleared after the tool finishes.

How is this different from Trim Space?

Trim Space only clears the ends. Collapse Whitespace also shrinks interior gaps and joins lines.

Inputs are processed in memory only and are not saved to disk or the database. Data exists only for the duration of your request.