Back to Blog

Zero Width Characters Inside Text And Their Uses

1098 words
5 min read
April 14, 2025

Table of Contents

What Are Zero Width Characters?

Zero width characters are special Unicode symbols. They occupy no space visibly. They are invisible in most fonts and editors, but they still exist in the text data. Zero width space is one of the most common among these. It was created so languages like Thai, Myanmar, and Khmer can show word breaks in text, even though they do not use normal spaces between words. It also helps with languages like Japanese. In English text, zero width spaces are invisible. If you move your cursor across them, it may not jump to a new position. But they are still present in the content.

flowchart TD A[User Types Text] --> B[Inserts Zero Width Space] B --> C[Text Looks Same Visually] C --> D[But Contains Hidden Character]

Copy-Paste And Zero Width Space

Zero width characters go unnoticed in normal reading. However, if you copy and paste the text, they come along. This can lead to confusion in certain contexts. Some code editors highlight invisible or special characters. For example, Visual Studio Code and similar editors you can enable showing a yellow rectangle where these hidden spaces are. This allows you to see that the text has an invisible element inside.

flowchart TD A[User Copies Text] --> B[Zero Width Character Included] B --> C[Paste Elsewhere] C --> D[Text with Invisible Character]

Stealthy Uses In Security

Zero width characters have uses in security or watermarking. Sometimes, a company adds zero width spaces as an invisible watermark in documents. They might place hidden characters at certain intervals, or embed them after words in a pattern that identifies who created or owns that file. This is a form of steganography. It can help track leaks or identify documents if they are stolen or shared.

Because these characters do not change appearance, they are tricky to detect unless you view them in an editor that reveals invisible characters, or if you run a special script to look for them. This is what makes them suitable for hidden messages. You can see an example on this page.

flowchart TD W[Document Creation] --> X[Embed Zero Width Watermark] X --> Y[Document Looks Normal] Y --> Z[But Contains Hidden Markers]

Why Zero Width Characters Are Handy

They allow languages (some Asian languages) that need hidden word boundaries to function properly. They give developers a solution for subtle formatting. And they provide a way to hide data inside text. This has led to interesting uses beyond typical word processing. As steganography grows, zero width characters can quietly store small amounts of data, like an ID, a signature, or a short message.

flowchart TD S[Zero Width Space] --> T[Helps Word Breaks] S --> U[Used As Hidden Watermark] S --> V[Used In Steganography]

How To Detect These Characters

If you suspect invisible characters, open the text in an editor that shows special or whitespace symbols. Visual Studio Code, Sublime Text, or others can auto-highlight these or show a yellow rectangle where these hidden spaces are. You can also convert the text to a Unicode code points list in online converters. Another option is to use specialized scripts that detect or remove hidden Unicode values. This is the surest way to reveal or strip them.

In Microsoft Word, you can enable showing non-printing characters. This will show zero width spaces as a small rectangle.

Frequently Asked Questions

1. Where do zero width characters come from?

They are Unicode characters mainly used in languages without visible word breaks. For example, Thai or Khmer.

2. Can I see zero width spaces when typing English text?

Not usually. They are invisible. Your cursor does not move to a new spot, but the character is still there.

3. Can zero width characters be copied and pasted?

Yes, they are copied just like normal text, even though they do not show in the pasted content visually.

4. Why do people embed zero width spaces in documents?

They often do this for watermarking or steganography. It helps track or identify ownership.

5. How can I remove these invisible characters from my text?

Editors like Visual Studio Code or Sublime can highlight them. Then you can delete them or use scripts that strip them.

6. Are zero width spaces the only invisible characters?

No. There are other zero width forms like zero width joiner or zero width non-joiner. They also work behind the scenes in text rendering.

7. Is using zero width spaces for hiding data illegal?

It depends on intent. It is a tool like any other. Using them for malicious reasons can be illegal, but many people use them for legitimate tasks.

Created on April 14, 2025

Keywords

zero width characters zero width space invisible characters watermark steganography unicode

About The Author

Ayodesk Team of Writers

Ayodesk Team of Writers

Experinced team of writers and marketers at Ayodesk