Identify the zero-width joiner character

How to spot the invisible zero-width joiner (U+200D), what it changes in emoji and scripts, how it differs from look-alikes, and when to strip or keep it.

The zero-width joiner is an invisible Unicode character that tells a rendering system to join the characters on either side of it. It has no width and no glyph of its own, so you usually find it only when something behaves unexpectedly: an emoji that falls apart, a search that fails to match, or a string whose length doesn't match what you see. This guide covers how to identify it, what it changes, how it differs from similar invisible characters, and when keeping or removing it makes sense.

Quick verdict: keep it, strip it, or replace it?

Keep the zero-width joiner when it is part of an emoji sequence or of a script that relies on it for correct letter shaping. Removing it there changes what readers see. Treat it as suspect when it appears between ordinary Latin letters, in identifiers, usernames, passwords, URLs, or data fields. In those places it adds no visible meaning, and it can make two strings that look identical compare as different. Plain text with no ZWJ is the safer choice for anything that will be searched, matched, sorted, or typed back in by hand. The main tradeoff is that stripping it everywhere can break legitimate emoji and non-Latin text, while leaving it everywhere can hide mismatches.

What the zero-width joiner is

Its formal Unicode name is ZERO WIDTH JOINER, often shortened to ZWJ. Its code point is U+200D, in the General Punctuation block, and its general category is Cf, the format-character category. Format characters affect how neighboring text is displayed or processed but have no visible form themselves.

  • Code point: U+200D
  • UTF-8 bytes: E2 80 8D
  • UTF-16 code unit: 200D
  • HTML named entity: ‍
  • HTML numeric references: ‍ or ‍
  • Escape in JavaScript, Python, and many other languages: \u200D

What it actually changes

The ZWJ is a real stored character. Inserting it changes the underlying text: the string gets longer, byte counts change, and comparisons treat it as different from the same text without the joiner. It is not a font, a style, or a CSS effect. What it changes visually depends entirely on the renderer and font, which decide whether to honor the joining request.

Emoji ZWJ sequences: several emoji joined by ZWJ can display as one combined emoji when the platform supports that sequence. For example, MAN (U+1F468), ZWJ (U+200D), and PERSONAL COMPUTER (U+1F4BB) form the man technologist emoji. If a platform doesn't support a given sequence, it typically shows the component emoji side by side instead. The meaning is preserved in the stored text, but the reader sees something different.

Joining scripts: in scripts with contextual letter forms, such as Arabic and the Indic scripts, a ZWJ can request a joined or alternate form where one would not otherwise appear. In Devanagari, for instance, it can be used to request a half form of a consonant. In these contexts the joiner carries real typographic intent, and removing it can change how a word looks to a fluent reader.

Between letters that don't join, such as plain Latin text, the ZWJ usually has no visible effect at all. That invisibility makes it useful for hiding differences, whether deliberately or by accident.

How it differs from other invisible characters

Several invisible characters are easy to confuse with the ZWJ because none of them shows a glyph. They differ in what they ask the renderer to do.

Character | Code point | Main effect
ZERO WIDTH JOINER | U+200D | Requests that adjacent characters join or combine
ZERO WIDTH NON-JOINER | U+200C | Requests that adjacent characters not join
ZERO WIDTH SPACE | U+200B | Marks a possible line-break point; no joining effect
WORD JOINER | U+2060 | Prevents a line break between characters
ZERO WIDTH NO-BREAK SPACE / byte order mark | U+FEFF | Historically a no-break space; now mainly used as a byte order mark at the start of text

The joiner and non-joiner are opposites. The zero width space and word joiner deal with line breaking, not letter joining. If an inspector reports U+200C instead of U+200D, the text is asking for the opposite visual result.

How to identify a ZWJ in text

Because you can't see the character, identification means inspecting code points or bytes rather than looking at the rendered text. Clues that a ZWJ may be present include a cursor that needs an extra keypress to move past a spot, a string length one higher than the visible characters suggest, a search or equality check that fails on text that looks identical, and an emoji that appears as two or more separate emoji in one app but as a single emoji in another.

Listing code points in Python shows every character, including invisible ones:

text = "\U0001F468\u200D\U0001F4BB"
for ch in text:
    print(f"U+{ord(ch):04X}")

# U+1F468
# U+200D
# U+1F4BB

The same check in JavaScript, where spreading the string iterates by code point rather than by UTF-16 code unit:

const text = "\u{1F468}\u200D\u{1F4BB}";
console.log([...text].map(c =>
  "U+" + c.codePointAt(0).toString(16).toUpperCase().padStart(4, "0")
));
// [ 'U+1F468', 'U+200D', 'U+1F4BB' ]

In a file, a hex dump reveals the UTF-8 byte sequence E2 80 8D wherever a ZWJ sits. To flag lines that contain one, a small script is more predictable than relying on a particular grep build's Unicode support:

import sys

for n, line in enumerate(open(sys.argv[1], encoding="utf-8"), 1):
    if "\u200D" in line:
        print(n, line.rstrip("\n").replace("\u200D", "<ZWJ>"))

If you'd rather use a ready-made tool, useful search terms include "Unicode character inspector", "code point viewer", "invisible character detector", "U+200D", and "emoji ZWJ sequence". This article doesn't name or vouch for specific tools, because none were verified for this review. Check that any tool you pick shows code points rather than just rendered glyphs. Also don't paste sensitive text into an online tool without knowing how it handles your data.

What happens when you reverse or transform text containing a ZWJ

Reversal tools that flip text code point by code point handle ZWJ sequences poorly. Reversing MAN, ZWJ, PERSONAL COMPUTER gives PERSONAL COMPUTER, ZWJ, MAN. That is not a recognized emoji sequence, so most renderers will show a laptop followed by a man rather than a reversed technologist. Skin tone modifiers and other combining elements get detached the same way. A reversal that keeps emoji intact has to work on grapheme clusters, the units a reader perceives as single characters, rather than on raw code points.

Removing the ZWJ splits an emoji sequence into its components and can change the shaping of words in joining scripts. Unicode normalization (NFC, NFD, NFKC, NFKD) does not remove it, because the ZWJ has no decomposition. If you need text without joiners, you have to strip them explicitly. Do that only where you have decided the joiner carries no intended meaning.

Will it survive copying and sharing?

As a stored character, the ZWJ usually travels with copied text. Whether it survives a particular destination depends on that destination: some input fields, sanitizers, and content filters strip format characters, and some don't. Whether the result looks right depends on the receiving platform's emoji and font support. No destination-specific tests were supplied for this review, so don't take one successful paste in one app as proof that it works everywhere. Test in the specific places you care about.

For search and editing, a hidden ZWJ means a query typed without it may not match, and a user deleting text may need an extra keypress to remove it. How screen readers and other assistive technologies treat a stray ZWJ in ordinary text, or announce emoji ZWJ sequences, was not documented in the material available here and is likely to vary by product and version. Where text has to be reliably searchable, matchable, or announced, a plain-text version without decorative joiners is the safer choice. Keep joiners only where they are part of a legitimate emoji or script spelling.

Gaps in this review

The character's identity, encoding, and general behavior described above come from the Unicode Standard and well-established text-processing practice. This review did not have specific test results, named-platform rendering checks, or assistive technology documentation. Claims about how a particular app, browser, or screen reader handles a ZWJ should be confirmed against that product's documentation or by your own scoped testing.