Catch Invisible Zero-Width Spaces & Broken Copy-Paste Characters

Ever had an API key, SQL query, or Python string fail mysteriously even though two lines look identical on screen? Culprits are almost always hidden Unicode control characters: Zero-Width Space (U+200B), Byte Order Mark (U+FEFF), Non-Breaking Space (U+00A0), or directional marks copied from PDFs and chat apps. This inspector decodes every Unicode scalar via Array.from() and highlights suspicious invisible characters so you can strip them in one click. Also see Clean Whitespace and Invisible Character Tool.

Frequently Asked Questions

Why does this tool split emoji accurately unlike standard string length?

JavaScript's .length counts UTF-16 code units, splitting astral emoji into two surrogate halves. Array.from() iterates real Unicode code points so emoji show their true U+1FXXX hex code.

Which hidden characters does the Strip button remove?

It strips U+200B–U+200F, U+202A–U+202E, U+2060, and U+FEFF while converting non-breaking spaces (U+00A0) into normal spaces.

Invisible Characters That Break Code, SQL & JSON Silently

Code PointNameCommon Symptom
U+FEFFByte Order Mark (BOM)Breaks first CSV column header or JSON.parse
U+200BZero-Width SpaceIdentical-looking strings fail === equality
U+00A0Non-Breaking SpaceBreaks shell commands & Python indentation

Read the deep dive in UTF-8 vs ASCII & Hidden Characters Guide.

Frequently Asked Questions

Why do two identical strings fail equality checks in JavaScript or Python?
One string often contains an invisible U+200B zero-width space, U+00A0 non-breaking space, or different Unicode normalization (NFC vs NFD).
How do hidden characters enter my code?
Copy-pasting snippets from PDFs, Slack, Notion, rich-text docs, or AI web interfaces frequently injects non-breaking spaces and smart quotes.
Can I strip hidden characters safely in one click?
Yes. Inspect every code point above and copy the sanitized text locally.