Text

Character Frequency Counter

Counts every distinct character with its share and its Unicode code point, which is how you find the invisible one.

Loading the tool…

Processing happens locally in your browser. What you paste or load is processed by this page and is not uploaded to a server. Nothing is stored unless you use a control that says it stores something, and you can clear anything this site has kept from the privacy page.

How to use this tool

  1. Paste the text — or just the one value that is misbehaving.
  2. Turn on counting whitespace if you are hunting for a stray space or tab.
  3. Select Count characters and read the code point column, not the character column.
  4. Anything above U+007F is not ASCII. U+00A0, U+200B and U+FEFF are the three that cause most of the trouble.

What character frequency counter does

The reason to count characters is almost never curiosity about letter frequency. It is that a system rejected a value, or two strings that look identical will not compare equal, and something in the text is not what it appears to be. A non-breaking space, a zero-width joiner, a curly apostrophe pasted from a word processor, or a byte-order mark sitting at the front of the file.

Every row here carries the Unicode code point, so an invisible character stops being invisible: U+00A0 is a non-breaking space, U+200B is a zero-width space, U+FEFF is a byte-order mark. Once you have the code point you can search for it, strip it, or explain to somebody else exactly what is in their file.

Frequently asked questions

Every row carries the Unicode code point, so a character you cannot see still has a name. U+00A0 is a non-breaking space, U+200B a zero-width space, U+FEFF a byte-order mark and U+00AD a soft hyphen. Once you have the code point you can search for it and remove it.

Usually because one contains a curly apostrophe (U+2019) and the other a straight one (U+0027), or one uses a non-breaking space. Both pairs are visually near-identical in most fonts and completely different to any equality check.

Yes. Counting is done over whole code points rather than the UTF-16 units JavaScript stores strings in, so an emoji counts as one character with one code point rather than as two halves of a surrogate pair.