Text cleaner
Text copied from web pages, chats, PDFs and word processors often carries things you cannot see. Choose the clean-ups you want, and the cleaned text appears at once together with a count of what was removed or replaced.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Paste your text. The cleaned version appears next to it as you type.
- Switch the options on or off. Everything is on by default except HTML stripping.
- Read the line under the result: it counts removed and replaced characters. Copy the output.
How it works
The options run in a fixed order: HTML tags, invisible characters, quotes and dashes, special spaces, NFC normalization, then trailing spaces and blank lines. Line breaks are changed to a plain line feed. Special spaces are the no-break space, the fixed-width spaces U+2000 to U+200A, the narrow no-break space, the medium mathematical space and the ideographic space.
Worked example
“He said “yes” – twice…” with a hidden zero-width space after “said” becomes: He said “yes” - twice… The summary reports one removed character and four replaced ones: two curly quotes, the dash and the ellipsis.
Tips
Run this before pasting into code, spreadsheets, a command line or a CMS, where an invisible character can break a match or a number. If you only need to know which unusual character is in a text, look it up in the Unicode lookup tool.
Frequently asked questions
Which invisible characters are removed?
The zero-width space, zero-width non-joiner, word joiner and the invisible math operators U+2061 to U+2064, the left-to-right and right-to-left marks, the bidirectional embedding, override and isolate controls, the soft hyphen, the Mongolian vowel separator and the byte-order mark (U+FEFF). A zero-width joiner is removed too, except inside an emoji sequence, where it holds the emoji together.
Will cleaning break text in Persian, Arabic or Indic scripts?
It can. Zero-width non-joiners and joiners, and the direction marks, are real parts of spelling and layout in some scripts. Switch off the invisible-characters option for text in those languages.
Exactly how are quotes and dashes changed?
Curly single quotes and primes become an apostrophe (U+0027), curly double quotes become a straight double quote, en dash, figure dash, hyphen variants and the minus sign become a hyphen, the em dash and horizontal bar become two hyphens, and the ellipsis character becomes three dots.
What does Normalize to NFC do?
It joins a letter and its separate combining accent into one precomposed character where one exists, so "e" followed by U+0301 becomes "é". The text looks the same but compares and searches reliably.
Does stripping HTML decode entities?
No. Tags and comments are deleted, but entities such as & stay as they are. Text like "a < b" is kept because a tag must start with a letter or a slash after the angle bracket.