Skip to content
11 min readUpdated 29 October 2026

Zero-Width Space Copy: Inspect and Clean U+200B

Find zero-width spaces in copied text, understand their legitimate uses, and remove unwanted characters with a local Unicode inspector.

You paste text that looks clean, submit it, and something odd happens. A search misses it, a URL breaks or a filter fails. Nothing looks wrong on screen, because the problem isn't visible.

That is the trouble with copied zero width spaces. Text can look normal while carrying an invisible character in the underlying string. If you work in content, code, moderation or data cleanup, one hidden character can cost you a lot of debugging time.

Table of Contents

What zero width spaces are and why they matter

A zero width space is a non-printing Unicode character. It takes up no visible room, but software still reads it as part of the text. Unicode assigns it U+200B (decimal 8203), encoded in UTF-8 as the bytes E2 80 8B. It first appeared in Unicode 1.1 in June 1993, so it is an old text-processing character, not a new trick (Unicode Symbol reference).

Why it keeps showing up

The zero width space was designed to mark line-break opportunities where a visible space would be wrong. That matters in scripts such as Thai, Khmer and Lao, and anywhere text needs a wrap point without a gap (Unicode Explorer reference). In everyday work it usually arrives through copy and paste from web pages, PDFs, chat interfaces and rich-text editors that insert it as a formatting hint.

If text came from somewhere else, assume invisible characters may have come with it.

Because it survives copy and paste while staying invisible, a string can look fine and behave differently. Typical symptoms are failed form validation, odd CMS imports, and search that fails because the match is no longer exact.

Decorative text sources show a related problem. A bio symbol generator for Instagram is a reminder that copyable text is not always plain text, so be careful before moving such text into a production workflow.

Why writers and developers should care

For writers, a copied zero width space can break headings, links or keyword matches. For developers, it can break equality checks, regex matches and URL handling. Security teams have a further reason to care: invisible characters can hide intent, not just break formatting.

A hidden character can disguise a change in a username, a file path or a snippet of text that a reviewer believes they read in full. If content came from an untrusted or messy source, inspect the underlying characters rather than trusting the screen.

The technical details behind U+200B

U+200B sits in Unicode's General Punctuation block and is classed as a format character, not a visible space. Unicode documentation describes it as allowing a line break where one would otherwise not be permitted, so it changes layout without adding a glyph (Unicode documentation). In practice it tells the renderer "you may break here" while staying hidden.

How it differs from other invisible characters

The zero width space is often confused with the zero width joiner, zero width non-joiner, soft hyphen and byte order mark. Each behaves differently, and removing the wrong one can change meaning or formatting in ways that are hard to spot.

Character name Code point UTF-8 bytes Main purpose
Zero Width Space U+200B E2 80 8B Optional line break without visible space
Zero Width Non-Joiner U+200C E2 80 8C Prevents joining in scripts that join letters
Zero Width Joiner U+200D E2 80 8D Requests joining in scripts and emoji sequences
Soft Hyphen U+00AD C2 AD Optional hyphenation point
Byte Order Mark U+FEFF EF BB BF Encoding marker at the start of a file

When you scan raw bytes, E2 80 8B is the UTF-8 pattern to look for, and 200B is the UTF-16 code unit people use when searching or filtering (encoding reference). Text can look normal in one editor and fail in another because tools preserve, strip or re-encode invisible characters inconsistently (invisible-character handling notes).

Why it survives across platforms

Browsers usually keep it when you copy. Rich-text editors sometimes insert it for formatting. PDF extraction can add it around line boundaries. So it keeps turning up when text moves between apps that disagree about invisible formatting.

Hidden characters like this are different from the statistical watermarks some AI providers use, which live in word choice and add no characters. Our comparison of hidden Unicode vs. statistical watermarks explains the difference. A zero width space in copied AI text usually comes from the copy path and is not evidence of AI authorship.

Transcript tools are another place where extraction quirks show up in real content pipelines. For an example of a copy-heavy workflow, you can compare YouTube transcript options with TransClipper.

Security risks most guides skip

Many copy guides treat the zero width space as a nuisance. It can also be used as a covert channel. A 2026 preprint, Reverse CAPTCHA, encoded each ASCII character of a hidden instruction as eight bits, using the zero width space for 0 and the zero width non-joiner for 1, and inserted the result into an ordinary-looking question. It then tested whether language models would follow the hidden instruction, and found that tool access and explicit decoding hints made them much more likely to do so.

A diagram illustrating six key cybersecurity risks that lead to data breaches and potential organizational impact.

Why visual checks fail

You can't see a character with no width in a pasted paragraph, and you probably won't notice it in a diff unless your tools display hidden code points. Checking the string itself matters more than reading the text.

Hidden Unicode can be both a formatting artifact and a covert channel.

That matters for moderation, compliance and prompt handling. Not every hidden marker is hostile; this zero-width space overview lists legitimate uses such as breaking long URLs and adding invisible separators or markers. The same properties that make those uses work also let the character break string matching and URLs, which makes it relevant to spam filters and forensic review.

The practical risk

An attacker doesn't need a visible payload if instructions can be buried in invisible characters. That affects search filters, content scanning and any workflow that assumes what you see is what the system sees. A visual check of pasted text is a guess, not a control.

If you handle user-generated content or AI-assisted drafts, scan for invisible characters before approval, before publishing, and before anything enters a system that relies on exact string matching.

How to detect invisible characters in your text

The quickest check for most people is the free invisible character remover. Paste text in and it lists supported hidden characters by name and code point and removes them in your browser, with no account or upload, without changing your wording, and while keeping the joiners that emoji and some scripts need. If the paste also carries rich formatting or HTML, the plain text converter reduces it to plain text first; formatting conversion on its own doesn't remove hidden characters unless you turn on its cleanup option. Both are listed on the tools page.

To do it yourself in a browser, paste the suspect text into a test field and inspect each character with codePointAt(). This small function wraps each U+200B in a visible marker:

function showInvisible(text) {
  return [...text].map(ch => ch.codePointAt(0) === 0x200B ? '<span style="background:yellow">[ZWSP]</span>' : ch).join('');
}

It doesn't clean anything. It only shows where the character is.

Fast ways to inspect a file

Online Unicode inspection tools such as Unicode Inspector and BabelStone show the underlying code points rather than the rendered text. In VS Code, a regex search for ​ flags matches across a document; Sublime Text and Notepad++ use \x{200B} instead. In a terminal, grep -P '\x{200B}' on the raw text or a byte-level tool like hexdump helps when the file itself is the problem.

Method Environment Best for Skill level
Browser character scan Browser dev tools Quick checks on pasted text Basic
Unicode inspection site Web Manual review of suspicious content Basic
Editor regex search VS Code, Sublime Text Large documents and repeated cleanup Intermediate
Terminal byte inspection Shell Raw files, logs, exports Intermediate
Custom script JavaScript, Python Batch detection and automation Advanced

Hidden characters often travel with other formatting marks. If you fix only the one you noticed, the same paste problem can return on the next import, so it is better to detect broadly at first.

Practical ways to remove zero width spaces

For a single paragraph, manual cleanup is fine. Open the text in an editor with regex search, search for ​ (or \x{200B}, depending on the editor), replace it with nothing, and check the result where it will be used. If the source was messy, also look for U+200C, U+200D and U+FEFF, but check context before removing the joiners.

An infographic titled When to Use Each Cleanup Approach illustrating three methods: Simple Edit, Recurring Project, and Systemic Integration.

When cleanup needs to scale

If hidden characters keep arriving from AI chats, web scrapes or heavy copy-and-paste work, a sanitizing step is more efficient. A browser extension or local script can strip hidden Unicode on paste, and for scraping pipelines a cleanup pass before storage keeps it out of later analysis. See data cleaning for enterprise scraping for that kind of pipeline.

A simple JavaScript cleanup looks like this:

text = text.replace(/[​‌‍]/g, '');

The same in Python with re.sub():

import re
clean = re.sub(r'[​‌‍]', '', text)

These patterns are deliberately simple. Be aware that they also remove U+200C and U+200D, which break multi-part emoji (such as family or profession emoji) and change shaping in scripts like Persian, Arabic and Devanagari. For English text without emoji they are usually safe; otherwise, remove only U+200B and U+FEFF ([​]), or use a tool that keeps legitimate joiners.

Prevention beats repeated cleanup

If your CMS or editor can reject invisible characters on input, turn that on. If your CI pipeline can lint for them, add the rule. If your team pastes from the web all day, have them paste through a sanitizing step rather than straight into the publishing field. The invisible character remover above is one option for that step, since it removes supported zero width characters without rewriting anything.

Manual cleanup is fastest for one-off fixes. Scripts and sanitizers are better when the same character keeps returning.

When to use each cleanup approach

For one pasted line, a quick find-and-replace is enough. If the same problem keeps landing in drafts, a paste-time sanitizer or editor rule is the sensible middle ground. If you handle user-generated content or batch imports, cleanup has to be part of the code, not a habit people need to remember.

Match the effort to your exposure. At low volume, manual work is fine. When contamination keeps recurring, tooling pays off. Security-sensitive inputs need automated detection, with a person reviewing what gets flagged.

A chart comparing four data cleanup approaches: Quick, Standard, Deep, and Preventive, highlighting their use cases and benefits.

If you are also wondering about AI text watermarks, read how to remove AI watermarks from text. Those watermarks sit in word choice, so removing zero width spaces doesn't affect them.

Pick the narrowest method that still protects your workflow.

  • zero width space copy
  • invisible characters
  • unicode cleanup
  • text sanitization
  • hidden characters

Related articles