What zero-width characters are and why they exist
Zero-width characters are real Unicode code points that occupy no horizontal space when rendered. They are not a trick or a bug: each was added to solve a specific typesetting problem, and several are essential to writing systems that hundreds of millions of people use daily.
U+200B, the zero width space, marks a permitted line break inside a long unbroken run of characters, such as a URL, without adding a visible gap. U+200C, the zero width non-joiner, prevents two adjacent letters from forming a ligature or a cursive join, which is grammatically required in Persian and in several Indic scripts. U+200D, the zero width joiner, does the opposite and forces a join; it is also the glue between the components of composite emoji, so the family and profession emoji are sequences of ordinary emoji separated by ZWJ.
U+FEFF began life as the byte order mark at the start of a file and doubles as a zero width no-break space. This tool labels it ZWSP in its interface. When it appears in the middle of text it is almost always an artefact of a file that was concatenated or re-encoded rather than an intentional character.
What this tool detects, and what it does not
The detector searches for exactly four code points: U+200B, U+200C, U+200D and U+FEFF. It reports how many of each it found, marks their positions in an annotated copy of your text, and the remove mode deletes those same four. That is a useful set, because they are the ones that turn up most often in copied text, but it is deliberately narrow.
It will not flag several other invisible or confusable characters. Among them are U+2060 word joiner, U+00AD soft hyphen, U+180E Mongolian vowel separator, the bidirectional control characters U+202A through U+202E, the variation selectors U+FE00 to U+FE0F, and the Unicode tag characters in the U+E0000 block that have been used to smuggle hidden text into messages. Non-breaking space U+00A0 is also untouched, since it is visible as a space but behaves differently from one.
So a clean result from this tool means no zero-width characters from that set of four, not that the text is free of invisible characters. If you are investigating a text you actively suspect of carrying hidden content, inspect it with a hex dump or a script that enumerates every code point rather than relying on a targeted detector.
Removing them safely, and when not to
Stripping ZWJ and ZWNJ destroys correct text. Removing ZWNJ from Persian or Hindi can change the meaning of a word, and removing ZWJ from an emoji sequence splits a single glyph into its parts, so a family emoji becomes several separate people. Before running remove mode over text in a script you do not read, check what it actually contains in detect mode first.
ZWS and a stray U+FEFF are usually safe to remove, and are often worth removing. They commonly arrive from pasting out of a word processor, a design tool or a website, and they break equality comparisons, defeat search, and can cause a form value or a database key to mismatch in a way that is invisible in every log and every screenshot. The classic symptom is a string that looks identical to another and still fails to match.
The removal count shown is in UTF-16 code units, which is exact for these four characters since each is a single unit. Note that the surrounding text is left untouched, so this is not a general text sanitiser: it will not normalise Unicode forms, collapse whitespace or strip bidirectional controls.
Invisible watermarking and its limits
The watermark action inserts a zero width space between every character of your text. The visible result is unchanged while the byte sequence is entirely different, which makes it possible to tell two copies of the same document apart. The general technique, encoding a hidden identifier as a pattern of invisible characters, is sometimes used to trace which recipient leaked a document.
It is a weak mechanism and should be understood as such. The marks survive a plain copy and paste but are destroyed by retyping, by screenshotting, by most Markdown and HTML sanitisers, by conversion to PDF text layers in many pipelines, and by anyone who runs the text through a remover such as this one. Anybody who suspects a watermark can strip it in seconds.
There is also an ethical and legal dimension. Marking text so that a specific person can be identified later is a form of covert tracking, and in some jurisdictions and workplaces it carries notification obligations. Detection matters more than insertion for most people: if you are pasting text from an unknown source into code, a commit message or a configuration file, checking for invisible characters first is a sensible habit.