Skip to main content

Fix Formatting

Clean Pasted Text: The Universal Sanitizer

CleanPastedText editorial · Updated

Text workbench

Try it on your text

Cleaning mode

Removes hidden characters and standardizes AI-style punctuation.

Try a real example

Each sample contains a problem you cannot see.

Original

Pasted text

0 chars · 0 words

Cleaned

Ready to copy

0 changes

Text stays in this browser

Same words · No AI rewriting · No content logging

What does a text sanitizer actually remove?

The characters you never typed. Curly quotes from Microsoft Word, weird dashes from a PDF, invisible characters from a website, special characters from an AI chatbot — the cleaner targets that entire layer and leaves your visible wording untouched, working through five deterministic passes in a fixed order. If you want the cause rather than the cure, why text pastes weird traces each of these artifacts back to where it comes from.

1. Detection, on the untouched text

Before anything is changed, every code point is scanned and named, so the report can say "Narrow no-break space, U+202F, 3 found" instead of a vague total. This has to come first: normalization would fold several of these characters into ordinary spaces and destroy the evidence. The methodology page documents each rule.

2. Invisible character removal

We strip zero-width spaces, BiDi control marks, tag characters, and stray control codes that break search and formatting — the full list is on the invisible character remover page.

3. Unicode normalization

We apply NFKC normalization so every remaining character is in its most compatible, standard form — folding full-width variants and other Unicode quirks. It is shielded, so it never undoes a switch you turned off.

4. Spacing & newline fix

We convert non-breaking spaces (U+00A0) and narrow no-break spaces (U+202F) to normal spaces and unify mixed CRLF/LF line endings — the cure for weird spacing.

5. Typography cleaning

Conversion of curly quotes, en/em dashes, and ellipses to standard ASCII — on in the AI Clean, Safe Clean, and Plain ASCII presets, off in Keep Typography. See normalize quotes & dashes.

Is a browser-based text cleaner private?

This one is: the text never leaves your device. Unlike AI-based tools that might "rephrase" or hallucinate changes to your text, this cleaner is 100% deterministic and 100% client-side. It changes exactly what the rules are designed to fix — nothing more — and it does it entirely on your device. No text is ever sent to a server. That also makes it safe for confidential drafts, contracts, and unpublished work — including the ChatGPT, Claude, and Gemini output handled by the AI text cleaner, which you'd rather not paste into yet another cloud service.

Common questions

Frequently asked questions

How do I clean up pasted text?

Paste it into CleanPastedText and copy the result. The tool runs a fixed pipeline in a fixed order: it first scans the untouched text and names every hidden character it finds, then strips invisible characters (zero-width spaces, BOMs, soft hyphens, directional marks) and converts exotic spaces, then applies NFKC Unicode normalization, then repairs whitespace (line endings, trailing spaces, runs of blank lines), then optionally straightens typography. Detection runs before normalization on purpose, because NFKC folds characters like U+202F into a plain space and would erase the evidence.

What does a text sanitizer actually remove?

Character-level junk that travels with copied text: zero-width spaces (U+200B), byte order marks (U+FEFF), soft hyphens (U+00AD), bidirectional controls (U+200E, U+200F, U+061C), non-breaking spaces (U+00A0), the narrow no-break space (U+202F) reported in ChatGPT output in April 2025, mixed line endings, stray control codes, and — optionally — curly quotes, em dashes, and ellipsis characters. The visible wording is left untouched.

Isn't 'Paste as plain text' (Ctrl+Shift+V) enough?

No. Plain-text paste strips rich formatting — fonts, colors, links — but keeps the underlying characters exactly as copied. Non-breaking spaces, zero-width characters, smart quotes, and directional marks all survive a plain-text paste because they are characters, not formatting. A character-level cleaner is the step that actually removes them.

Will cleaning change my words?

No. CleanPastedText is deterministic: it applies fixed character-level rules and never rephrases, reorders, or 'improves' anything. Unlike AI-based rewriters, the same input always produces the same output, and the 'What changed' report itemizes every category of change so you can verify nothing else was touched.

Can it clean AI-generated text?

Yes — that's one of its main uses. AI output picks up non-breaking spaces (U+00A0) from the chat interface's HTML, occasional invisible characters from copy-paste pipelines, and typography tells like em dashes and curly quotes. Models have added characters too: in April 2025 OpenAI's o3 and o4-mini briefly inserted narrow no-break spaces (U+202F) into longer answers, which OpenAI called a quirk of large-scale reinforcement learning rather than a watermark, and which stopped within days. No mainstream chatbot is known to watermark its text with hidden characters, but the cleaner strips whatever is actually there and names it.

Continue reading

Related guides & tools