Skip to content
13 min readUpdated 29 October 2026

Invisible Characters in Copied Text: Inspect and Clean

Find hidden code points in a pasted passage, understand their context, and remove supported copy/paste artifacts without rewriting visible wording.

You paste a paragraph into a form and it looks normal. Then search fails, a CSV import breaks, or a code editor rejects a line that appears empty. A common cause is invisible character copy: text that looks blank but still contains Unicode code points.

Deleting every hidden character isn't the fix. Some invisible characters control Arabic shaping, Indic text, bidirectional display, line breaking or emoji sequences, and removing those damages legitimate text. Clean by code point, keep the characters your languages need, and check the result in the application where it will be used.

If you came here to copy a blank character for a username or empty message, the characters people usually use are U+200B ZERO WIDTH SPACE, U+3164 HANGUL FILLER and U+2800 BRAILLE PATTERN BLANK. Many apps strip or reject them, and the same characters cause the problems described below when they end up in ordinary text, so test in the destination app before relying on one.

Table of Contents

What invisible character copy actually is

An invisible character is still part of the string. "Invisible" usually means it has no visible glyph or width in a default font, not that it's missing from the copied data.

The most familiar example is U+200B ZERO WIDTH SPACE. Unicode defines it as a possible word or line-break position, which is useful in scripts that don't separate words with visible spaces, such as Thai, Myanmar, Khmer and Japanese. A copied string can keep U+200B even when the reader sees nothing.

Other code points do different jobs:

  • U+200C ZERO WIDTH NON-JOINER (ZWNJ) stops certain characters from joining. It can be linguistically meaningful in Arabic-script and Indic writing.
  • U+200D ZERO WIDTH JOINER (ZWJ) connects characters for script shaping and emoji sequences.
  • U+2060 WORD JOINER prevents a line break without taking up width.
  • U+00AD SOFT HYPHEN marks a possible hyphenation point and may only appear when text reflows.
  • U+202A through U+202E are bidirectional embedding, override and formatting controls. They can change visual order while staying invisible.
  • U+FEFF can act as a byte-order mark at the start of text. Unicode recommends U+2060 instead for new word-joining use.
  • U+180E MONGOLIAN VOWEL SEPARATOR can turn up in legacy or transferred text and should be judged in context before removal.

Unicode treats these as separate tools, not one category of junk. The Unicode Standard's chapter on special characters explains why cleaning has to distinguish linguistic controls, word boundaries, byte-order marks and formatting artifacts.

Common invisible Unicode code points

Code point Name Visual effect
U+200B ZERO WIDTH SPACE Allows a break with no visible space
U+200C ZERO WIDTH NON-JOINER Prevents joining without a visible mark
U+200D ZERO WIDTH JOINER Joins characters or emoji sequences
U+2060 WORD JOINER Prevents line breaks invisibly
U+00AD SOFT HYPHEN Appears only when a line breaks at that point
U+202A to U+202E Bidirectional controls Change visual direction or order
U+FEFF Byte-order mark Usually invisible; often meaningful at the start of a file
U+180E MONGOLIAN VOWEL SEPARATOR Can remain invisible in transferred or legacy text

Start by identifying the exact code point rather than guessing from how the text looks. For a quick check, paste the text into the free invisible character remover. It runs in your browser with no account or upload, identifies the supported hidden characters it finds, and keeps joiners and direction controls where the surrounding script or emoji needs them. Then decide whether each flagged character is accidental or required.

Why invisible characters survive copy and paste

Copy and paste moves more than visible shapes. The clipboard carries a sequence of Unicode values, and the receiving application decides how to render it. A zero-width character transfers intact even though there's no glyph to show.

That's why copying from a browser, PDF, rich-text editor or office app can carry format controls across after the visible styling is gone. The destination may drop the HTML or RTF presentation while keeping zero-width spaces, soft hyphens, direction marks and byte-order marks.

The clipboard preserves data, not your visual impression

A browser can show two strings as identical while a search engine, parser, database or compiler treats them as different. Bidirectional controls add another problem: the displayed order can differ from the order stored in the string. The Unicode security considerations document this and connect it to risks such as visually misleading source code.

GUI copy also differs from terminal copy. Commands such as pbcopy and xsel, or a tmux buffer, generally pass the raw text stream, while a GUI app may offer HTML, RTF and plain-text versions on the clipboard at once. The receiving app picks one. That choice can change line endings, markup and formatting, but it doesn't guarantee that hidden Unicode controls disappear.

Practical rule: if a string behaves strangely, inspect the raw code-point sequence. Don't trust a screenshot, a rendered browser view or a word processor's cursor.

The AI watermark myth and what cleaning can and cannot do

Removing hidden Unicode is text hygiene. It doesn't tell you who wrote the text. A zero-width space is a character in the string, while a statistical watermark changes the model's word choices during generation and involves no special symbol. Google, Anthropic and OpenAI each describe their documented text watermarks as word-choice signals rather than hidden characters.

So a cleaned passage can still be AI-generated, human-written, edited, translated or assembled from several sources. And text containing a zero-width joiner isn't watermarked because of it. It may just contain an emoji sequence or a legitimate script control. Hidden characters are not evidence of AI authorship.

What character cleaning can fix

Targeted cleanup removes accidental controls that cause concrete problems:

  • A stray bidi override can make displayed order misleading.
  • A soft hyphen can cause unexpected wrapping or failed matches.
  • A misplaced byte-order mark can trip parsers that expect content to start immediately.
  • An accidental U+200B can split a word for search, comparison or validation.

What cleanup can show is limited: the selected characters were found and removed. It can't certify human authorship, establish provenance or guarantee a detector result.

Research on statistical watermarks shows why the two problems are separate. A 2026 paper that tested the open-source SynthID-Text implementation on open-weight models notes that detection strengthens with passage length and with the entropy of each word choice (SynthID-Text evaluation). That describes word choices across a passage, not characters you could delete.

OpenAI's text provenance post, published 5 October 2026, describes textGrain, a word-choice watermark rolling out to eligible ChatGPT and Codex text in the EU and available to API customers who opt in (it is off by default for them). OpenAI's evaluation discusses how detection varies with passage length and text type and how word substitution weakens it. See the OpenAI discussion of text provenance for the details. None of this involves invisible characters.

A quick technical check

In a code editor, search with a Unicode-aware regex. A common scan pattern covering U+200B to U+200F, the bidi controls U+202A to U+202E, U+2060 to U+2064 and U+FEFF is:

[​-‏‪-‮⁠-⁤]

That class includes ZWNJ, ZWJ and the direction marks, so use it to find characters, not as a blind replace. In PCRE or another Unicode-aware engine, \p{Cf} matches the broader Unicode Format category. That's useful for an inventory, but don't replace every match blindly either.

For how character cleanup differs from rewording, see the page on AI watermark removal and hidden Unicode. Treat any rewrite or change in detector score as a separate result from character cleaning.

How to detect hidden characters in pasted text

Use a code editor rather than a word processor. Word processors are built around appearance; you need a tool that exposes control characters and shows the underlying string.

Choose a verification surface

In VS Code, enable Render Whitespace and Render Control Characters, then check editor.unicodeHighlight.invisibleCharacters for the file type you use; defaults can differ between source code, Markdown and plain text. In Sublime Text, use Preferences > Settings to find whitespace display options. In Notepad++, enable Show All Characters. These views help with spaces, tabs and line endings, but use a code-point scan for invisible characters they do not expose.

Look for:

  • U+200B zero-width spaces
  • U+FEFF byte-order marks
  • U+200E and U+200F direction marks
  • U+202A through U+202E bidirectional controls
  • U+2060 word joiners

For programmatic checks, start with the targeted regex from the previous section, then use \p{Cf} when you need a full inventory of format characters. A broad scan tells you what's there. It doesn't tell you what to delete.

Compare the available workflows

Workflow Best fit Limitation
Online inspector or cleaner One short sample Many send content to a server; check whether the tool runs locally
Desktop editor Files you control and inspect often Needs setup and manual review
Regex replacement Repeatable daily cleanup A bad pattern can remove legitimate controls
Command line or script Batch jobs, CI checks and repositories Needs scripting knowledge and tested Unicode logic
Pre-commit hook Stopping recurrence in a codebase Needs team adoption
Hex inspection Confirming raw file contents Output takes interpretation

Browser developer tools and online Unicode inspectors are fine for a quick lookup. The Elements panel shows markup context, and a hex view confirms the raw bytes or code points independently.

Text copied from social platforms can be especially confusing. PostSyncer's Instagram tips explain how hidden or unusual text appears in one consumer app, which helps with context but doesn't replace code-point inspection.

Confirm with a raw-file check

When a regex result matters, run xxd or hexdump on the original file. That gives you a second view of the bytes and catches encoding assumptions. The browser's rendering is only one representation, and it can hide the exact character that caused the failure.

For more on how Unicode artifacts differ from statistical signals, see this guide to hidden Unicode versus statistical watermarks.

Tools and workflows to remove them

Pick the lightest tool for the job. An online cleaner is fine for a harmless snippet but isn't a production data pipeline. A desktop editor suits a few files. Batch processing belongs in a script with tests.

Online tools such as invisible-character.com, invisiblecharactertest.com and textcleanr.net exist for quick samples. Don't paste source code, customer records, credentials or confidential drafts into a service you haven't approved. Multilingual text needs extra care because an aggressive cleaner may remove controls required for correct rendering.

If the problem is rich formatting rather than individual characters, for example text pasted from a web page or word processor that brings fonts, links or HTML with it, the free plain text converter turns rich paste or HTML source into plain text in the browser. Formatting conversion on its own doesn't remove hidden Unicode, so turn on its optional hidden-character cleanup if you need both. It doesn't handle PDFs or fetch URLs. Other free cleanup tools are listed on the tools page.

For files on your machine, use Notepad++ Search & Replace in extended or regex mode, VS Code's regex find and replace, or Sublime Text's incremental search. These let you inspect matches before replacing them while the original stays under version control.

For repeated work, use the command line. Python can inspect unicodedata.category, and Perl and other Unicode-aware tools can scan and filter format characters. If the same artifacts keep entering a codebase, add the check to a pre-commit hook.

A safe cleanup pipeline

  1. Back up the original. The first cleanup should never be destructive.
  2. Scan and classify, recording each code point, its name and its position.
  3. Build an allowlist of controls needed for Arabic, Persian, Hindi, Bengali, Thai, Hebrew or emoji sequences.
  4. Normalize deliberately, using NFC or NFD as the application requires. Normalization changes how equivalent characters are encoded; it doesn't remove format characters.
  5. Remove only the characters your policy classifies as unwanted in that context.
  6. Re-scan the output and confirm the remaining sequence matches the expected baseline.
  7. Test in the destination: the editor, parser, database or publishing system.

A good pipeline is reversible. Keep the source, document the allowlist, and test the output instead of assuming that an empty regex result means the text is safe.

Safe cleanup without breaking real text

Blanket stripping is the quickest way to corrupt real writing. Arabic, Persian, Hebrew, Hindi, Bengali, Thai and emoji sequences can depend on invisible controls for joining, shaping, direction or display. In Unicode's terms, "default ignorable" doesn't mean safe to delete everywhere.

Use this sequence:

  • Back up the original string or file for comparison.
  • Inventory format characters with \p{Cf} and count them by code point.
  • Evaluate U+200C, U+200D, U+200E and U+200F against the languages and content you handle before removing any.
  • Keep valid directional sequences where the content needs them, and remove unpaired or unexpected overrides according to a documented policy.
  • Treat U+200B, U+FEFF, U+2060, U+2061 through U+2064, soft hyphens and U+202A through U+202E as removable only when they have no legitimate role in the target text.
  • Apply NFC if it suits the application, then re-scan to confirm the remaining sequence is expected.

The W3C guidance on bidirectional controls recommends HTML or XML direction markup, such as dir and bdo, when markup is available. That's safer than relying on plain-text direction controls.

An infographic detailing a four-step process for safely cleaning text without removing essential invisible formatting characters.

Final check: render the cleaned text in the target application, verify bidirectional order, test search and comparison, and preview emoji and multilingual text on the devices your readers use.

A copy-safe result has the unwanted code points gone, the required controls still in place, and output that behaves correctly after the next copy and paste.

  • invisible character copy
  • zero width space
  • unicode cleanup
  • remove hidden characters
  • copy paste text

Related articles