Free Online Text Cleaner, Remove Extra Spaces and Hidden Characters
Tidy text that came from a document, a PDF or a web page. Collapse runs of spaces, trim the ends of lines, remove blank lines, replace curly quotes and long dashes with plain ones, and strip the invisible characters that break search and CSV files. Every change is counted.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Use Text Cleaner
Step by step, start to finish.
From a PDF, a Word document, an email or a web page. You can also drop a .txt file onto the box.
If there are invisible characters in the text, it says which ones and how many. That is often the whole answer.
The space and line rules are on by default because they are nearly always wanted. Quotes, accents and the ASCII rule are off, because they change meaning.
Take the result with the copy button, or save it as a .txt file. The original is still in the left box if you want to try different switches.
Key Features
What this tool does, and what it does not do.
Zero width spaces, non breaking spaces, soft hyphens, byte order marks and the narrow spaces that break numbers.
Nothing is forced. Turn off the rules you do not want and the text is left exactly as it was in that respect.
Leave them, allow at most one in a row, or remove them all, plus a separate trim of the top and bottom.
Curly quotes, long dashes and ellipsis characters become the plain ones that code, CSV and old systems expect.
Characters in, characters out and the difference, so you can see how much was actually wrong.
Text that needs cleaning is often text that should not be uploaded. This page never receives it.
About Text Cleaner
Text that was written somewhere else arrives with things in it that nobody typed. A PDF puts soft hyphens where words were broken across lines. A word processor turns straight quotes into curly ones and two hyphens into a dash. A web page inserts zero width spaces so that long words can wrap. None of it is visible, and all of it causes trouble the moment the text is searched, sorted, imported or compared.
This page collects the fixes in one place and keeps each one separate. The spacing rules are on by default because almost everyone wants them; the rules that change meaning, such as flattening accents or forcing plain ASCII, start off. That split is deliberate: a cleaner that quietly removes accents from names is worse than no cleaner at all.
The part people find most useful is not the cleaning but the report. Before anything is removed, the page says which invisible characters it found and how many. That turns "the spreadsheet will not add up this column" into "the export is putting narrow spaces inside the numbers", which is something you can go and fix at the source.
Frequently Asked Questions
Common questions about this tool.