Text Cleaner
Paste text that came out of a word processor, a PDF or a web page and take out something you can safely put somewhere else. Tick only the fixes you want; nothing is applied that you did not ask for.
Press Esc to clear
Cleaned text
What to fix
About the Text Cleaner
Text picks things up as it travels. Copy a paragraph out of a word processor and you get curly quotation marks and en dashes that break a CSV import. Copy it out of a PDF and you get a line break at the end of every visual line rather than every paragraph. Copy it out of a web page and you get the markup, the non-breaking spaces, and often a zero-width character or two that someone used for tracking. All of it looks fine on screen and none of it survives contact with a database, a code file or a plain-text field.
The most valuable option here is the one you cannot see the effect of. Zero-width spaces, soft hyphens, byte order marks and bidirectional overrides render as nothing at all, so text containing them looks identical to text that does not. They are why a string comparison fails against two values that appear the same, why a search finds nothing, and why a password field rejects something you copied correctly. Removing invisible characters is usually the fix for a problem that otherwise has no visible cause.
Smart character replacement swaps typographic punctuation for the ASCII equivalents: curly quotes become straight ones, em and en dashes become hyphens, and an ellipsis character becomes three full stops. That is the right move for code, filenames and anything headed into a system that predates Unicode, and the wrong move for prose you are about to publish — so it is a choice rather than a default.
Each fix is independent and applied in a fixed order, so the result is predictable and repeatable. Everything runs in your browser; the text is never uploaded.
Frequently asked questions
What are invisible characters and why do they matter?
Zero-width spaces, soft hyphens and byte order marks render as nothing, so text containing them looks identical to text that does not. They cause string comparisons to fail and searches to find nothing, with no visible cause. Removing them is often the fix for a problem you cannot otherwise see.
Will this ruin my quotation marks?
Only if you ask it to. Smart character replacement is a separate option. Leave it off and curly quotes, dashes and ellipses are preserved exactly as they are.
Does the order of the fixes matter?
Yes, and it is fixed for that reason. HTML is stripped first so the line breaks left behind by block tags can then be collapsed. Doing it the other way round leaves a page full of blank lines.
You might also need
- Text
Word & Character Counter
Count words, characters, sentences and reading time as you type. Nothing is uploaded.
- Text
Sort & Dedupe Lines
Sort, deduplicate, shuffle, reverse and number a list of lines, with natural number ordering.
- Text
Bulk Find & Replace
Apply a list of find-and-replace rules in order, as plain text or regular expressions.
- Text
Diff Checker
Compare two blocks of text and see exactly what changed, by line or by word.
- Text
Slug Generator
Turn titles into clean URL slugs, with real transliteration for accented and Cyrillic text.
- Text
Markdown Table Builder
Build a Markdown table in a grid, or paste CSV and spreadsheet data and get one out.
- Developer
Encoding Playground
ROT13, Morse, binary, hex, NATO alphabet, leetspeak and reversed text, all at once.