Skip to tool

JavaScript Character frequencies Online

Count character frequencies.

The output updates as you type. The tool processes input in your browser.

Worked example

The result counts occurrences of each Unicode code point. A grapheme may span several entries.

Sample input
banana
Sample output
[
  {
    "codepoint": 97,
    "char": "a",
    "count": 3
  },
  {
    "codepoint": 98,
    "char": "b",
    "count": 1
  },
  {
    "codepoint": 110,
    "char": "n",
    "count": 2
  }
]

Using this operation in JavaScript

The interactive result uses JavaScript. JavaScript string indexes count UTF-16 code units. Use code-point iteration when working with supplementary Unicode characters.

JavaScript reference