Clean up AI-pasted text
Text copied out of ChatGPT, Claude or Gemini arrives carrying three things you did not ask for: Markdown syntax, typographic characters your keyboard cannot produce, and a few characters with no appearance at all. Each has its own cleaner below.
The three layers in a chatbot paste
The first layer is structural. A chatbot writes in Markdown because its own window renders Markdown — the asterisks around a bold phrase, the hashes in front of a heading and the pipes in a table are instructions to that renderer. Copy the answer into an email, a CMS field or a support ticket and the instructions come with it, because nothing there is going to act on them.
The second layer is typographic. Curly quotes, the single-character ellipsis, the en dash in a page range and the no-break space in 10 kg are all real, correct characters that a keyboard does not have keys for. They look right in a document and cause trouble the moment the text reaches something that expects ASCII: a code file, a CSV import, a URL slug, a legacy database column.
The third layer is invisible. Zero-width spaces, soft hyphens, directional marks and narrow no-break spaces occupy positions in the string and show nothing on screen. They are the ones that produce the genuinely baffling bugs — a search that fails on a word you can see, a duplicate that will not deduplicate, a name that sorts into the wrong place.
The order that saves the most re-reading
Strip the Markdown first. It is the only step that changes the structure of the text rather than individual characters, and doing it first means the later passes are working on the words you are actually keeping rather than on syntax that is about to be deleted anyway.
Run the invisible-character scan second, while the text is still exactly as the model produced it. If you normalise the quotes first, some of the exotic spaces get converted along the way and the scan will under-report what was really in there — which matters when you are trying to work out where a broken import came from.
Em dashes third, and this is the ordering that catches people out: the quote normaliser has a rule that turns an em dash into two hyphens, and once that has happened the em dash replacer has nothing left to find. Run the dashes first and each one becomes the comma or the full stop the sentence actually wanted.
Quotes last, because it is the pass you are most likely to want to skip or to run selectively. A published article wants its curly quotes; a JSON file does not. The table below shows the same line through each of the four, and then through all of them in this order.
Cleaning is not disguising
It is worth being straight about what these tools do and do not achieve. Removing every em dash from a piece of AI writing changes the punctuation and nothing else. The sentence lengths, the rhythm, the tidy three-part lists and the habit of restating the question before answering it are all still there, and they are far stronger signals than any single character.
AI-detection tools, meanwhile, are unreliable in both directions — they flag human writing routinely, including work by people writing in a second language, and they miss machine writing that has been lightly edited. Neither their verdicts nor their absence is worth building a plan around.
The honest reasons to run these cleaners are mundane and good: the characters break systems that were built for ASCII, the Markdown is meaningless outside the chat window, and an em dash every second sentence is simply a tic that reads badly. If your school or your employer has a disclosure rule about AI assistance, that is a separate question, and stripping punctuation is not an answer to it.
One line, four cleaners
Starting from The rollout — which slipped twice — is **“done”**… — which also carries a zero-width space you
cannot see — here is what each tool does to it on its own. Every cell is generated by the
transform itself.
| Tool | What it takes out | Result |
|---|---|---|
| Markdown stripper | Asterisks, hashes, pipes, backticks | The rollout — which slipped twice — is “done”… |
| Invisible character remover | Zero-width and non-printing characters | 1 × Zero-width space (U+200B) found at line 1, column 12, and removed — the line reads the same either way |
| Em dash remover | Em dashes, and en dashes on request | The rollout, which slipped twice, is **“done”**… |
| Smart quote converter | Curly quotes, ellipsis, exotic spaces | The rollout -- which slipped twice -- is **"done"**... |
Run in the order above, all four together give:
The rollout, which slipped twice, is "done"...
Common questions
How do I clean up text copied from ChatGPT?
Strip the Markdown syntax first, then scan for invisible characters, then normalise the quotes and dashes. Each of those is a separate tool here, and all four run on the text in the box without uploading it.
Does removing em dashes make text undetectable as AI?
No. Punctuation is one small signal among many, and detection tools are unreliable in both directions anyway. Clean the text because the characters break things and the syntax is meaningless outside a chat window, not to pass a test.
Why does text from a chatbot break my CSV or CMS?
Usually a character that is not plain ASCII: a curly apostrophe, a no-break space, or a zero-width character with no appearance at all. The invisible-character scanner will tell you which one and where it is.
Do I need to run all four tools every time?
Rarely. Most pastes need the Markdown stripper and the quote normaliser. The invisible-character scan is worth running when something has already gone wrong and you cannot see why.
Other text tools
- Case converterAll tools
- Sentence case converterCase
- Title case converterCase
- Uppercase converterCase
- Lowercase converterCase
- camelCase converterCode
- Snake case converterCode
- Kebab case converterCode
- Remove line breaksLines
- Remove extra spacesLines
- Sort lines alphabeticallyLines
- Remove duplicate linesLines
- Reverse textLines
- Word counterCount
- Em dash removerAI text
- Invisible character removerAI text
- Smart quote converterAI text
- Markdown formatting removerAI text