Tolinx · text
Whitespace Cleaner
Trim whitespace and clean text.
Remove every extra space, trim edges, or collapse duplicates before publishing.
The whitespace cleaner brings order to messy drafts. Choose between three modes: remove every space, trim only the beginning and end of each line, or collapse repeated spaces while keeping single separators. It handles both regular and non-breaking spaces, plus full-width characters often found in multilingual content.
The processor keeps line breaks intact and reports how many characters were removed during the pass. That makes it easy to document what changed when collaborating with editors or developers. Since all logic runs locally, you can safely clean keys, API payloads, or unreleased copy.
Suggested links show how to continue the workflow: deduplicate, count words, or validate JSON immediately after pruning whitespace so your final output stays consistent.
Clean result
How to use
Paste your text into the editor and select the mode you want to apply. Press “Clean text” to generate a tidy version with preserved line breaks. You can run multiple passes with different modes on the same text without reloading the page.
Copy the result into your clipboard or push it directly into the next Tolinx.dev tool. The cleaner never touches tabs or newline characters unless you collapse duplicates, so script structure remains unchanged.
FAQ
Does it affect tabs or newline characters?
No. We only target space characters. Tabs and newlines remain untouched unless they appear repeatedly and you have selected the collapse option.
Will full-width spaces be trimmed?
Yes. The cleaner normalizes standard, full-width, and non-breaking spaces to guarantee consistent results.
Usage ideas
CMS hygiene
Clean double spaces before pasting long-form articles into a content management system.
Data preparation
Normalize JSON strings or API payloads before sending them to another validation step.
Sample input
Tolinx.dev focuses on browser-only utilities.