webutilkit

Whitespace & Line Ending Cleaner

Normalize line endings, strip trailing whitespace, and collapse extra blank lines, in your browser.

Cleaned text

How it works

Each cleanup step runs as its own pass: line endings are normalized to LF first, then trailing whitespace, then repeated spaces if enabled, then runs of three or more blank lines are collapsed to one, and finally the whole document is trimmed.

Why line endings differ at all

Windows writes newlines as CRLF (\r\n), while Unix, Linux, and macOS use LF (\n) alone. Mixed line endings in one file can confuse diff tools and some editors, so normalizing to one style before pasting text elsewhere avoids spurious changes.

What is left alone

Leading indentation is preserved, since removing it would break code and nested lists. Collapsing repeated spaces is off by default for the same reason — it is only safe for prose, not for anything indentation-sensitive.

Frequently asked questions

What counts as a line ending to normalize?

Windows-style CRLF and old Mac-style CR line endings are both converted to the Unix-style LF that most tools, including this site, expect.

Does this remove leading indentation?

No. Only trailing whitespace at the end of each line is removed by default; leading indentation is left intact so code and nested lists keep their structure.