What a zero width space is
This article takes about 2 minutes to read.
A zero width space is the Unicode character U+200B, which has no width and draws nothing on the screen. It is provided to mark invisible word boundaries and positions where a line may break.Its name includes the word space, but it does not create a gap like an ordinary space does.
Definition
In the Unicode 18.0 code chart (General Punctuation), the name of U+200B is ZERO WIDTH SPACE, with a note that it is commonly abbreviated ZWSP. It is placed not among the space characters but under the heading Format characters. The note describes this character as one for invisible word separation and for line break control, and says that it has no width, but its presence between two characters does not prevent increased letter spacing in justification.
Even though it is invisible, it is a character, so it takes up space in the data. In UTF-8 it is the 3 bytes E2 80 8B, and in UTF-16 it is 1 unit (20 0B in big-endian byte order).
Its role of marking positions where a line may break
UAX #14 (revision 57), Unicode's line breaking rules, gives U+200B a class of its own called ZW, and describes its function as "provides a break opportunity". The description says it is a character for adding an invisible break opportunity in places where a space cannot be used.
For example, a long string of letters and digits with no spaces may not wrap partway through even when the display width is not enough. If you put U+200B partway through it, you can indicate that it may wrap there without changing how it looks. Conversely, in places where you do not want a line break, you use U+2060 WORD JOINER. The code chart notes it as a zero width non-breaking space, and UAX #14 puts it in the class WJ, which prohibits line breaks before and after it.
How it differs from other invisible characters
| Code point | Name | Main function |
|---|---|---|
| U+200B | ZERO WIDTH SPACE (ZWSP) | An invisible boundary, and a position where a line may break |
| U+200C | ZERO WIDTH NON-JOINER (ZWNJ) | Breaks the connection between neighboring characters |
| U+200D | ZERO WIDTH JOINER (ZWJ) | Joins neighboring characters (also used for emoji combinations) |
| U+2060 | WORD JOINER (WJ) | Prevents line breaks before and after it |
In PropList, Unicode's list of character properties, U+200C and U+200D are included among the characters that control joining (Join_Control), but U+200B is not. It is U+200D that joins emoji, and the mechanism is explained in the glossary entry ZWJ. Even if you put U+200B between emoji, the emoji do not combine into one.
When using it for blank space and line breaks in profiles
There is a way of using invisible characters in profiles to leave blank lines or make text look indented. What you should know here is that U+200B is not included in Unicode's whitespace property (White_Space). White_Space in PropList is 25 code points such as U+0020 and U+3000, and it includes the range from U+2000 to U+200A, but stops just before U+200B.
So if processing that collapses lines containing only whitespace is based on White_Space, a line with only U+200B is not treated as a blank line. However, whether invisible characters that are entered are kept, removed, or shown as a different symbol is determined by how each service is built, and is not decided on the Unicode side. The reliable way is to check after saving whether it looks as intended from another device. How to combine emoji and decorations is summarized in the articles Emoji for your Instagram bio and Profile emoji for guys.
What happens with invisible characters
Because U+200B is invisible, it is a character whose presence is hard to notice. Even if two strings look the same, if one of them contains U+200B they are different strings, so they may not match in searches or comparisons. When you copy and use strings such as user names, URLs, or passphrases, if an invisible character has slipped in, it can happen that what should be the same input is not accepted. It may also be counted as 1 character toward character limits, and how characters are counted is explained in the article How emoji characters are counted.
Common misconceptions
- ❌ "A zero width space is one of the whitespace characters" → ✅ Its name says space, but it is not included in Unicode's White_Space property
- ❌ "ZWSP and ZWJ are similar characters" → ✅ ZWSP marks boundaries and line break positions, and ZWJ joins neighboring characters, so they are characters with different roles
Related terms
Was this article helpful?