AI Text Cleaner
Paste text to detect and remove invisible characters and typography artifacts left by AI models and copy-paste. Everything runs in your browser.
Your text is inspected and cleaned locally in your browser and is never uploaded, but avoid pasting confidential content into any online tool.
Seeing garbled accents like Café? Try the Mojibake Fixer.
About AI Text Cleaner
This AI Text Cleaner is a simple inspector and sanitizer for text that carries characters you cannot see. Paste anything a language model generated, or content you copied from a doc, PDF, or web page, and it counts and removes the hidden format characters that slip in: zero-width spaces and joiners, the narrow and regular no-break spaces, soft hyphens, bidirectional controls, invisible math operators, and emoji variation selectors. Optional toggles straighten curly quotes, turn em and en dashes into plain hyphens, collapse runs of spaces, and apply Unicode NFC normalization. You get a removed-by-type summary plus before and after character and UTF-8 byte counts, then copy or download the cleaned result. The whole check runs in your browser, so the text you paste stays on your device.
Features
- Detects and counts every hidden character by type, including zero-width space, joiner and non-joiner
- Strips no-break and narrow no-break spaces, soft hyphens and the byte-order mark
- Removes bidirectional controls (LRM, RLM, LRO/RLO, isolates) that can reorder or spoof text
- Clears invisible math operators (U+2061–U+2064) and emoji variation selectors (U+FE00–U+FE0F)
- Optional: straighten curly quotes and convert em/en dashes to a plain hyphen
- Optional: collapse runs of spaces and apply Unicode NFC normalization
- Shows a removed-by-type summary with before and after character and UTF-8 byte counts
- Copy the cleaned text or download it as cleaned.txt with one click
How to use the AI Text Cleaner
- Paste or type your text into the input box on the left.
- Read the banner and the removed-by-type list to see which hidden characters were found.
- Toggle any typography options you want, such as straightening quotes or collapsing spaces.
- Check the before and after character and byte counts to confirm what changed.
- Copy the cleaned text or download it as cleaned.txt.
Example
Input
The model said “this is clean”—or is it?
Output
The model said "this is clean"-or is it?
A zero-width space is removed; with the quote and dash options on, curly quotes become straight and the em dash becomes a hyphen.
Common errors & troubleshooting
- The cleaned text looks identical to the input, but the counts still changed. — The removed characters were invisible on screen. Check the removed-by-type list and the character-count difference to see exactly what came out.
- A no-break space between words turned into a normal space or vanished. — No-break and narrow no-break spaces are removed as hidden characters. If you need a real space there, the collapse-spaces option keeps single spaces intact.
- Accented letters changed length even though they look the same. — That is Unicode NFC normalization combining a base letter and a combining mark into one code point. Turn the Normalize (NFC) option off if you want the original form.
- An emoji lost its color or style after cleaning. — Variation selectors (U+FE00–U+FE0F) that force text or emoji presentation are stripped. Re-add the emoji from your keyboard if you need a specific style.
Frequently asked questions
- What is a zero-width space?
- A zero-width space (U+200B) is a Unicode character with no visible width. It can create invisible word breaks, throw off exact-match searches, and change byte counts even though nothing appears on screen. This tool removes it along with related zero-width joiners and no-break spaces.
- Why does AI-generated text sometimes contain hidden characters?
- Models are trained on web and document text that already includes non-breaking spaces, smart quotes, soft hyphens, and other formatting, and tokenizers can reproduce them. Copy-pasting from rich editors, PDFs, and chat apps adds more. The result is text that looks clean but carries characters you cannot see.
- Which characters does the AI Text Cleaner remove?
- It removes zero-width space, joiner, non-joiner and word joiner, the byte-order mark, no-break and narrow no-break spaces, soft hyphens, bidirectional controls, invisible math operators (U+2061–U+2064), and emoji variation selectors (U+FE00–U+FE0F). Quote, dash, spacing and NFC changes are optional toggles.
- What are bidirectional control characters and why remove them?
- Bidi controls like the right-to-left override reorder how text is displayed. They are legitimate for mixed-script content but can also be used to disguise file names or code, so this tool flags and strips them so what you see matches the underlying characters.
- Does this tool change my visible words or rewrite the text?
- No. It is an inspector and sanitizer: by default it only deletes characters you cannot see and reports what it removed. It never paraphrases, adds, or rewrites your words, and the typography options only run when you turn them on.
- Is my text uploaded anywhere when I clean invisible characters?
- No. The detection and cleanup run entirely in your browser, so the text you paste is processed on your device and is not sent to a server.
Related tools
- Mojibake / Encoding Fixer — Fix garbled "mojibake" text from an encoding mismatch — turn Café back into Café.
- Word & Character Counter — Count words, characters, sentences, lines, bytes and approximate tokens, live.
- Case Converter — Convert text between camelCase, snake_case, kebab-case, PascalCase and more.
- Slug Generator — Turn a title into a clean, URL-safe slug, with batch mode.
- Text Diff — Compare two texts line-by-line and see additions and removals.
- HTML Escape / Unescape — Escape and unescape HTML special characters and entities.
All ArrayKit tools