Clean Text
Text pasted from documents and websites often carries invisible characters and odd spacing. This tool removes them in one pass, with each step switchable.
Your text stays in this browser tab. Nothing is uploaded, saved or logged.
How the Clean Text works
Steps run in this order: optional HTML stripping (tags, scripts and comments removed, entities like & decoded once), optional conversion of curly quotes, en and em dashes and the ellipsis character to plain ASCII, removal of control characters other than tab and line break, then whitespace clean-up.
Whitespace clean-up converts non-breaking, thin and other special spaces to ordinary spaces; deletes invisible characters (zero-width space, word joiner, soft hyphen and the byte-order mark); collapses repeated spaces; trims each line; limits blank lines to one in a row; and normalises line endings.
Joiners used by emoji and by Persian, Indic and other scripts (zero-width joiner and non-joiner) are deliberately kept, because removing them would change how those texts display. Straightening punctuation is off by default, since curly quotes and dashes are correct typography in published writing.
How to use it
- Paste your text.
- Switch on only the clean-up steps you need.
- Copy the cleaned result.
Example
Straight quotes, no hidden characters, no tags and a single blank line.
Input
“Smart” quotes and — dashes… <b>Bold</b> text
Result
"Smart" quotes and - dashes... Bold text
Frequently asked questions
Why does text copied from a website have weird gaps?
Websites use non-breaking spaces and zero-width characters for layout. They look like normal spaces but behave differently when searching or comparing. Clean Text converts or removes them.
Will it remove formatting like bold or fonts?
Plain text has no formatting, so pasting into the box already drops it. HTML tags in the text itself can be removed with the HTML option.
Is it safe to strip HTML with this tool?
It is for cleaning text for reading or analysis, not for security. Do not rely on it to sanitise untrusted HTML before displaying it on a website.