Guide

Zero Width Space U+200B: What It Is, Why It’s Invisible, and How to Find It

Zero Width Space, usually shortened to ZWSP, is the Unicode character U+200B. It’s a real character, but unlike the space you type with your keyboard, it normally doesn’t create a visible gap.

Its main job is to provide an invisible place where text can break. That’s useful when a line may need to wrap even though an ordinary visible space wouldn’t make sense.

It also explains a surprisingly common text problem: two strings can look identical while one of them contains an extra U+200B.

Zero Width Space at a Glance

PropertyValue
Code pointU+200B
Unicode nameZERO WIDTH SPACE
AbbreviationZWSP
Visible widthNormally none
Main purposeInvisible word separation and line-break control

ZWSP is part of the wider family of invisible and special space characters. These characters may all look blank, but they can affect text in very different ways.

Why Is Zero Width Space Invisible?

The word space is a little misleading here.

U+0020 SPACE normally creates visible separation between words. U+200B ZERO WIDTH SPACE is designed to have no intrinsic visible width.

So if ZWSP appears between:

A

and:

B

you may still see:

AB

But the underlying text could actually be:

U+0041 + U+200B + U+0042

To your eyes, it looks like two characters. To software, there are three code points.

What Does ZWSP Actually Do?

ZWSP can mark a place where a word or line break is allowed without adding an ordinary visible space.

It’s useful in situations where text may need another wrapping point but inserting a visible blank would change how the text looks or is interpreted.

A good way to think about U+200B is as an invisible break opportunity, not as a tiny version of a regular space.

Does ZWSP Force a Line Break?

No.

ZWSP doesn’t mean “start a new line here.” It simply gives the line-breaking process another place where a break may be allowed.

If there’s enough room, the text can stay on the same line and you won’t notice the ZWSP at all.

If the text needs to wrap, that position may become the break point.

Why Does ZWSP Show Up in Copied Text?

Copy and paste transfers encoded text, not just what you can see on the screen.

If the original text contains U+200B, the ZWSP may be copied along with the visible characters even though you never saw it.

That’s one reason text copied from websites, documents, messaging apps, or other sources can behave differently from text you typed yourself. The broader causes are covered in why copied text can contain invisible characters.

How Can ZWSP Make Two Strings Different?

Imagine these two strings:

username

and:

user[U+200B]name

They may look exactly the same in an interface that doesn’t reveal invisible characters.

But they’re different Unicode sequences.

Depending on the software, that difference can affect:

  • exact string comparisons;
  • search and find operations;
  • database matching;
  • usernames and identifiers;
  • filenames;
  • URLs or URL components;
  • source code;
  • character counts;
  • line wrapping.

So if two pieces of text look the same but behave differently, an invisible code point like U+200B is worth checking.

ZWSP Is Not ZWJ or ZWNJ

Three characters with similar names are especially easy to mix up:

Code pointAbbreviationNameMain role
U+200BZWSPZERO WIDTH SPACEProvides an invisible break opportunity
U+200CZWNJZERO WIDTH NON-JOINERInhibits joining behavior where applicable
U+200DZWJZERO WIDTH JOINERInfluences joining or combined presentation where applicable

The words zero width describe how little visible space these characters normally occupy. They don’t mean the characters do the same thing.

If you need to compare all three, see Zero Width Space vs Zero Width Joiner vs Zero Width Non-Joiner.

ZWSP vs Word Joiner

ZWSP is also easy to confuse with U+2060 WORD JOINER, usually shortened to WJ.

Both are normally invisible and zero-width, but their line-breaking roles point in opposite directions.

CharacterTypical line-breaking role
U+200B ZERO WIDTH SPACEProvides a possible break opportunity
U+2060 WORD JOINERNormally prevents a break at that position

That distinction is covered in more detail in Word Joiner vs Zero Width Space.

How Can You Find a Zero Width Space?

You usually can’t find U+200B just by looking at the rendered text. You need to inspect what’s actually encoded.

Useful methods include:

  • turning on invisible or formatting marks in an editor;
  • viewing the Unicode code points in the string;
  • checking whether the character count is larger than expected;
  • comparing copied text with a freshly typed version;
  • using a Unicode-aware text inspector.

If you’ve copied an unknown character and don’t know what it is, the identification tools on What Is This Symbol can help reveal the actual character instead of relying on its appearance.

Can You Search for U+200B?

Yes, as long as the tool you’re using can search for the actual Unicode character or let you work with code points.

Typing a normal space into the search box won’t necessarily find U+200B. U+0020 SPACE and U+200B ZERO WIDTH SPACE are different characters.

That distinction is useful when cleaning imported data or trying to understand why visually identical values don’t match.

Should You Remove ZWSP?

Only if you know it isn’t needed.

An unexpected ZWSP inside an identifier or imported data field may be accidental and safe to remove.

In other text, it may have been inserted intentionally to create a valid word or line-break opportunity.

A safer process is:

  1. confirm that the character is U+200B;
  2. work out why it’s there;
  3. check whether its break behavior is useful;
  4. remove it only if that behavior isn’t wanted.

Why Does Retyping Sometimes Fix the Problem?

If you manually retype a short string, you usually enter only the visible characters you intend.

An invisible U+200B that came along with copied text may simply disappear.

That’s why retyping can seem to “magically” fix a search, username, or matching problem. The new string no longer contains the hidden code point.

The Main Point

U+200B ZERO WIDTH SPACE is invisible, but it isn’t empty.

It’s a real Unicode character used to provide invisible word separation or a possible line-break location.

Because it normally doesn’t show a glyph or visible gap, it can sit unnoticed inside copied or processed text. If two strings look identical but behave differently, checking for ZWSP is a good place to start.

Leave a Comment