Skip to content
15 min readUpdated 27 November 2026

Invisible Character Unicode: How to Find and Remove Them

Invisible Character Unicode explained: where zero-width and bidi characters hide, how to detect them, and how to remove them without breaking text.

A colleague sends a document for a final read. The sentences look clean. Then a search for a name in the file returns nothing, even though the name sits right there on the page. Or a form rejects a pasted address with a message about invalid characters, and nothing about the address looks wrong.

Both failures come from the same place. A string can carry code points that draw no glyph at all: zero-width spaces, joiners, direction controls, byte-order marks. The umbrella term is invisible character Unicode, and these characters cause trouble in three separate places that people tend to blur together. Some break search, matching and data joins. Some are a spoofing risk in code and URLs. Some have nothing to do with hidden characters at all and belong to a statistical watermark instead.

Sorting those three apart is most of the work.

Table of Contents

Invisible Unicode Characters at a Glance

Invisible Unicode characters are code points with no visible glyph. They occupy positions in a string, they survive copy and paste, and they render as nothing in nearly every editor. The table below lists the families you're most likely to meet in pasted text, grouped by behavior rather than by code point order, with the default action for each.

Code point Name What it does Default action
U+200B ZERO WIDTH SPACE Creates a line-break opportunity with no visible width Delete in English prose, copied identifiers and URLs
U+200C ZERO WIDTH NON-JOINER Stops joining between letters in contextually shaped scripts Keep in Arabic, Persian and Indic text
U+200D ZERO WIDTH JOINER Joins characters, including emoji sequences and Indic conjuncts Keep in emoji and script text; delete when unexpected in English prose
U+2060 WORD JOINER Prevents a line break between neighboring characters Delete unless typography requires it
U+FEFF ZERO WIDTH NO-BREAK SPACE Byte-order mark at the start of a file; stray copies inside text Delete stray copies; keep a leading byte-order mark only where a file format expects it
U+202A to U+202E Embedding, override and pop controls Reorder displayed text across a scope Flag; remove or require approval in code and configuration
U+2066 to U+2069 Isolate and pop isolate controls Reorder text inside an isolated span Flag; confirm each isolate closes with U+2069

Read that table as a lookup, not a deletion list. The Unicode core specification separates characters that create a break opportunity from characters that affect shaping, and that distinction is what makes a blanket delete dangerous. A routine that strips every visually empty code point can wreck legitimate multilingual typography or change where lines wrap.

Practical rule: classify by function first, then delete. Code point, name, count and surrounding context are the four things a report needs to show.

Here's the failure in miniature. A word that reads as password on screen may be stored as pass, then U+200B, then word. Search for "password" and you get nothing. Paste it into a login field and the comparison fails. A free invisible-character inspector reports the character as U+200B ZERO WIDTH SPACE, gives a count of 1, and shows the words on either side of it. That tool runs in the browser, has no usage limit, needs no signup and uploads nothing.

Scan the text you have. Then decide which rows apply to it.

Where Invisible Characters Come From

Think of a document as a stage production. Letters, digits and punctuation are the actors the audience watches. Invisible characters are the stage crew: they set lighting cues, move scenery and tell the actors where to stand, and the audience never sees them.

Three cartoon letters A, B, and C standing on a theater stage, wearing top hats under spotlight.

Unicode was never only a list of visible marks. As the Unicode version statistics record, modern Unicode spans U+0000 through U+10FFFF, a total addressable range of 1,114,112 possible code points. Part of that space is reserved for formatting and control characters whose whole job is to influence layout, direction, segmentation or interpretation. U+200B is the obvious example, and bidirectional controls are the consequential one.

These characters enter text through a short list of doors:

  • Copying from web pages and rich-text editors. HTML carries hidden formatting, and a browser clipboard often brings some of it along.
  • Extracting text from PDFs. Line breaks and soft hyphens come through as real characters, and stray marks follow them.
  • Output from AI chat interfaces. Assistants sometimes emit non-breaking spaces, zero-width characters and smart punctuation that a plain editor would never produce.
  • CMS fields and email quoting. Reply chains pick up marks from every client that touched the message.
  • Subtitle files and mobile keyboards. Autocorrect and captioning tools insert joiners and no-break spaces to control how text displays.

The source is the strongest clue you have. A paragraph copied from a web page usually carries a different set of hidden characters than the same paragraph typed fresh into a plain editor, and text pulled from a PDF will have hard line breaks that typed text doesn't.

One caution before any cleanup. An invisible character is a fact about a string's history, not a verdict on who wrote it. Finding U+200B tells you something passed through a tool that emits U+200B. It tells you nothing about authorship.

How to Detect Hidden Characters in Your Text

Detection is the step people skip, and it's the one that determines whether the removal is safe. The invisible-character inspector is the fastest starting point: it runs in the browser, scans for hidden characters as you type, and shows supported characters by code point with their Unicode names. No signup, no credits, no upload.

A magnifying glass revealing hidden symbols and text over a sentence about curiosity and open worlds.

A detection routine that works on real documents

  1. Paste the whole text, including headers, footers and any metadata fields that travel with it. A hidden character in a title field breaks a search just as effectively as one in the body.
  2. Read the count for each code point, along with its Unicode name and the words around it. Don't hunt for blank gaps by eye, because there's nothing to see.
  3. Search for the families from the first table: U+200B to U+200D, U+2060, U+FEFF, U+202A to U+202E and U+2066 to U+2069. Use a find-all tool that accepts code points, or a character class in your editor.
  4. Record the counts and locations before editing. Without a baseline you can't tell a successful cleanup from a cleanup that removed the wrong things.
  5. Note where each hit sits. The same character is noise in running English prose, a shaping requirement inside an Arabic word, and a security event inside a code string or a URL.
  6. Check whether the hit falls inside a word or at a boundary. A zero-width space mid-word breaks matching; one at a line boundary may be doing legitimate work.

A clean-looking page proves nothing. Several of these characters render as zero pixels, so the only reliable evidence is a code point listing.

For developers, a find-all pattern

Two patterns cover the common cases: [\u200B-\u200D\u2060\uFEFF] for the usual stray characters, and [\u202A-\u202E\u2066-\u2069] for bidirectional controls. Use them to find matches and report them, not to delete everything they touch. Joiners in Arabic, Persian, Indic and emoji text have to survive.

The output of this stage is a list: code points, counts, positions. Nothing has been removed yet.

How to Remove Them Without Breaking Your Text

Removal is a sequence of decisions, not a single delete key. Work through these seven steps in order, and keep a pristine copy of the original so you can diff against it later.

  1. Preserve the source. Copy the untouched text somewhere safe before you change a character.
  2. Name the context. English prose, copied identifiers and URLs, emoji sequences, or Arabic, Persian and Indic text. The answer changes what's safe to remove.
  3. Delete U+200B, stray U+2060 and stray U+FEFF in English prose and identifiers. In those settings they rarely carry meaning, and they're the usual cause of failed searches and mismatched joins.
  4. Keep U+200C and U+200D wherever they change shaping. Removing a joiner from an Arabic word or an emoji sequence doesn't clean the text, it corrupts it.
  5. Flag bidirectional controls and remove them from code, configuration and security-sensitive fields unless a named reviewer has approved each one.
  6. Apply standard Unicode normalization for the target, usually NFC for prose. Be deliberate about NFKC, which folds compatibility forms such as full-width letters and changes the text more than you may intend.
  7. Fix line structure separately. Remove hard line breaks while keeping paragraph breaks, then convert rich pasted text or HTML into clean plain text with the plain text converter. Both the line-break and plain-text utilities run locally in the browser.

If the cleaned text is heading into a curated digest or a newsletter, the surrounding editorial workflow matters as much as the characters. The editor checklist for curation-heavy newsletters covers link hygiene, attribution and layout checks that a code-point scan will never catch.

Cleanup symptoms and what actually caused them

Symptom Likely cause Fix
Search misses a word that looks correct Zero-width space inside the word Delete U+200B and stray U+2060, then search again
Arabic or Hindi text looks broken after cleaning A joiner or non-joiner was deleted Restore U+200C or U+200D and clean only the characters around them
Emoji sequence shows as separate symbols Zero-width joiner was removed Keep U+200D inside the emoji sequence
Pasted text wraps at unexpected points Word joiner or zero-width space Remove U+2060 and stray U+200B, then recheck line breaks
Code behaves differently from how it reads Bidirectional control in a string or comment Remove or reject U+202A to U+202E and U+2066 to U+2069, then review the diff
Two identical-looking strings do not match Stray U+FEFF or other invisible mark Normalize the text and delete the stray character
Paragraphs join into one line after pasting from a PDF Hard line breaks, not invisible characters Run line-break removal and keep paragraph breaks

Finish with a diff against the original and a final pass over both the visual output and the code point list. Both checks, every time.

Bidirectional Controls and the Spoofing Risk

Bidirectional controls are where invisible characters stop being a formatting nuisance. Unicode's Bidirectional Algorithm exists so that right-to-left languages such as Arabic and Hebrew can display correctly, and directional controls let a document reorder displayed text within a scope. That's a legitimate feature. It's also a way to make a reader see one thing while a machine processes another.

The 2021 Trojan Source research made this concrete. As documented in the Trojan Source paper, bidirectional control characters can make source code appear different from the sequence a compiler or interpreter processes. A reviewer reads a comment or a string literal as having boundaries in one place; the toolchain sees boundaries somewhere else. The paper also identifies U+200B as a character that can be slipped into string literals to change comparisons without any visible difference.

The mechanism is worth stating plainly. Characters like U+202A LEFT-TO-RIGHT EMBEDDING, U+202E RIGHT-TO-LEFT OVERRIDE and U+2067 RIGHT-TO-LEFT ISOLATE reorder what's drawn on screen. Their terminators, U+202C and U+2069, close the scope. Nothing about the underlying code point order changes.

A split image shows a man and a woman considering the relationship between facts and building trust.

Keep three spoofing mechanisms separate in your head: hidden characters that render as nothing, direction controls that reorder display, and confusable look-alike letters. They need different defenses, and a tool that handles one won't handle the others.

Practical rule: bidirectional controls are high-risk metadata. Detect them even when the rendering looks normal, show their escaped code points in review interfaces, and reject them or require explicit approval in code, configuration and security-sensitive documents.

Normalization does not fix this. The problem is display ordering and control scope, not canonically equivalent sequences, so converting the text to a tidy form leaves the spoof intact.

A short review checklist applies to any diff: are there escaped \u202A to \u202E or \u2066 to \u2069 sequences; does every isolate close with U+2069; does the rendered comment match the parsed string; and would a reviewer reading only the diff reach the same conclusion as the interpreter?

Invisible Characters Versus AI Watermarks

Three operations get marketed as one, and they aren't. Keeping them apart stops you expecting a character scrub to do something it can't.

  • Hidden-Unicode cleanup removes format artifacts: zero-width marks, stray byte-order marks, direction controls. The wording stays identical.
  • Standard Unicode normalization rewrites characters into a consistent form, so visually similar sequences compare equal. It changes representation, not vocabulary.
  • Statistical watermark rewriting changes the word and token choices that carry a detection signal across a passage.

Google's SynthID-Text explains why the third stage is different. As described in Nature's peer-reviewed account of SynthID-Text, the watermark is applied during generation by biasing token selection according to a secret signal, and detection runs computationally without access to the underlying model. The signal is spread through sampling choices across the whole passage. Deleting zero-width characters, swapping line breaks or converting to plain text doesn't necessarily disturb that pattern at all.

An illustration showing three steps to improve text quality: cleaning format, aligning letters, and reflowing paragraphs.

A meaning-preserving rewrite targets the wording instead, and it carries its own risk. A rewrite can shift a name, a figure or a tone, which is why human review is part of the process rather than an optional extra. Simple Unmark's cleaner combines hidden-character removal with a rewrite that aims to preserve meaning, and the AI watermark remover page describes that method and its limits. The free inspector covers only the first stage.

A watermark signal says something about how a passage was produced. It doesn't identify an author, and it doesn't prove a specific person or tool wrote a specific paragraph.

Scope, stated plainly: Simple Unmark works on text only. It doesn't accept images, video, audio or uploaded files, it doesn't remove visible watermarks, and it doesn't offer a working AI detector. If the deliverable includes video or ad creative, that's a separate category of tool, and something like the ShortGenius AI ad generator sits in it.

Verify the Cleaned Text Before You Use It

A detector result is not authorship proof, and a paraphrase is not a guarantee. A survey of AI-generated-text detection research reports that state-of-the-art systems are vulnerable to paraphrasing and cites a measured 71% accuracy degradation for a zero-shot detector after T5-based paraphrasing, as recorded in the survey of AI-text detection methods. Detection reliability also shifts with language, model, passage length and how much rewriting happened.

So verify in this order.

  1. Diff against the original and confirm that only the intended characters or words changed.
  2. Rerun the code-point scan and confirm the target families are gone.
  3. Check the joiners. Arabic, Persian, Indic and emoji text must still have U+200C and U+200D where they belong.
  4. Confirm no bidirectional controls remain in code, configuration or security-sensitive fields.
  5. Test in the actual downstream system: the parser, the search index, the database, the publishing platform. Cleanup that passes inspection can still fail a query.
  6. Read facts, numbers, proper nouns, tone and attribution by hand. Meaning preservation is an objective to check, not a promise to trust.

If the paste came out of a PDF with paragraphs running together, line-break removal restores the structure while keeping the paragraph breaks you meant to keep.

The free invisible-character inspector is unlimited and runs locally, so rerunning a scan costs nothing. Before copying any cleaned or rewritten output, compare its meaning against the original. A clean visual display was never the proof of safety.

Scan the text in front of you now, clean only what the scan confirms, and read the result before it ships.


Simple Unmark removes hidden Unicode characters and rewrites wording to break up statistical watermark patterns, keeping your facts, numbers and proper nouns intact through the rewrite. Start with the free browser inspector if you only need to see what's hiding in a string, or run a full clean when a passage is headed somewhere that matters. Visit Simple Unmark to check a document before you publish it.

  • invisible character unicode
  • zero-width characters
  • hidden Unicode
  • Unicode cleanup
  • bidi controls

Related articles