Zero width space, zero width joiner, and zero width non-joiner have confusingly similar names. All three are real Unicode characters, and all three can be invisible in ordinary text.
They do very different jobs. U+200B ZERO WIDTH SPACE (ZWSP) marks an invisible word boundary and can provide a line-break opportunity. U+200C ZERO WIDTH NON-JOINER (ZWNJ) is used to prevent certain joining or ligature behavior. U+200D ZERO WIDTH JOINER (ZWJ) can affect cursive joining or ligature behavior in supported text and also appears inside many emoji sequences.
ZWSP, ZWNJ, and ZWJ at a Glance
| Abbreviation | Code point | Unicode name | Main role |
|---|---|---|---|
| ZWSP | U+200B | ZERO WIDTH SPACE | Invisible word boundary and line-break opportunity |
| ZWNJ | U+200C | ZERO WIDTH NON-JOINER | Prevents joining behavior where it would otherwise occur |
| ZWJ | U+200D | ZERO WIDTH JOINER | Influences joining or ligature behavior in supported contexts; also used in emoji ZWJ sequences |
These characters belong to the broader subject of invisible and special space characters, but “zero width” describes their lack of ordinary visible width, not a shared meaning.
What Does Zero Width Space U+200B Do?
U+200B ZERO WIDTH SPACE is best understood as an invisible text-boundary character. Unicode uses it for invisible word separation, and line-breaking systems can treat it as a place where a line may break even though no ordinary space is displayed.
That makes ZWSP different from U+0020 SPACE. A regular space normally creates visible spacing. ZWSP normally does not.
Two strings can therefore look the same while containing different code points. One might contain only the visible letters A and B; another might contain A + U+200B + B. A reader may see the same “AB”, but software can still distinguish the strings.
Zero Width Space Is Not Empty
Invisible does not mean absent. U+200B occupies a real code-point position in text, so it can affect exact search, string comparison, text segmentation, cursor movement, and line wrapping.
This is why a stray ZWSP can be frustrating in machine-sensitive text. A copied identifier or search term may look completely normal but fail to match a manually typed version because one contains an extra U+200B.
What Does Zero Width Non-Joiner U+200C Do?
U+200C ZERO WIDTH NON-JOINER has a different purpose. It is used in writing systems where neighboring characters can join or change form according to context. ZWNJ interrupts joining behavior that would otherwise occur.
That means ZWNJ is not just an invisible separator. In languages and scripts where it is meaningful, removing it can change how a word is shaped or interpreted.
What Does Zero Width Joiner U+200D Do?
U+200D ZERO WIDTH JOINER participates in shaping rather than spacing. In supported cursive or ligature contexts, it can request joining behavior that would not otherwise be selected. In other contexts it may have no visible effect at all.
This qualification matters: ZWJ is not a universal “merge these characters” command. Its effect depends on the surrounding characters, shaping rules, font support, and the text technology displaying the string.
Why Is ZWJ Used in Emoji?
ZWJ also has a defined role in emoji. Many recommended emoji ZWJ sequences contain U+200D between emoji components. A supporting platform may render the whole sequence as one combined pictograph; if the sequence is not supported, the components can fall back to separate emoji.
This is why an emoji that looks like one symbol can actually contain several code points. Removing the ZWJ can change the visible result even though the ZWJ itself was never visible.
ZWSP vs ZWJ
ZWSP and ZWJ are easy to confuse because both names contain “zero width”, but they solve different problems.
- ZWSP is about invisible word separation and line breaking.
- ZWJ is about joining, ligature behavior, or a defined multi-character sequence such as an emoji ZWJ sequence.
Using U+200B where U+200D is required does not preserve joining behavior, and using U+200D as an invisible word separator is not equivalent to ZWSP.
ZWJ vs ZWNJ
ZWJ and ZWNJ are a more meaningful pair because both can influence character shaping.
- ZWJ can promote joining or ligature behavior where the surrounding text supports it.
- ZWNJ prevents joining behavior where it would otherwise occur.
The two should not be substituted for one another simply because neither normally produces a standalone visible glyph.
Why Do These Characters Appear in Copied Text?
Copy and paste transfers encoded text, not just the pixels visible on screen. If the source contains ZWSP, ZWNJ, or ZWJ, the invisible character can travel with the visible text.
That may be intentional. A ZWNJ can be required for correct shaping, and a ZWJ can be an essential part of an emoji sequence. It can also be surprising when a hidden ZWSP appears in a search term or identifier. The broader causes are covered in why copied text can contain invisible characters.
How Can You Tell Which Character Is Present?
You cannot reliably distinguish these three characters by looking at the blank position on screen. Inspect the encoded value instead:
- U+200B — ZERO WIDTH SPACE
- U+200C — ZERO WIDTH NON-JOINER
- U+200D — ZERO WIDTH JOINER
A Unicode-aware editor, code-point inspector, or text-identification tool is more reliable than visual inspection.
Should You Remove Zero-Width Characters?
Not automatically. An unexpected U+200B inside an identifier may be unwanted, while U+200C may be important to correctly written text and U+200D may be required for an intended emoji sequence.
A safer workflow is to identify the code point, understand what it is doing in context, and only then remove or replace it if that behavior is not needed.
The Main Difference
ZWSP, ZWNJ, and ZWJ are three separate Unicode characters with three separate purposes:
- U+200B ZWSP marks an invisible word boundary and can provide a line-break opportunity.
- U+200C ZWNJ prevents certain joining behavior.
- U+200D ZWJ influences joining or ligature behavior in supported contexts and participates in emoji ZWJ sequences.
Their similar names are useful labels, but the exact code point is what tells you what the character actually does.