What is the zero-width joiner?
The zero-width joiner (ZWJ) is U+200D, an invisible character that tells a text renderer to connect its neighbours. It has no width and no glyph. Its effect is on the characters around it: in a script with cursive joining it can force a joined form, and in emoji it can turn a run of separate pictographs into one combined symbol.
How does it build emoji?
Many emoji people think of as single symbols are ZWJ sequences: several emoji joined by U+200D. If the platform font has a glyph for the whole sequence, you see one image. If not, you see the parts one after another.
| Combined emoji | Made of | If U+200D is stripped |
|---|---|---|
| Family | Adult + ZWJ + adult + ZWJ + child | Three separate people |
| Woman technologist | Woman + ZWJ + laptop | A woman next to a laptop |
| Rainbow flag | White flag + variation selector + ZWJ + rainbow | A white flag and a rainbow |
The full rules live in the Unicode emoji technical report (UTS #51).
Where does a stray ZWJ come from?
In English prose a U+200D is almost never intended. It arrives from copied web pages, CMS editors, translation tools, PDFs, or from text that once contained an emoji that was later deleted. It also appears in the character lists used for hidden-text tricks, which is why it sits on the invisible characters list. It causes the same failures as the zero-width space: searches that miss, comparisons that fail, and lengths that count more than you see.
How to remove U+200D without breaking emoji
Paste the text into the cleaner above. Outside emoji, each U+200D is removed and counted in the report. Inside an emoji sequence it is kept. If your text is Persian, Hindi, Bengali or another language that relies on joiners, open Advanced Controls and turn off Joiners (ZWNJ/ZWJ). The companion character is covered on the zero-width non-joiner page.
For code, a naive text.replace(/\u200D/g, "") will remove the joiner from emoji as well. If emoji matter, remove it only where it is not between two emoji code points, or use a library that understands emoji sequences.
Is a ZWJ ever a security problem?
On its own it is harmless. Attackers sometimes hide data in runs of zero-width characters, which is why cleaners flag them. That is a different technique from the tag-character and variation-selector tricks covered in ASCII smuggling explained, but the fix is the same: detect, report, and remove what you do not need.