Skip to content

Clean Pasted Text

Make text pasted from Word or a PDF behave like plain text.

Text copied out of Word, Google Docs, a PDF, or an email client rarely arrives as plain text. It carries characters that look ordinary on screen but are not: curly quotation marks instead of straight ones, non-breaking spaces that refuse to wrap, zero-width joiners left behind by formatting, and soft hyphens inserted by justified layout.

These characters cause real problems downstream. A search fails because the apostrophe in the document is a different character from the one you typed. A CSV import breaks on a non-breaking space. A code snippet refuses to run because the quotes are typographic. A diff shows a change on a line that looks identical.

This cleaner normalizes all of it in one pass: invisible characters are deleted, exotic spaces become ordinary spaces, curly quotes and apostrophes become straight, ellipsis and dash characters become their plain equivalents, and pasted bullet symbols become simple hyphens. The counters show how many invisible characters were taken out and how the length changed, which is usually the moment people realize how much invisible content was in the text. The two length figures are reported separately because a clean-up can also make the text slightly longer: one ellipsis character leaves as three full stops.

Examples

Examples for Clean Pasted Text: each row pairs an input with the output it produces.
What it handles Input Output
Curly quotes become straight “smart” ‘quotes’ "smart" 'quotes'
Invisible characters removed a b​c a bc
Pasted bullets become hyphens • first • second - first - second
Dashes and ellipsis normalized em—dash and… more em-dash and... more
Narrow no-break space and dash from an AI reply It’s ready — for review It's ready - for review

How it works

Several targeted replacements run in sequence. Zero-width spaces, byte-order marks, soft hyphens, word joiners and the invisible left-to-right and right-to-left direction controls are removed outright. Two invisible characters are deliberately kept: the zero-width joiner and non-joiner. They look like debris but are load-bearing — they hold multi-part emoji together and are required spelling in Persian, Arabic and Hindi, where deleting one changes the word. Non-breaking, en, em, narrow, and ideographic spaces are replaced with a normal space. The four curly single quotes become an apostrophe and the four curly double quotes become a straight quotation mark. Horizontal ellipsis becomes three full stops, and en and em dashes become hyphens. Bullet characters at the start of a line become a hyphen and a space, which turns a pasted list into plain Markdown. Finally trailing spaces are stripped, runs of blank lines are reduced to one, and the text is trimmed.

Text pasted from ChatGPT and other AI tools

Text that comes out of an AI assistant carries a recognizable set of characters. A narrow no-break space turns up before dashes and units, ordinary hyphens arrive as en and em dashes, straight quotes and apostrophes arrive curly, the three dots of an ellipsis arrive as a single character, and zero-width characters occasionally survive the copy. None of it is visible on screen, and all of it travels with the text into whatever you paste it into.

This cleaner normalizes those characters in the same pass it uses for text from Word or a PDF, because they are the same characters. The narrow no-break space becomes an ordinary space, en and em dashes become hyphens, curly quotes and apostrophes become straight, and the ellipsis character becomes three full stops. What comes back is text that a search box, a diff, a spreadsheet import, or a code editor will treat the way you expect.

What it does not do is decide whether a text was written by a person or a machine, and there is no watermark here to strip. The characters listed above are ordinary typography — word processors, messaging apps and publishing tools produce them too. This tool normalizes characters; it makes no claim about where the text came from, and neither should you on the strength of what it removes.

When people use it

  • Pasting from Word or Google Docs into a CMS without hidden characters.
  • Fixing code snippets whose quotes were turned typographic.
  • Cleaning text extracted from a PDF before importing it.
  • Removing invisible characters that break search or comparison.

Frequently asked questions

Does it remove bold, italics, or colors?
Those are not part of the text itself. Pasting into this tool already discards them; what it removes are the character-level artifacts that survive a plain-text paste.
Why did my text get shorter without looking different?
Because the removed characters were invisible. Zero-width spaces, soft hyphens and direction marks occupy no visual width but do occupy positions in the string. The "Invisible characters removed" counter tells you exactly how many went; "Characters in" and "Characters out" show the net effect, which can occasionally be an increase when an ellipsis expands into three full stops.
Will it break languages that need special spacing?
Ideographic spaces are converted to ordinary spaces, which suits most Western use. If you are working in Japanese or Chinese layout where that spacing is meaningful, review the result.
Does this remove hidden characters from ChatGPT or other AI text?
Yes, in the sense that matters. The narrow no-break spaces, zero-width characters, em dashes and curly quotes that assistants commonly emit are all normalized in one pass, so the text stops behaving differently from what you typed. It does not detect AI authorship, and there is no watermark to remove — those characters are ordinary typography, not a marker.
Will it break code or JSON pasted from an assistant?
It fixes the usual breakage rather than causing it: typographic quotes become straight quotes, which is what a parser needs. One thing to watch is that en and em dashes become hyphens and the ellipsis character becomes three full stops, so if a string literal in your snippet deliberately contains one of those, check that line before running it.
Are accented letters affected?
No. Accented and non-Latin letters pass through untouched. Only punctuation, spacing, and invisible characters are normalized — and even there the zero-width joiner and non-joiner are preserved, so Persian, Arabic and Devanagari spelling survives and multi-part emoji such as a family or a rainbow flag stay a single glyph instead of breaking into pieces.