How to clean up pasted text
- Paste the messy text into the box above.
- Leave the character and spacing options ticked. They are safe for almost any text.
- Turn on URL or list-number removal only if you specifically want those gone.
- Check the message, which reports how many characters of junk were removed.
- Copy the cleaned text, or download it as a plain text file.
What gets cleaned
- Curly quotes and apostrophes converted to their straight equivalents.
- En dashes, em dashes and ellipsis characters converted to plain ASCII.
- Zero-width spaces, soft hyphens and byte order marks removed entirely.
- Non-breaking spaces converted to ordinary spaces.
- Tabs and runs of spaces collapsed, and trailing whitespace trimmed per line.
- Runs of three or more blank lines reduced to a single blank line.
The characters you cannot see
Text copied from a formatted source is rarely as plain as it looks. Word processors substitute curly quotes for straight ones as you type. Web pages use non-breaking spaces to control layout. PDFs insert soft hyphens at line breaks. Content management systems and translation tools scatter zero-width spaces around. None of it is visible, and all of it travels with the text.
Most of the time that is harmless. It stops being harmless the moment the text meets a system that cares: a JSON file that breaks on a smart quote, a CSV import that treats a non-breaking space as part of a value, a search that fails because the query and the stored text differ by an invisible character, or code that will not compile because someone pasted a curly apostrophe into a string.
The usual culprits
- Curly quotes: typographically correct in prose, and syntax errors in code.
- Non-breaking spaces: look identical to normal spaces and are a different character entirely.
- Zero-width spaces: completely invisible, and they break string comparisons silently.
- Soft hyphens: inserted by PDFs at line breaks and left behind after copying.
- Byte order marks: an invisible character at the very start of a file that upsets parsers.
Which options to leave on
The character and spacing options are ticked by default because they are safe for almost every purpose. Straightening quotes, flattening dashes, removing invisible characters and collapsing double spaces improve nearly any text and rarely lose anything you wanted.
Do turn quote and dash conversion off if you are cleaning prose destined for publication, where curly quotes and em dashes are correct typography and you would have to put them back. The rule of thumb: converting is right for code, data and plain-text destinations, and wrong for finished writing.
The two content options are deliberately off
Removing web addresses and stripping leading list numbers both delete content rather than tidy it, so neither is on by default.
URL removal is useful when preparing text for word counts or readability analysis, where a long address distorts the numbers, and destructive if you needed the links. List-number stripping removes the "1." and "2)" prefixes that survive when a numbered list is pasted as plain text, helpful before re-formatting as a proper list, unwanted if the numbers are part of the content.
What cleaning cannot do
This tool works on characters. It does not restore structure that was lost when formatting was stripped: bold and italic are gone, headings are just lines, and a table pasted from a PDF stays a jumble. It also cannot fix line breaks in the middle of sentences, which is a different problem. The line break remover handles that and pairs well with this tool.
For more aggressive whitespace handling, the whitespace remover offers modes this tool does not. Everything runs in your browser, so client copy and confidential documents are never uploaded.