Zero-Width Spaces
- Tanha Patel
- Jun 27, 2019
- 2 min read
Updated: Feb 11, 2021
There are many types of zero-width characters, but today we are going to discuss about zero-width space. And also that how it is used in our day-to-day life. Sit back, get relax and read on to know more about it.
It is a non-printing character. Generally, used in computerized typesetting in order to differentiate two words (to indicate word boundaries). It is a Unicode character, which can be used to render white spaces. It’s also type of white space but it is of zero-width. Thus, it does not appears.
It is used to have invisible fingerprints like if we are sharing any data like an article on web then it should be embedded with zero-width spaces in order to easily identify our content and details provided if ever copied and republished anywhere else.
It is also used in many browsers, if the browser needs to wrap up the text when end of window appears. The consecutive words in sentence are separated by zero-width spaces. If the words are not separated then the word will be in same line which is difficult to read.
Blacklisting in URLs:
ICANN rules are formed such that it prohibits the use of zero-width characters in domain names. Because, if they are used in or with the domain names, they create homograph attack. Homograph attack is where malicious URLs are differentiated as a legitimate one and the one which is visual.
The Unicode of zero-width space is U+200B and if we want to specify zero-width character in HTML code then it is specified as (​). In TeX, it is written as (\hskip0pt), in LaTeX it is written as (\hspace{0pt}) and in groff it is (\:).
It can also be used in our daily life. Like if we want to make two files or folders having same name then it’s not possible as they both will merge together. But, by using zero-width space it is possible.
When naming the file or folder same as the one which already exists then after or before the same name, press ALT+8203. As the zero-width space is added to the original name, the system differentiate both of that although the names look same.
Also, it can be used if we want to break line as per our conveyance. For example: If I am having a very long name or word which I want to be fitted in small column like the cell of excel sheet when displayed initially (without enlarging it). Then we are able to decide that from where the word should be broken. This is called line break.
It is also used in Canary Trap, as I told in my previous post. This is how it can be used in Canary Trap.

The following are the notations to specify different kinds of zero-width characters:
​ (Space)
‌ (Non-Joiner)
‍ (Joiner)
 (No-Break Space)
Also, there are many zero-width characters like:
Comments