Skip to content
14 min readUpdated 29 October 2026

How to Remove Invisible Characters from Text

Inspect unwanted zero-width and direction-control characters, review their context, and copy clean text without rewriting the visible wording.

You paste AI-generated text into a form and everything looks normal. Then search fails to match a word, the CMS rejects the submission, or the copied passage behaves differently from the original. That usually means hidden Unicode characters are sitting in the text. People sometimes call this an "invisible filter" or assume it is an AI watermark, but statistical watermarks are a separate problem with a different fix.

If you searched for a social-media "invisible filter" that hides a person in a video, this guide doesn't cover that; it's about hidden characters in text. Simple Unmark works with text only and doesn't process images or video.

So the first step in removing invisible characters from AI text is working out which problem you have. Clean the characters that affect rendering and copy and paste, and don't expect that to remove signals built into the word choices.

Table of Contents

When text looks clean but acts strange

The screen gives no warning. A paragraph can look ordinary while containing zero-width spaces, direction controls, soft hyphens or other formatting characters. They survive copy and paste from PDFs, AI chat windows, websites and rich-text editors because most interfaces draw them as nothing.

Typical symptoms are failed searches, broken URLs, rejected form submissions, odd line wrapping, strange word counts and text that changes direction when pasted elsewhere. The stored text has extra code points even though the visible letters look the same. Unicode security guidance has documented the wider risk for years, including characters that change how text displays relative to what is stored, as described in this overview of Unicode security attacks.

If text looks fine but behaves inconsistently across tools, inspect its characters before rewriting the prose.

Two separate issues hide under the phrase "invisible filter." The first is invisible Unicode cleanup: finding specific characters and removing or keeping them based on what they do. The second is statistical AI watermarking. Systems such as Google's SynthID-Text embed a signal through token selection during generation rather than inserting a removable character. The Nature paper on SynthID-Text describes it as a watermarking method that uses Tournament sampling during decoding without changing the model's architecture (technical report on SynthID-Text). Anthropic likewise describes Claude's text watermark as a word-choice signal with no hidden characters.

That distinction decides your next move. If copy and paste, layout or search is broken, inspect the Unicode. If the text works normally and your concern is a watermark, stripping characters won't touch it, and hidden characters on their own are not evidence that AI wrote the text.

The invisible characters hiding in your text

An invisible character can be useful, harmless or the cause of your problem. Group each by function before deciding what to remove, so a cleanup pass doesn't break script shaping, emoji, line wrapping or bidirectional text.

Connectors and file markers

U+200B ZERO WIDTH SPACE allows a line break without visible width. U+200C ZERO WIDTH NON-JOINER and U+200D ZERO WIDTH JOINER control how neighbouring characters connect. U+FEFF BYTE ORDER MARK can identify the encoding at the start of a file; the same character inside ordinary text is usually unwanted.

U+2060 WORD JOINER prevents a line break without adding width. Editors keep these characters when copying because they have no visible glyph. This guide to invisible spacing controls explains how the zero width space and word joiner differ.

Direction and display controls

U+200E LEFT-TO-RIGHT MARK and U+200F RIGHT-TO-LEFT MARK affect text direction. Related bidirectional controls include U+202A LEFT-TO-RIGHT EMBEDDING, U+202B RIGHT-TO-LEFT EMBEDDING, U+202D LEFT-TO-RIGHT OVERRIDE, U+202E RIGHT-TO-LEFT OVERRIDE and U+202C POP DIRECTIONAL FORMATTING. The isolate controls, U+2066 to U+2069, handle mixed-direction text in a similar way.

Arabic, Hebrew and mixed-script documents may need these controls. Source code is different: a bidi override can make displayed code differ from what the compiler reads. The Trojan Source disclosure (CVE-2021-42574) demonstrated this with characters such as U+202E and led to warnings in GitHub, GitLab and major editors, as described in this Unicode security analysis.

Soft formatting and glyph variants

U+00AD SOFT HYPHEN marks a preferred break inside a long word. Variation selectors U+FE00 to U+FE0F change how certain emoji and CJK characters display. They are invisible on their own, but deleting them can change a glyph, how an emoji appears, or how a script behaves.

Code point Name Function Safe to strip?
U+200B ZERO WIDTH SPACE Allows a line break without visible width Usually, after inspection
U+200C ZERO WIDTH NON-JOINER Prevents joining in supported scripts Only when clearly stray
U+200D ZERO WIDTH JOINER Connects characters or emoji components Usually not
U+00AD SOFT HYPHEN Optional word breaks Often, unless layout depends on it
U+2060 WORD JOINER Prevents line breaks Only when unwanted
U+202E RIGHT-TO-LEFT OVERRIDE Changes displayed direction Yes, when not needed
U+FE00–U+FE0F VARIATION SELECTORS Selects glyph or emoji presentation Usually not

A Unicode-aware inspector, hex view or character-level display shows what ordinary views hide. Our guide to how AI text watermarks work explains how to tell hidden Unicode apart from statistical watermark signals. Character cleanup deals with hidden code points; it doesn't touch a signal created through token selection.

Inspect before you delete anything

Blind deletion is how clean-looking text gets damaged. Keep the original, inspect a copy, and decide based on the code points actually present.

For a quick start, the free invisible character remover shows and removes supported hidden characters in your browser, with no account or upload. It leaves your wording unchanged and keeps controls that scripts and emoji depend on. If the problem is rich formatting or HTML rather than hidden characters, use the plain text converter; for wrapped lines from a PDF or email, use the line break remover. All are on the tools page.

Keep the source

Save the original as plain text or Markdown before changing anything, under a different filename. A cleanup pass can remove formatting or script information you didn't realize mattered.

Show the hidden characters

Paste a copy into a hex viewer, a Unicode inspector or a browser console that logs character values. You want the exact code point, Unicode name and position, not just a label like "invisible character."

Identify the pattern

List what appears. A document with only U+200B needs narrower cleanup than one with U+202A to U+202E, because direction controls can change display order while a stray zero width space mostly affects matching and tokenization.

Preview the result

Run the planned removal on a copy, compare before and after, and view the result in the app where it will be published. Practical guidance recommends exactly this: keep the original, show code points and names, preview the change, and check whether joiners or variation selectors are needed, as outlined in this Unicode character removal workflow.

Some characters carry weight. A zero width joiner can hold an emoji sequence together, a soft hyphen can control a line break, and a variation selector can decide how an emoji or CJK character appears. Deleting first produces a technically cleaner file that may display incorrectly.

What to strip and what to keep

Decide by meaning, not by the vague label "non-printable." Some characters are leftovers from copy and paste; others are essential to the letters or symbols next to them.

Usually safe targets

Strip a zero width space (U+200B) inside ordinary English prose where it has no line-breaking purpose. The same goes for stray soft hyphens (U+00AD) and a BOM (U+FEFF) in the middle of text. Tag characters (U+E0001 to U+E007F) can arrive through copying and can be used to hide text, so treat them as suspicious, with one exception: some flag emoji, such as those for England, Scotland and Wales, are built from tag characters.

ZWNJ (U+200C) or ZWJ (U+200D) between Latin letters, where nothing should join, can usually go. Direction marks and bidi controls can go when they are unexplained and the document has no mixed-direction text. Don't apply a blanket erase-all to every control character.

Characters that need protection

Keep variation selectors (U+FE00 to U+FE0F) attached to emoji or CJK text. Keep combining marks that form real accents. Keep soft hyphens where the line breaking is intentional, and joiners that shape Arabic or Indic letters correctly.

Character Code point Action Why
Zero-width space U+200B Strip when stray Disrupts search, tokenization and copy and paste
Zero-width non-joiner U+200C Inspect first May control script shaping
Zero-width joiner U+200D Keep when functional Connects emoji or joined script forms
Soft hyphen U+00AD Strip when accidental Creates unwanted breaks or hidden differences
Byte order mark U+FEFF Keep at file start, strip mid-text A file-start marker differs from a stray mid-text character
Word joiner U+2060 Inspect first Prevents breaks without visible width
Variation selector U+FE00–U+FE0F Usually keep Changes emoji or glyph presentation
Tag characters U+E0001–U+E007F Strip when not part of a flag emoji Can hide text; also used in some flag emoji

Fix visible formatting only after the invisible cleanup, so the final comparison is easier to read and you don't mistake a rendering symptom for a wording problem.

Remove a code point only if the text still reads, shapes and displays as intended without it.

Why stripping characters is not the whole job

Invisible Unicode is the straightforward problem. Statistical watermarking is different because the signal is spread across the token choices in the passage, not stored in a character that search and replace can find. SynthID-Text, for example, embeds a detectable pattern during decoding through its sampling method, as covered in our comparison of hidden Unicode and statistical watermarking.

An infographic showing that removing invisible characters is easy, while removing statistical watermarks is hard.

Stripping characters improves rendering and copy safety but doesn't change the token distribution. Done carelessly, it also creates new problems: broken ligatures, missing accents, odd spacing or changed emoji.

Rewriting changes the relevant layer

A word-choice watermark can only be weakened by changing the words: restructuring sentences, varying length, reordering clauses and replacing wording while keeping facts and intent. Three operations are easy to confuse here:

  • Filtering removes specific invisible characters.
  • Unicode normalization (NFC, NFD, NFKC, NFKD) converts characters to a consistent form based on Unicode's equivalence rules. It doesn't remove most invisible format characters and doesn't rewrite prose.
  • Rewriting changes the wording, which is the only one of the three that can affect a statistical watermark.

How well a watermark survives editing depends on its design. A 2025 robustness evaluation of ten LLM watermarking methods against twelve removal attacks found that design choices strongly affect how each method holds up (technical study on watermark robustness and mitigation). For your own workflow, a sensible order is to filter invisible Unicode, rewrite on a copy, then compare meaning and formatting with the original.

Trivial edits don't weaken a token-choice watermark much. A clean character layer is good text hygiene, nothing more. If you need the wording changed, do a controlled rewrite and review it by hand.

Choosing a cleanup method

Match the method to the text and the problem. A short English draft with hidden characters needs character cleanup. A concern about statistical watermarks needs a controlled rewrite. A mixed-script legal document needs extra care and manual review either way.

For one short passage, use a Unicode cleanup tool or a regex-capable editor. Work on a copy, remove only the code points you've approved, and check for missing accents, broken ligatures, altered emoji and direction changes. If your concern is a watermark, read our guide on removing AI watermarks from text and handle the rewrite as a separate step.

Repeated work needs an audit trail

For recurring editorial or ingestion work, write a small reusable script or editor routine. Limit it to approved code points, log every removal, and keep the original next to the cleaned version. Silent transformations are hard to troubleshoot when a CMS or parser behaves differently later.

Large or mixed-script documents need a Unicode-aware editor and human review. Arabic, Hebrew and Indic text may rely on joiners, combining marks and direction controls; automation can flag candidates, but a person should approve removals that might change how the language behaves.

Avoid the blunt instrument

Don't make "remove all non-printable characters" your default. It can strip BOMs, control characters or script marks that serve a purpose. Filter only the unwanted categories, view the result in the target app, and compare it with the source before saving.

A flowchart titled Choosing a Cleanup Method That Fits, illustrating two processes for text editing.

For sensitive material, check how a tool handles your text: whether it runs locally or sends text to a server, and what happens to it there. Text bound for code, URLs, forms or search indexes must be tested in that exact environment; a clean preview elsewhere isn't enough.

Realistic results and a short decision guide

A successful cleanup leaves text without unwanted zero-width characters, keeps characters that carry meaning, and improves copy-paste and rendering behaviour. It does not remove statistical watermark signals or guarantee any detector result.

Meaning-preserving paraphrase can weaken some watermark signals substantially. This 2026 watermark paraphrase study tested open-source implementations of KGW, Unigram and SynthID-Text on short 50-token texts and found that paraphrasing removed the watermark from almost every text that had been detected beforehand. Its sample was small, detection was already weak before any attack, and the authors note that the SynthID result may not transfer to Google's production system. Results like these describe specific setups, not a guarantee for any model, detector or passage. Provider detection access is restricted, and the general public, including Simple Unmark, can't check a provider's watermark on your text.

Before you clean, decide:

  • Your main problem: rendering and copy-paste errors, a watermark concern, or both.
  • Your review level: automated cleanup for simple text, manual inspection for mixed scripts.
  • What to protect: joiners, combining marks, variation selectors and intentional line-break controls.
  • Your rollback plan: a saved original and a visible before-and-after comparison.
  • Your final check: rescan the output and view it where it will be used.

A graphic titled Realistic Results and a Short Decision Guide highlighting normalized text, preserved meaning, and statistical watermark impacts.

If the text behaves strangely, start with character inspection. Turn to rewriting only if your concern is a token-level watermark, and review every rewrite for accuracy. Simple Unmark, our product, combines Unicode cleanup with such a rewrite, but it can't confirm that a SynthID-style watermark is gone or guarantee identical meaning.

  • invisible filter
  • remove invisible characters
  • AI text cleanup
  • zero-width Unicode
  • watermark removal

Related articles