tdy / blog / zero-width space

What is a zero-width space? U+200B, explained

Updated July 2026 · 3 min read
Short answer

U+200B ZERO WIDTH SPACE is a space with no width. It renders as nothing, takes no room on the line, and is undetectable by eye. It exists as a line-break hint for languages that do not put spaces between words. Everywhere else it is an invisible bug that looks exactly like working text.

What it is actually for

Thai, Khmer, Lao and Myanmar run words together without visible spaces, and text engines need a hint about where a line may wrap. The zero-width space is that hint: an invisible marker saying "you may break here" without displaying anything. In those languages it is not junk, it is load-bearing punctuation.

The same character also serves as a soft wrap point in long technical strings, letting a URL or a serial number break across lines in an email without inserting a visible hyphen.

Why it ruins your day everywhere else

In English and most European text a zero-width space serves no purpose, and because it is invisible it produces the most confusing class of bug there is: everything looks right and nothing works.

the word on your screen: hello
the string in memory: hel[U+200B]lo

How it gets into your text

You never type it. It arrives by copy and paste: from websites that insert zero-width characters as an anti-scraping measure or as a per-reader fingerprint, from chat apps and AI tools with their own formatting layers, from PDFs, and from CMS editors.

Once it is in a document it propagates. Every copy of the text carries it forward, which is why the clipboard is the right place to stop it. It is the one checkpoint every paste passes through.

How to find and remove it

To confirm one is there, paste the text into an editor or inspector that renders invisibles. We walk through the practical methods in how to see hidden characters in any text. In a hex dump it appears as the UTF-8 bytes e2 80 8b.

To remove it once, most editors accept an escape in regex find-and-replace mode:

find (regex): \u200B
replace with: (nothing)

One nuance worth keeping: do not strip zero-width joiners along with it. U+200D is what holds a family emoji together, and removing it turns one emoji into three. Invisible junk should die, invisible meaning should live, and the difference between those two is the whole job.

Text cleaning is coming next to tdy.

tdy is a Mac menu-bar app that already tidies every link you copy. Stripping invisible characters on every copy, while preserving the ones real languages and emoji need, is the next upgrade. One email when it ships, nothing else.

Join the launch list

Related