Something wrong with this tool?
About TEXT Cleaner Online
This tool normalises messy text. It can collapse multiple spaces into one, strip leading/trailing whitespace from every line, remove empty lines, normalise line endings (CR, LF, CRLF), strip non-printable characters, and replace smart quotes with straight quotes — all in a single pass with the options you choose.
Useful when copy-pasting from a Word document or PDF where invisible formatting characters often hitchhike along, when normalising user-submitted form data, or when preparing text for diff comparisons that should ignore cosmetic differences.
Each option is independently toggleable so you can keep the cleanup conservative or aggressive depending on the source.
How to use this tool
How to normalise messy whitespace and control characters
Paste the text
Drop the source into the "Text" field. Typical inputs: copy-pasted PDF text with weird line wraps, web-scraped strings with non-breaking spaces, or messages full of zero-width characters used to hide trackers.
Press Run
Result returns a single `cleaned` field. Multiple consecutive spaces collapse to one; runs of newlines collapse to one blank line max; tabs become single spaces; zero-width and BOM characters disappear.
What gets touched and what doesn't
Letters, digits, regular punctuation, and Unicode beyond ASCII (like emoji and CJK characters) are left alone. Only whitespace, control codes, and invisible-format characters are normalised.
When NOT to run it
Source code with significant whitespace (YAML, Python, Markdown indentation) would be corrupted — tab → space changes meaning. CSV with empty fields could lose them if leading/trailing spaces matter. Diff or sample first.