Invisible Character Counter

Invisible Character Counter

Detect zero-width spaces, non-breaking spaces, soft hyphens, and byte order marks that survive copy and paste. Counts each type separately and shows how many visible characters remain, which helps explain broken form fields and mismatched text comparisons.

invisible-characters
zero-width
unicode
Share this tool:
Quick Presets
Pastes that carry hidden characters from PDFs, web pages, and CSV exportsNeed extra spaces removed?
Input
Enter or paste your text below.
How it works: Counts zero-width characters, non-breaking spaces, and soft hyphens by name, then reports how many visible characters remain.

Was this tool helpful?

What is Invisible Character Counter?

The Invisible Character Counter finds characters that sit inside a string without appearing on screen. It counts zero-width spaces, joiners, non-breaking spaces, soft hyphens, and byte order marks by type, then reports how many visible characters remain. Paste text copied from a PDF, a web page, or a spreadsheet export to see what survived the copy. The scan runs in the browser and leaves the text unchanged.

How does Invisible Character Counter work?

The tool walks the input one code point at a time and checks each character against three fixed lists. The zero-width list covers U+200B, U+200C, U+200D, U+2060, and U+FEFF. The non-breaking list covers U+00A0, U+2007, and U+202F. The soft hyphen list covers U+00AD.

Matches are counted by group, and the visible total is the code point count minus the invisible count. Because the scan reads code points rather than UTF-16 units, an emoji is measured as one visible character even when it uses two units.

Key Features

  • Counts five zero-width character types
  • Counts non-breaking and narrow no-break spaces
  • Counts soft hyphens from PDF text
  • Detects a byte order mark at the start of pasted data
  • Visible character total for comparison
  • Reads code points so emoji stay a single character

Common Use Cases

When and why you might need this tool
  • Debugging a rejected form value

    Find a zero-width space that makes an email address or coupon code fail validation while looking correct.

  • Cleaning text copied from a PDF

    Check for soft hyphens and non-breaking spaces that break search, sorting, or find and replace.

  • Auditing CSV imports

    Detect a byte order mark at the start of a pasted file that turns the first column header into an unrecognised name.

  • Comparing duplicate records

    See why two values that look identical are treated as different strings by a database or spreadsheet.

  • Checking user-submitted content

    Look for hidden characters in a name or message before storing it in a system that rejects them.

How to Use This Tool

Step-by-step guide to get the best results
1

Paste the suspicious text

Copy the value exactly as it arrived, without retyping it, and paste it into the input box.

2

Run the scan

Press Find Invisible Characters to walk the text code point by code point.

3

Read the breakdown

Invisible characters, zero-width characters, non-breaking spaces, and visible characters appear as separate cards.

4

Copy the figures

Use the copy button in the result header to record the counts in a bug report.

5

Test the cleaned value

Press New, paste a retyped version, and confirm that the invisible count drops to zero.

Pro Tips

  • 1

    Retype a short value by hand to compare it with the pasted version, since retyping removes hidden characters.

  • 2

    A byte order mark only appears at the very start of the input, so check that position first for CSV problems.

  • 3

    Non-breaking spaces are common in text copied from web pages and can prevent a normal space from matching in search.

  • 4

    Soft hyphens are invisible line-break hints and often appear in text extracted from PDFs.

  • 5

    If a value still fails validation after the count reaches zero, the problem is not a hidden character.

Frequently Asked Questions

How do I find invisible characters in text?

Paste the text into the counter and run the scan. It checks every code point against known zero-width, non-breaking space, and soft hyphen characters and reports a count for each group.

Why does a form reject a value that looks correct?

A zero-width space or a non-breaking space can sit inside the value without showing. Validation rules that expect a plain space or an exact character count will reject it, which is why the visible total differs from what the form expects.

Does this tool remove the hidden characters?

No. It reports counts only and does not edit the text. To remove them, retype the value or use find and replace with the specific character pasted into the search field.

What is a zero-width space used for?

It marks a possible line break without adding visible width, so it appears in text laid out for the web and in copy that passed through a word processor. It is also used to stop long strings from overflowing a container.

Why does text copied from Excel include non-breaking spaces?

Spreadsheet cells can preserve the non-breaking space character from the original source, and a copy keeps it. The character looks like a normal space but does not match one in formulas, filters, or search.

Can I see where each hidden character is?

No. The tool reports counts by type rather than positions. To locate one, paste it into a find and replace field, or compare the pasted value against a retyped copy.