Unicode & Formatting

Zero Width Space (U+200B, \u200b): What It Is and How to Remove It

A beginner-friendly technical guide to U+200B, the Unicode ZERO WIDTH SPACE: why it is invisible, when it is useful, when it is accidental, and how to detect and remove it.

AI Watermark Tools•Published •Updated •8 min read

Direct answer

U+200B is the Unicode character ZERO WIDTH SPACE (often abbreviated ZWSP). It is a real character in the string. It does not draw a mark, and it does not take horizontal space, but programs can still see it.

It is not inherently an AI watermark. Web pages, editors, and chat UIs sometimes insert it for wrapping or cursor behavior. Copied text can keep it by accident.

To check a paste, use the Invisible Character Remover.

What is U+200B?

Unicode name: ZERO WIDTH SPACE

PropertyValue
Code pointU+200B
Unicode nameZERO WIDTH SPACE
Common abbreviationZWSP
Typical appearanceNone
General categoryFormat (Cf)

In memory it is just another code point, the same way A is U+0041. The difference is rendering: most fonts give U+200B a width of zero and no ink.

Nearby characters that people confuse with it:

  • U+0020 SPACE — the ordinary visible gap
  • U+00A0 NO-BREAK SPACE — visible gap that will not wrap
  • U+200C ZERO WIDTH NON-JOINER
  • U+200D ZERO WIDTH JOINER
  • U+2060 WORD JOINER — zero width, but discourages a break
  • U+FEFF ZERO WIDTH NO-BREAK SPACE / BOM

A broader list is in the invisible Unicode characters guide.

U+200B in code, HTML and URLs (\u200b, ​, %E2%80%8B)

The same character is written differently depending on where you see it. If you searched for one of these, they all mean ZERO WIDTH SPACE:

Where you see itHow it is written
Unicode notationU+200B
JavaScript, JSON, Java, Python, C#\u200B (also \u200b)
HTML hex entity​
HTML decimal entity​
HTML named entity​
CSS content\200B
URL-encoded (UTF-8)%E2%80%8B
UTF-8 bytesE2 80 8B
UTF-16 code unit0x200B

Why you might see “​” as literal text: some editors, Reddit's among them, have inserted ​ to hold an empty paragraph open. When that text is copied somewhere that does not decode HTML entities, the entity shows up as visible characters instead of an invisible space. Delete it like any other stray text.

Why “200b” shows up in searches: code-point inspectors and error messages often print the bare hex value, so 200b, u200b and u 200b all refer to the same character.

Why it is invisible

Visible letters have a glyph outline and an advance width. U+200B is defined to have no advance width. There is nothing to see, and the following character is drawn immediately after the previous one.

You can still:

  • step the caret across it
  • include it in copy/paste
  • count it with length
  • match it with a regex such as \u200B

Invisibility is a rendering property, not a sign that the character is “secret” or cryptographic.

Legitimate uses

U+200B exists because sometimes you want a break opportunity without showing a space.

Examples of intended use:

  • Allowing a long URL or file path to wrap in a narrow column
  • Suggesting a line break inside a compound identifier
  • Helping layout engines split a string that has no ordinary spaces

In those cases, deleting every U+200B can make layout worse (a long token that overflows). The character is doing its job.

Accidental presence in copied text

U+200B also appears where nobody asked for a wrap hint:

  • Rich-text editors inserting break points while you type
  • Web apps using zero-width spaces to control selection or markdown rendering
  • Copying from a chat or document view into a plain-text field

Copied AI assistant replies can include this last case. That is a clipboard / UI issue. It is not evidence that a model watermarked the paragraph.

If you are cleaning a ChatGPT paste, the workflow is described in how to clean ChatGPT text.

Problems it can cause

Unwanted U+200B characters can:

  • Split a word so search and spell-check fail (for + U+200B + ward will not match forward)
  • Change equality checks between two strings that look identical
  • Add to SMS, tweet, or form character limits
  • Break identifiers, CSS class names, or JSON keys if pasted into code
  • Produce confusing diffs in git (“nothing changed” visually, bytes did)

They do not, by themselves:

  • prove the text came from an AI system
  • remove a statistical watermark if one existed
  • encrypt or decrypt the content

How to detect it

Because it has no glyph, you need a tool or a code-point view.

In the browser tool: paste into the Invisible Character Remover. If U+200B is present, it is listed by name.

In JavaScript:

text.includes('\u200B')

or

(text.match(/\u200B/g) || []).length

A safe example. The visible word email should be five letters. If the stored string is em + U+200B + ail, many fonts still show email, but:

  • text === 'email' is false
  • a search for email may miss it

More inspection techniques are in how to detect hidden Unicode characters.

How to clean it

For plain-language drafts where wrap hints are not needed:

  • Detect U+200B.
  • Delete those code points.
  • Leave letters, punctuation, and ordinary spaces as they are.

The Invisible Character Remover removes cataloged zero-width spaces from pasted text. The AI Text Cleaner does the same as part of a broader whitespace cleanup.

Do not confuse this with deleting all zero-width characters. How to remove invisible characters covers joiners that you may need to keep.

Remove zero-width spaces in code and editors

  • JavaScript: text.replace(/\u200B/g, '')
  • Python: text.replace('\u200b', '')
  • Several zero-width characters at once (regex): [\u200B\u2060\uFEFF] matches the zero width space, word joiner and BOM; replace matches with an empty string. Leave U+200C and U+200D out unless you are sure the text has no emoji or joining scripts.
  • Microsoft Word: open Find and Replace, search for ^u8203 (the decimal code for U+200B), leave Replace empty, and choose Replace All.
  • VS Code: invisible Unicode characters are highlighted by default. Use Find with regex enabled and search for \u200B to select every occurrence.

If you *want* break opportunities in a long URL, you might keep U+200B in that URL only. Cleaning tools on this site are aimed at stray artifacts in prose, not at designing typography.

Bottom line

U+200B is ZERO WIDTH SPACE: a format character with no visible width. It has legitimate layout uses and common accidental uses after copy and paste.

It is not, by definition, an AI watermark. Detect it, then remove it when it is leftover noise.

#Unicode#Zero Width#U+200B#Invisible Characters

Related tools

FAQ

U+200B is the Unicode code point named ZERO WIDTH SPACE. It is a real character with no visible width. Software may still treat it as a line-break opportunity.