● cleaned entirely in your browser

Whitespace & text cleaner

Paste messy text — remove extra spaces, blank lines, tabs, or trailing whitespace.

How it works

Clicking Clean runs your text through up to four regex passes in a fixed order — tabs to 4 spaces, per-line leading/trailing trim, runs of 2+ spaces or tabs collapsed to one, and runs of 3+ newlines collapsed to two — using only whichever checkboxes are ticked.

FAQ

Why does the order of the checkboxes matter?
The tool applies them in a fixed sequence — tabs converted to spaces first, then trimming leading and trailing whitespace per line, then collapsing multiple spaces, then collapsing blank lines — so a stray tab gets converted before the space-collapsing step ever sees it.
Does collapsing blank lines remove a single blank line between paragraphs?
No — it only collapses three or more consecutive newlines down to two, so one blank line separating paragraphs is left untouched.

Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.

Say thanks — $3