The cleaning pipeline, step by step
CleanPastedText is not an AI and does not guess. It runs your text through a fixed sequence of deterministic character rules — the same input always produces the same output, and every rule is documented here. This is the exact pipeline, in the order it runs:
- Hidden message check and chat citation markers. The original text is first searched for words spelled in invisible characters: runs of Unicode tag characters that map to ASCII letters, and "emoji smuggling," where each byte of a message is a variation selector (U+FE00–U+FE0F for 0–15, U+E0100–U+E01EF for 16–255). Any readable message is decoded and shown to you word for word; real emoji flags and emoji styling are not counted. Then citation markers that ChatGPT leaves in copied answers are removed:
:contentReference[oaicite:0]{index=0},【4†source】, and the private-use citation markers (U+E200–U+E202) that paste as boxes or as text likeciteturn0search0. Linked names keep their visible text. - Detection on the untouched text. Before anything is transformed, every code point is checked against a character knowledge base. Each hit is recorded with its Unicode name, code point, and count — the census that becomes the "What changed" report. Characters whose toggle is switched off are still detected and reported as "kept," so nothing is ever invisible to you.
- Per-character stripping, emoji-safe. In the same pass, AI-artifact spaces (U+2000–U+200A, U+202F, U+205F, U+3000) are replaced with regular spaces; zero-width and invisible characters (U+200B, U+200C, U+200D, U+2060, U+FEFF, soft hyphen U+00AD, U+034F, Hangul fillers) are removed; bidirectional controls (U+200E, U+200F, U+061C, U+202A–U+202E, U+2066–U+2069) are removed; Unicode tag characters (U+E0000–U+E007F) and variation selectors (U+FE00–U+FE0F, U+E0100–U+E01EF) are removed outside emoji; stray control characters are removed, with line and paragraph separators (U+2028, U+2029) converted to real newlines and no-break spaces (U+00A0) to regular spaces. Anything the named list misses is caught by Unicode's own properties, read from the browser's built-in Unicode data: every default-ignorable or format character (invisible math operators U+2061–U+2064, deprecated format controls U+206A–U+206F, invisible musical symbols U+1D173–U+1D17A, and any added in later Unicode versions) is removed, the Braille pattern blank (U+2800) becomes a space, and private-use characters and noncharacters are removed. Number signs that print above Arabic, Syriac and Kaithi digits, and Egyptian hieroglyph and Duployan format controls, are left alone because they belong to those scripts. The replacement character (U+FFFD) is reported but kept: it means the original character was already lost to an encoding error, and there is nothing correct to put back.
- Unicode normalization (NFKC). The text is folded to Unicode's compatibility form: fullwidth letters become ASCII, the fi ligature becomes two letters, superscript digits become plain digits. Normalization is "shielded" so it never overrides a switch you turned off — with Keep Typography, for example, the ellipsis character survives even though NFKC would fold it to three periods.
- Whitespace cleanup. Windows and old-Mac line endings (CRLF, CR) are unified to LF, trailing spaces are trimmed from every line, and runs of three or more blank lines collapse to two.
- Typography normalization (optional). Curly quotes (U+2018, U+2019, U+201C, U+201D) and guillemets become straight quotes, en and em dashes (U+2013, U+2014) become hyphens, and the ellipsis (U+2026) becomes three periods. On in AI Clean, Safe Clean, and Plain ASCII; off in Keep Typography.
- Optional extras. A Strip Markdown toggle removes chat-residue formatting — heading markers, bold and italic asterisks, link syntax (keeping the link text), code fences, and blockquote markers, while list bullets are left alone. A Join Wrapped Lines toggle, used by the Join Lines preset, turns lines hard-wrapped by a PDF or email into paragraphs: blank lines and list items keep their own line, and a word split by a line-end hyphen is rejoined only when the next line starts with a lowercase letter. The Plain ASCII preset goes furthest: it transliterates accented letters to their base form, then deletes every remaining non-ASCII code point, emoji included. It is deliberately destructive and labeled as such.
The presets — AI Clean (the default), Safe Clean, Keep Typography, Plain ASCII, Markdown to Text, Join Lines — are just named combinations of these switches. The Advanced Controls panel shows every switch and lets you toggle each pass individually. Every page on this site runs this same engine, including the AI text cleaner for ChatGPT, Claude, and Gemini output — only the wording around the tool changes.
Why detection comes first
Because normalization destroys evidence. NFKC folds the narrow no-break space (U+202F), which turned up in ChatGPT output in 2025, into a plain space, so a tool that normalizes first can never tell you it was there. CleanPastedText scans the untouched input before any transformation, which is why its report can say precisely: "Narrow no-break space, U+202F, 14 found, replaced" instead of a vague total. Every row in the report carries the character's Unicode name, its code point, a count, and the action taken — removed, replaced, or kept. Detected tag characters are even decoded to show which hidden ASCII letter each one carried. That per-character census is what the ChatGPT watermark remover reports on: the same rules, aimed at the specific characters that turn up in ChatGPT output.
Transparency cuts both ways: if nothing suspicious is found, the report says so explicitly rather than staying silent. To check text without cleaning it, use the AI watermark checker; for what each detected character actually is, see the complete invisible-characters reference.
What we never do
- No server upload. Cleaning runs entirely in your browser as client-side JavaScript. This is verifiable, not a promise: load the page, go offline, and keep cleaning. Google Analytics receives page and browser information and may set cookies; the cleaner's events add only a preset name or a size bucket like "1k-10k", never your text. See the privacy page.
- No rewriting of visible words. There is no AI in the pipeline and no paraphrasing. Humanizer tools rewrite your sentences on their servers; CleanPastedText changes zero visible words unless you explicitly enable typography or Markdown passes, which only touch punctuation variants and formatting markers.
- No silent changes. Every pass is documented on this page, and every detected character appears in the report — including the ones deliberately left alone, which are labeled "kept."
- No signup, no paywall, no stored history. The text you clean exists only in your browser's memory and is gone when you clear it.
Why we preserve emoji
Zero width joiners and variation selectors are stripped only outside emoji sequences. The same U+200D that is baggage in ordinary prose is load-bearing inside a family emoji, and U+FE0F is what makes a heart render in emoji style — so before removing one of these characters, the engine looks backward past skin-tone modifiers and selectors to check whether it sits on a real emoji base. If it does, it is kept and reported as "kept — part of an emoji sequence." Family and profession emoji keep their joiners, hearts keep their emoji-style selector, keycaps and flag tag sequences survive — while identical characters hiding inside ordinary text are stripped.
One honest caveat: the zero width non-joiner (U+200C) inside Persian or Indic-script words is legitimate but is not an emoji, so the default presets do remove it. For text in those scripts, open Advanced Controls and switch off "Joiners (ZWNJ/ZWJ)" — that leaves every other cleaning rule active and only stops U+200C and U+200D from being stripped outside emoji. See the zero-width non-joiner reference for exactly what that character does and why. The report's "kept" labels let you verify exactly what survived. Plain ASCII is the only preset that removes emoji entirely.
Use the same engine in code or an AI agent
The rules on this page are published as two npm packages, so you get the same results outside the browser, still without sending text anywhere.
- cleanpastedtext is the engine as a library with no dependencies:
cleanText(text, PRESETS["AI Clean"])returns the cleaned text and the same per-character report the tool shows. - cleanpastedtext-mcp is a local MCP server with
inspect_text,clean_textandlist_presetstools, so an assistant such as Claude can check a draft before you paste it. In Claude Code:claude mcp add cleanpastedtext -- npx -y cleanpastedtext-mcp. It runs on your machine over stdio and makes no network requests.
AI-style signals: evidence, not a verdict
Below the cleaning report, the tool shows an optional AI-style signals panel. It reads your original paste, before cleaning, and answers two separate questions. First: did this pass through a chatbot interface? Citation tokens such as oaicite, Gemini and Perplexity source markers, unfilled placeholders and "I hope this helps" sign-offs are leftovers of the chat app itself, so they are reported on their own as chatbot residue. Second: how much does the writing resemble published patterns of AI text? That part is graded Low, Medium or High from five families of evidence:
- Overused vocabulary. Words that spiked after ChatGPT, weighted by the measured increase in 15 million PubMed abstracts (Kobak et al.): "delves" rose 28×, "underscores" 14×.
- Phrase templates. Sentences ending in ", highlighting its importance", "plays a pivotal role", "it's not just X, it's Y" and newer 2026 patterns catalogued by Wikipedia's AI cleanup editors. Instruction-tuned models use these "-ing" endings at 2–5× the human rate (Reinhart et al., PNAS 2025).
- Chat formatting. Bold-label bullet lists, Markdown headings and emoji bullets.
- Punctuation. An em dash rate above 6 per 1,000 words, on texts of 300 words or more.
- Sentence structure. A high share of "-ing" clauses across sentences.
Each family has a cap so one habit cannot dominate. Medium needs points from at least two families and High from at least three, on at least 300 words. Under 150 words the style is not assessed at all. Pick the kind of writing (academic, email, news, casual or fiction) and the weights change: academic writing is naturally dense with words like "crucial", and email is full of "let me know if". Every signal is listed with the matched text, its source and the human writing it also appears in.
Two limits matter most. Non-native English writers and formal genres trip these patterns more often, and the word lists go stale as models and people change how they write. The panel never shows a percentage, the word lists are dated, and the weights come from published studies rather than our own measurements; we will publish our measured false-positive rates when our test set is complete.
Limits, honestly
- Characters only. The engine cannot touch anything that lives in word choice, so it removes no statistical watermark and changes no detector score; see what a Unicode text watermark is.
- Defaults favor clean prose over rare legitimate uses. Persian and Indic text that depends on U+200C, or genuinely mixed-direction text that depends on BiDi control characters, needs those passes switched off — the toggles exist, and the report shows what was kept versus removed so you can check the result.
- Plain ASCII destroys non-ASCII text by design. It transliterates what it can (accented letters to their base form) and deletes the rest, including all emoji and non-Latin scripts. It is the right tool for legacy systems that reject Unicode, and the wrong tool for anything multilingual — which is why it is a separate, clearly labeled preset rather than the default.