Frequently Asked Questions
Why does text from ChatGPT break my code?
AI models like ChatGPT, Gemini, and Claude sometimes include invisible Unicode characters — Zero-Width Spaces (U+200B), Non-Breaking Spaces (U+00A0), or Byte Order Marks. These look like nothing in a chat window but are real characters that IDEs and parsers treat as illegal input, producing syntax errors on lines that appear perfectly clean.
What is a zero-width space (U+200B)?
A Zero-Width Space is an invisible Unicode character with no visual width, historically used as a word-break hint in languages without spaces. AI models occasionally include them in generated code. In an IDE they appear as SyntaxError: Illegal character '\u200b' or similar "Invalid token" errors.
What is a non-breaking space and why does it cause errors?
A Non-Breaking Space (U+00A0) looks identical to a regular space (U+0020) in most text editors and web browsers, but is a different Unicode character. Python, YAML parsers, and most compilers only accept the regular space as whitespace — so code that looks correctly indented will throw IndentationError or unexpected token errors.
Which invisible characters does this tool remove?
The tool detects and removes: Zero-Width Space (U+200B), Zero-Width Non-Joiner (U+200C), Zero-Width Joiner (U+200D), Left-to-Right Mark (U+200E), Right-to-Left Mark (U+200F), BOM / Zero-Width No-Break Space (U+FEFF), Non-Breaking Space (U+00A0), Soft Hyphen (U+00AD), Word Joiner (U+2060), Narrow No-Break Space (U+202F), and Line / Paragraph Separators (U+2028, U+2029).
Does this tool send my text to a server?
No. All detection and removal happens entirely in your browser using JavaScript. Your text is never uploaded, transmitted, or stored. This makes it safe to paste code containing API keys, credentials, or proprietary logic.
How do I find invisible characters in VS Code?
Open Find (Ctrl+F / Cmd+F), enable regex mode, and search for [\u200B\u200C\u200D\u200E\u200F\uFEFF\u00A0\u00AD\u202F\u2060\u2028\u2029]. VS Code will highlight every match. Or paste your text into this tool and click Clean & Copy — it's faster.
How do I remove zero-width spaces in Python?
Use regex: import re; cleaned = re.sub('[\u200b-\u200f\ufeff\u00a0\u00ad\u202f\u2060\u2028\u2029]', '', text). This tool does the same thing in your browser without any code or installation needed.
What does the "Reveal ghost chars" button do?
It switches the input pane into a visual mode that highlights every ghost character as a small red badge showing the Unicode label (e.g., ZWSP, NBSP). This lets you see exactly which lines and positions the hidden characters are in before you clean them.