How to Find Hidden Invisible Characters in Text

Find zero-width spaces, BOM, RTL marks, and other invisible Unicode characters that break paste, length counts, and code — free checker.

By Generatr Team

Invisible characters are Unicode code points that take little or no visible space but still exist in your string. They sneak in from chat apps, PDFs, Office docs, web scrapes, and rich-text editors — then break equality checks, search, regex, length limits, and even security filters.

This guide covers zero-width spaces, byte order marks (BOM), right-to-left marks, non-breaking spaces, and a practical debugging workflow for paste issues. Scan any sample with the free invisible character checker — see positions, code points, and remove junk in one pass.

You will know what to hunt for, why “it looks identical” still fails in code, and how to clean text before it hits production.

Free tool

Use the Invisible Character Checker now

Open the interactive invisible character checker in your browser — free, instant, no signup.

Open Invisible Character Checker

What Are Invisible Characters in Text?

Most writing uses visible letters, digits, and punctuation. Unicode also defines format and control characters that change layout, joining behavior, or encoding metadata without drawing a normal glyph. Your eye sees “hello”; the bytes may be h e l l o plus a zero-width space after the second l.

Why they exist

  • Typography and line breaks — soft hyphens, word joiners, non-breaking spaces
  • Bidirectional text — marks that help mix LTR and RTL scripts
  • Emoji and scripts — zero-width joiners build multi-code-point emoji sequences
  • Encoding history — BOM at the start of some UTF files

Legitimate uses are real. Problems start when those characters appear where plain identifiers, URLs, passwords, or source code expect only visible ASCII or straightforward Unicode letters.

Paste a “suspicious” string into the invisible character checker whenever length, compare, or search results disagree with what you see. Cross-check visible length with the string length checker — see the string length guide for code points vs bytes vs graphemes.

How Do Zero-Width Spaces and Joiners Break Things?

The zero-width space (U+200B) is a frequent villain. It is invisible, copies easily, and splits tokens that look whole. Related characters include the zero-width non-joiner (U+200C), zero-width joiner (U+200D), and word joiner (U+2060).

Symptoms you will recognize

  • String equality fails: "admin" from a ticket ≠ "admin" with U+200B inside
  • Search misses matches in docs or databases
  • URLs or emails look right but will not open or validate
  • CSS/JS identifiers or class names fail to match selectors
  • Social or CMS length limits count “extra” characters you cannot select easily

ZWJ (U+200D) is required for many emoji sequences. Stripping every zero-width character from chat text can break emoji; stripping them from usernames, API keys, and source is usually correct. Know your domain before bulk delete.

Highlight positions with the free zero-width space detector, remove when appropriate, then re-count with a word count checker if you are auditing editorial limits — details in the word count guide.

What Are BOM and RTL Marks — and Why Do They Matter?

The byte order mark (U+FEFF) can appear at the start of UTF-8 or UTF-16 text. Some Windows tools and exporters still emit a UTF-8 BOM. In a file of code or JSON, a leading BOM may cause parsers to choke or treat the first key as \ufeffname instead of name.

Right-to-left mark (U+200F), left-to-right mark (U+200E), and stronger bidi controls influence directionality. They help mixed-script documents. In pure LTR product strings, accidental RTL marks can reorder punctuation, scramble display in terminals, or create security-sensitive “looks like domain X, is domain Y” display tricks when combined with other bidi controls.

Practical checks

  • CSV/JSON from external systems — inspect the first character for BOM
  • Paste from PDF or Arabic/Hebrew sources into LTR forms — watch bidi marks
  • Security-sensitive display of URLs and usernames — do not trust visual order alone

The checker reports code points so you can name the offender instead of guessing. For transport and opaque payloads, encoding tools like a Base64 encoder/decoder show you the raw payload layer; the Base64 guide covers encode/decode workflows when text is wrapped for APIs.

How Do Non-Breaking Spaces and Soft Hyphens Cause Bugs?

A non-breaking space (U+00A0) looks like a normal space but prevents line breaks and often fails trim() or split-on-space logic that only knows U+0020. Word processors love inserting NBSP between numbers and units or in justified layouts. Paste into code and your splitter suddenly yields one token instead of two.

A soft hyphen (U+00AD) marks an optional hyphenation point. It may stay invisible until a line break, then appear as a hyphen. In plain-string compare or URL paths, soft hyphens are pure noise.

Debug pattern

  1. Copy the failing value from the UI or ticket.
  2. Paste into the invisible character checker.
  3. Note each highlighted code point and position.
  4. Remove or normalize (NBSP → regular space) deliberately.
  5. Retry the equality check, import, or login flow.

If you automate cleanup in code, prefer well-tested Unicode normalization and explicit allowlists for identifiers rather than deleting every non-ASCII character — international names need real letters.

How Do You Debug Copy-Paste Text Issues Step by Step?

When “it works when I type it but not when I paste,” assume hidden characters until proven otherwise.

Field guide

  • Auth and API keys — trailing ZWSP or NBSP from Slack/email
  • CSV imports — BOM on header row; NBSP inside “empty” cells
  • CMS slugs — soft hyphens and fancy dashes from Word
  • Regex validation — pattern expects ^\w+$ but string contains format chars
  • Diff noise — two lines look identical in a review UI but differ by U+200B

Use the checker for detection and cleanup, then confirm with length tools and, when needed, a regex tester to prove your validation pattern against the cleaned string. The regex guide helps you write tests that reject control characters on purpose.

For case conversion after cleanup (identifiers and titles), run the text case converter only on sanitized text so you do not bake invisible code points into camelCase names. See the text case guide for naming styles.

Why Do Moderators and Developers Care Beyond Formatting?

Invisible and lookalike characters show up in abuse cases: spoofed usernames, hidden keywords that bypass naive filters, and bidi tricks that disguise links. Not every invisible character is an attack — but content systems should detect and policy-handle them.

  • Homograph-adjacent issues — mix of invisible + confusable letters
  • Filter evasion — banned words split with ZWSP
  • Log and SIEM noise — keys that never match allowlists

Detection is the first step; policy is yours. Some products strip format characters from usernames. Others allow ZWJ for emoji display names. Document the rule so support and engineering agree.

When you need to inspect opaque blobs from APIs, decode Base64 first, then run the plain text through the invisible character checker. Layered tools beat one giant “fix everything” button.

How Do You Use Generatr’s Invisible Character Checker?

Paste, inspect highlights and code points, remove what you do not want, then re-validate in your real app.

  1. Open the free invisible character checker.
  2. Paste the text that fails compare, import, or display.
  3. Review highlighted invisible characters and their Unicode code points.
  4. Check positions and frequency so you know if the issue is one BOM or dozens of ZWSP.
  5. Use one-click removal when cleanup is safe for your use case.
  6. Copy the cleaned text back to your editor, form, or test fixture.
  7. Confirm with length, regex, or app-level validation.

Related tools: string length checker, word count checker, regex tester, and Base64 encoder/decoder.

Step-by-Step Instructions

  1. 1Open the free invisible character checker on Generatr.
  2. 2Paste the text that behaves differently from what you see.
  3. 3Inspect highlighted invisible characters and Unicode code points.
  4. 4Note positions (start-of-string BOM vs mid-token zero-width spaces).
  5. 5Remove or normalize characters according to your policy.
  6. 6Copy the cleaned string into your app, test, or document.
  7. 7Recheck length and validation so limits and regex match expectations.
  8. 8Document whether emoji ZWJ sequences should be preserved in your product.

Frequently Asked Questions

What invisible characters does the checker detect?+

Common finds include zero-width spaces and joiners, non-breaking spaces, soft hyphens, byte order marks, RTL/LTR marks, and many other format or control characters. The tool highlights positions and shows code points so you can identify each one.

Why does my pasted password or API key fail?+

Chat apps and email clients often add trailing spaces, non-breaking spaces, or zero-width characters. The value looks correct but fails equality checks. Paste into an invisible character checker and strip extras before retrying.

Is a zero-width space the same as a regular space?+

No. A regular space (U+0020) is visible as a gap and commonly matched by \s in regex (depending on engine and flags). A zero-width space (U+200B) takes no width and is easy to miss in diffs and reviews.

Should I always delete zero-width joiners?+

Not always. ZWJ is required for many emoji sequences. For usernames, code identifiers, and security tokens, removal is usually right. For social display names with emoji, preserve ZWJ unless policy says otherwise.

What is a BOM at the start of a file?+

A byte order mark (U+FEFF) can prefix UTF text. In UTF-8 it is unnecessary for byte order but still appears from some exporters and can break parsers or add a junk character to the first field.

Is the invisible character checker free?+

Yes. Scan text in the browser, view code points and positions, and remove hidden characters without creating an account.

Ready to try it yourself?

Use the free Invisible Character Checker — no download, no account.

Launch Invisible Character Checker