Whitespace Cleaner
Trims trailing spaces, collapses runs of blanks, converts tabs and removes empty lines.
Trims trailing spaces, collapses repeated blank lines, converts tabs, and removes the invisible characters that come along with a copy-paste. Those last ones are the reason two identical-looking strings compare unequal in a spreadsheet.
Text
Clean
Result
Characters in
44
Characters out
39
Removed
5
How to use it
Paste the text as it is
A warning appears above the options if there are invisible characters in it, with a count — that alone is often the whole answer to why something is not matching.
Pick what to clean
Trailing spaces and blank-line collapsing are safe on anything. Collapsing repeated spaces is not: it is applied only after the indentation at the start of a line, so code and nested lists survive.
Check the character count
The in, out and removed figures tell you how much came off. A large removal on text that looked clean means it was full of invisible characters, and a negative figure means the cleanup split something — an emoji held together by joiners counts as one character before and several after.
Common questions
What counts as an invisible character?
Zero-width spaces, the byte-order mark, soft hyphens and the like — characters that render as nothing and survive a copy-paste, then break search, comparison and spreadsheet keys. Non-breaking spaces are left alone here, because those are usually deliberate typography.
Will collapsing spaces ruin my code?
The indentation is preserved — collapsing only applies after the first non-space character of a line. Alignment inside a line, such as a column of comments, does not survive, so leave the option off for code you care about.
Should I use this or the invisible-character tool?
This one for a quick clean-up of ordinary text. The invisible-character tool when you need to know exactly what is in there — it names each character, says what it is for, and points at where in the text it sits.
Feed it from
Line Wrapper
Hard-wraps text at a column width, or unwraps it back into single-line paragraphs.
Line Break Remover
Joins broken lines back into paragraphs, keeping blank-line boundaries intact.
Invisible Character Remover
Finds and strips zero-width spaces, BOMs, soft hyphens and bidi controls hidden in pasted text.
Case Converter
Converts between UPPER, lower, Title, Sentence, camelCase, snake_case, kebab-case and CONSTANT_CASE.
Next
These accept what this tool produces, so the result can go straight in.
Line Break Remover
Joins broken lines back into paragraphs, keeping blank-line boundaries intact.
Duplicate Line Remover
Removes duplicate lines, keeps only duplicates, or counts how many times each line appeared.
Unicode Normaliser
Applies NFC, NFD, NFKC or NFKD — the fix for Korean text from macOS that looks right but never matches.
Invisible Character Remover
Finds and strips zero-width spaces, BOMs, soft hyphens and bidi controls hidden in pasted text.
Find & Replace
Replaces text by literal, whole word or regular expression, with capture groups and a preview of every hit.
Markdown Editor
Edits Markdown with a live preview and exports the rendered HTML, with GFM tables and task lists.