Whitespace Remover
Cleans text by trimming, collapsing, joining, or removing whitespace.
Run one or more find and replace rules on text in your browser. Use plain text for simple changes or regular expressions when you need capture groups and pattern matching.
Match preview
| Rule | Matches |
|---|
Preview counts update as you edit the rules. Rules run top to bottom.
Plain-text rules look for the exact text you enter. Regex rules use the browser's regular expression engine, so you can match patterns and reuse captured parts in the replacement with values such as $1 and $2.
Rules run in order from top to bottom. That matters, because one rule can change the text that the next rule sees. A preview highlights what each rule will match before the output is rewritten. Empty-string patterns are refused, because they would match everywhere and create unusable results.
colour and replace with color.(\w+),(\w+) and replace with $2 $1 to turn Doe,Jane into Jane Doe.cat in The cat slept but leaves catalog alone.Yes. Switch a rule to regex mode, then use normal JavaScript-style regular expressions and capture groups like $1 in the replacement.
Whole word limits the match to standalone words, so replacing cat will not also change catalog.
Rules run one after another. If the first rule changes the text, the second rule works on that changed version, not the original.
Yes. The page highlights matches first so you can check the rule before you keep the output.
Often used together with the Find and Replace.
Cleans text by trimming, collapsing, joining, or removing whitespace.
Finds repeated lines, sentences, paragraphs, or words and shows where they appear.
Highlights regex matches live, lists capture groups and offsets, and previews replacements.