A little help goes a long way. Find a tool/

Text FIELD NOTES · 3 MIN READ

Every Character Counts: Totals, Uniques, and Frequency Tables

One pass over a string yields three useful numbers — total characters, unique characters, and a frequency table ranked by count.

Characters are the atoms of text: every letter, digit, space, and punctuation mark your string is built from. A character counter is the microscope pointed at those atoms — one pass over the string produces a total, a count of distinct characters, and a frequency table ranked from most common to rarest.

Three numbers from one pass

The total is the raw length of the string: every character included, with spaces and newlines not exempt. The unique count is the number of distinct characters. The frequency table is built in a single loop — for each character, add one to its tally — then sorted so the most frequent characters lead. Run hello through it and you get a total of 5, four unique characters, and l leading with 2 while h, e, and o sit at 1 each:

"hello"  →  total 5, unique 4
l ×2
h ×1   e ×1   o ×1

Nothing is filtered out: punctuation, digits, and whitespace all appear in the table. That completeness is the point — a missing character is as diagnostic as a repeated one. The table is also a lens for invisible problems: a stray zero-width character or a curly quote that should have been straight shows up as an unexpected entry with a small count. When such an entry appears, the Zero Width Character Cleaner can hunt down the culprit.

Ties keep their first appearance

The sort is by count, descending, and ties are broken by first appearance in the text. Spell mississippi and the table reads i×4, s×4, p×2, m×1: i edges ahead of s not because 4 beats 4 but because an i shows up before the first s. That stable ordering means the same text always produces the same table — handy when you are comparing two versions of a document and want differences to mean something.

Frequency tables also have a distinguished history. Count letters instead of all characters and you are doing classic cryptanalysis: in English text, e leads at roughly 12.7% of letters, with t and a close behind, and a simple substitution cipher falls to whoever matches the ciphertext's most common symbols against that list. The Letter Frequency Counter runs that letters-only analysis, and What Word Frequency Reveals About Your Writing applies the same idea one level up, to whole words.

What counts as one character?

Two different answers coexist, and encoding is why. The total uses the string's length, which counts UTF-16 code units: one for nearly everything you type, but two for characters outside the Basic Multilingual Plane — many emoji and some rare scripts. The frequency table instead walks code points, so an emoji lands as a single entry. Paste 😀 hi and the total is 5 while the table shows four entries, the emoji counted once among them. Neither number is wrong; they measure different things, and How Text Encoding Works explains the machinery underneath.

Character counter vs word counter

Hard limits are almost always character limits. SMS messages break at 160 characters, meta descriptions fade around 155–160, and form fields count keystrokes, not words. Prose briefs — "500 words" — are word limits. So pick the tool by the constraint: the Word Counter for meaning-sized units, sentences, paragraphs, and reading time; the character counter for space-sized units, and for asking which characters dominate, not just how many there are.

Try it yourself

Paste mississippi into the Character Counter and read the table top to bottom: i and s tied at 4, p at 2, m at 1 — a tie-break you can verify by eye. Then paste a line with an emoji to watch the total and the table disagree pleasantly. For a letters-only league table of the same text, follow up with the Letter Frequency Counter, and keep the Word Counter alongside for the prose-level view.

Frequently asked questions

Does the count include spaces and punctuation?
Yes. The total counts every character in the string — letters, digits, spaces, punctuation, and newlines — and each appears in the frequency table too. Nothing is filtered out, which is what makes the table a complete portrait of the text.
How are ties ordered in the frequency table?
By first appearance. Characters are sorted by count descending, and characters with equal counts keep the order in which they first showed up — in "mississippi", i and s both appear four times, but i is listed first because an i occurs before the first s.
How is a character counter different from a word counter?
Unit size and question asked. The character counter measures space-sized units — the unit that hard limits like SMS segments and meta descriptions actually use — and shows which characters dominate. The word counter measures meaning-sized units and adds sentences, paragraphs, and reading time for prose work.
Do emoji and accented letters count as one character?
The total counts UTF-16 code units, so characters outside the Basic Multilingual Plane — many emoji among them — add two to the total. The frequency table walks code points instead, so the same emoji is one entry. Both numbers are correct; they measure different things.
What is character frequency analysis used for?
Classic cryptanalysis — breaking substitution ciphers by matching the most common symbols against English letter frequencies — plus language studies, compression estimates, and spotting typos or encoding artifacts that show up as unusual characters.