Text cleanup
Whitespace remover
Collapse runs of spaces, tidy line edges, or strip every space and newline — pick the mode that matches the mess.
Processed in your browser — nothing is uploaded
Pasted from a PDF, a spreadsheet, or a chat thread, text arrives with extra air. Collapse is the default. Strip-all is there for when you need a single token, not a paragraph.
If you are preparing a permalink, continue to Slugify. If you need to target a specific phrase, use Find and replace.
Last reviewed 2026-09-10.
FAQ
Questions, answered
What does collapse do?
Runs of spaces and tabs become a single space. More than two blank lines collapse to one. Leading and trailing padding is trimmed.
What does trim lines do?
Each line is trimmed and internal space on that line is collapsed, without joining separate paragraphs into one line.
What does strip all do?
Every whitespace character — spaces, tabs, and newlines — is removed. Use it when you need a compact token.
Will it change non-breaking spaces?
Any Unicode whitespace matching JavaScript \s is treated as space, including non-breaking spaces.
Related
Keep going
Text cleanup
Remove line breaks
Join wrapped lines with a space, comma, pipe, or custom separator.
Text cleanup
Find & replace
Find and replace text or regular expressions with a live match count.
Case & naming
Slugify
URL slug generator and bulk slug generator. SEO-friendly slugs, including Arabic. Custom handles in your browser.