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

A zero width space (also written “zero-width space”) is a real character — Unicode code point U+200B — that occupies a position in a string but has no visible glyph and no width. It sits between two other characters as a permitted line-break point without inserting any visible gap, which makes it genuinely useful in a few technical situations and a common source of quiet, hard-to-diagnose bugs everywhere else: words that look joined or spaced normally can secretly contain one, breaking exact-text matching, character counts, and search without changing how anything looks on screen.

What a Zero-Width Space Actually Is

U+200B sits in the General Punctuation block of Unicode and belongs to the “format character” category, meaning it carries no glyph of its own and exists to influence how surrounding text behaves rather than to be seen. Specifically, it marks a place where a line-wrapping algorithm is allowed to break the line, similar in spirit to a hyphenation point, but without the small mark a soft hyphen leaves behind. It was originally intended for scripts such as Thai, Khmer, and Lao, which are written without spaces between words, so software still needs some way to know where it could wrap a long line if it has to.

How It Differs From Ordinary Spaces and Other Invisible Characters

It helps to compare the zero-width space against the handful of other characters people often lump together as “invisible”:

  • Regular space (U+0020) — has visible width, separates words, and is a normal line-break point.
  • Non-breaking space (U+00A0) — has visible width but specifically blocks a line break, the opposite behavior of a zero-width space.
  • Zero-width space (U+200B) — no width at all, and unlike a regular space, it does not visually separate anything; it only offers a break point.
  • Word joiner (U+2060) — also zero-width, but does the opposite job of a zero-width space by preventing a break at that position.
  • Zero-width joiner / non-joiner (U+200D / U+200C) — zero-width, but control whether adjacent characters visually merge (used in emoji sequences and several scripts), which has nothing to do with line-breaking.

The practical takeaway is that “invisible” does not mean “interchangeable.” Each of these characters has a distinct job, and treating them all the same when cleaning text can cause new problems, which is why a careful cleanup tool treats them separately instead of stripping every invisible code point the same way.

Legitimate Uses

Despite the problems below, the zero-width space has genuine uses:

  • Typesetting Thai, Khmer, Lao, Burmese, and other scripts that do not use spaces between words, where it gives a renderer a safe place to wrap a long line.
  • Marking a break opportunity inside long, unbroken strings such as URLs, email addresses, or file paths in responsive email or web layouts, so they can wrap without a visible space appearing in the middle.
  • Letting a long compound word or hashtag wrap gracefully on narrow screens without permanently splitting it with a hyphen.

It also turns up for less official reasons — people insert it into usernames, bios, or messages to slip past exact-match filters or to make a “blank” post or name possible on platforms that reject truly empty text. That works because filters checking for an exact banned word or an empty string often do not account for an invisible character sitting inside or around it.

Common Problems It Causes

Most zero-width spaces show up by accident, usually pasted in from somewhere else, and the problems they cause tend to be quiet rather than obvious:

  • Copied text: content pulled from a PDF, Word document, or a web page can carry hidden zero-width spaces left over from the original formatting or justification.
  • Usernames and handles: two names that look identical on screen can actually be different strings, which breaks uniqueness checks and can let someone register a name that appears already taken, or vice versa.
  • Search and matching: code that checks whether one string contains another, or compares two strings for equality, will fail silently if one of them has an extra invisible character the other does not.
  • Validation: a form field that is supposed to reject spaces or enforce a plain-text pattern may still accept a zero-width space, since it does not look like a normal space to whoever is testing the form.
  • Formatting and reflow: a zero-width space sitting next to punctuation in code or structured data can produce confusing syntax errors that are difficult to spot by eye.
  • Character limits: it still counts toward strict length limits — SMS, tweets, meta descriptions — so hidden copies can quietly eat into a budget you thought you had.

How to Detect and Remove It

Because it renders as nothing, you cannot reliably find a zero-width space by looking at text, and most word processors will not show it either. The practical approach is to run the text through a tool built to scan for it: paste your text into the Invisible Character Detector & Remover, which lists every zero-width space, non-breaking space, and similar hidden character it finds, shows roughly where each one sits, and lets you generate a cleaned copy without disturbing normal letters, punctuation, or emoji.

If you specifically need to add a zero-width space on purpose — for one of the legitimate line-break uses above — the Invisible Text Generator can produce one you can copy directly, rather than trying to type a character with no keyboard shortcut.

Practical Examples

  • A bio or display name copied from a “fancy text” generator can contain a zero-width space between words, so it looks like “user name” but is stored as “user​name” — visually identical to a version with a real space, yet neither matches a plain search for “username” or “user name.”
  • A long product URL emailed in a newsletter can wrap awkwardly across two lines on mobile; inserting a zero-width space after each slash gives the email client a safe place to break without adding a visible space.
  • A spreadsheet of survey responses pasted from a web form can fail an “exact duplicate” check even when two rows look the same, because one contains a trailing zero-width space the other does not.

Zero-Width Space vs. ZWJ and ZWNJ: An Important Distinction

People frequently treat every zero-width character as the same thing, but the zero-width joiner (U+200D) and zero-width non-joiner (U+200C) behave very differently from a zero-width space and deserve separate handling:

  • A zero-width space (U+200B) only ever offers a line-break opportunity. Removing it is virtually always safe because it never displayed anything to begin with.
  • A zero-width joiner (U+200D) fuses adjacent characters together — it is what turns several separate emoji into a single combined emoji, such as a family or a couple, and it is required for correct letter shaping in scripts like Devanagari.
  • A zero-width non-joiner (U+200C) does the opposite, keeping two characters from merging — it is used deliberately in Persian, Arabic-script languages, and Devanagari to stop letters from connecting when they normally would.

Deleting a zero-width joiner or non-joiner from text that relies on it can visibly change the result, splitting a combined emoji back into separate ones or altering how a word is displayed. That is why a good cleanup tool defaults to removing zero-width spaces automatically while leaving joiners and non-joiners as an opt-in choice.

Compatibility and Limitations

U+200B is a standard Unicode code point, so essentially any modern system that handles UTF-8 or UTF-16 text can store and transmit it without corruption. Where things vary is rendering and handling: browsers, fonts, and apps do not all treat it identically when it comes to line-wrapping behavior, some platforms silently strip it on save or submit, and a few older or stricter systems may reject text containing unusual format characters altogether. If you are relying on it for a specific line-break effect, it is worth testing in the exact browser or app you plan to use, since the outcome is not perfectly guaranteed everywhere.

FAQ

Is a zero-width space the same as pressing the spacebar twice?

No. Two regular spaces are still visible, still have width, and still separate words on screen. A zero-width space has no width and produces no visible gap at all.

Can I type a zero-width space from my keyboard?

Not directly — there is no standard key combination for it. You would need a Unicode input method, an escape sequence in code, or a tool like the Invisible Text Generator to copy one.

Does a zero width space hurt my Google rankings?

There is no verified evidence that Google specifically penalizes pages for containing zero-width spaces. That said, hidden characters inside titles, meta descriptions, or body text can interfere with exact keyword matching and make copied text behave unpredictably, so it is still sensible to keep important text clean.

Will removing zero-width spaces change how my text looks?

No. Since the character has no visible glyph to begin with, removing it does not change the appearance of your text, only the underlying string — which is exactly what fixes the matching and counting problems it causes.

Do ChatGPT, Claude, or Gemini secretly insert zero-width spaces as a watermark?

There is no reliable evidence of a universal, deliberate watermarking scheme built into AI-generated text. Hidden characters do sometimes show up in text copied out of a chat interface, document, or web page, but that is typically a side effect of how the content was rendered or copied, not proof of secret tracking. If you want certainty about a specific piece of text, run it through the Invisible Character Detector & Remover to see exactly what it contains.

Related Tools