Skip to content
AZ Tools

Letter Frequency Analyzer

Count every character in your text — letters, digits, whitespace, punctuation — and compare against expected English frequencies for cryptanalysis.

Total chars: 0Unique chars: 0

Paste text above to see the character histogram.

How to use

  1. Paste your text in the top panel.
  2. Toggle which character classes you want to count (letters / digits / whitespace / punctuation / other).
  3. Read the histogram and the English-frequency comparison. Copy CSV for further analysis.

About this tool

Show

Paste any text and see a per-character histogram: count, percentage, and a bar per row. Toggle which character classes to include (letters / digits / whitespace / punctuation / other Unicode). Case-folding optional. When letters are enabled, a side-by-side comparison against the standard English letter distribution (E 12.7%, T 9.1%, A 8.2%…) is shown — handy for classical cryptanalysis, language identification, font coverage planning, or just nerd curiosity.

The English reference distribution comes from large bodies of ordinary prose, which is the assumption to watch. A technical document, a list of names, source code or anything with heavy jargon departs from it enough that the comparison stops meaning much, and a short sample departs from it by chance alone. Cryptanalysis by frequency wants a few hundred characters at minimum before the ordering of the common letters settles.

That comparison is the classical attack on a substitution cipher, and it works because a monoalphabetic substitution moves the peaks around without changing their heights. It is defeated by anything that flattens the distribution: a Vigenère cipher with a key of unknown length, a homophonic cipher that gives common letters several symbols each, and every modern cipher, whose output is indistinguishable from random by exactly this test.

Counting is per Unicode code point rather than per glyph. An accented letter typed as a base plus a combining mark counts as two entries and lands under both, while the same letter typed as a single precomposed code point counts as one, so two visually identical texts can produce different tables. Normalising the input first is the fix. Emoji built from several code points split the same way.

The character classes are worth switching off deliberately. Leaving whitespace in puts the space at the top of nearly every text, where it crowds out the letters you were looking at.

Frequently asked questions

What does the English comparison reveal?

Plaintext English follows a very stable letter distribution (E dominates, then T, A, O, I, N, S, H, R). If your text matches, it's likely English plaintext. If a substitution cipher is applied, the bars get scrambled but the SHAPE survives — that's the whole basis of classical cryptanalysis.

Does it handle Unicode?

Yes. Characters are split as code points (so emoji and CJK count as one each), and the 'other' bucket captures anything outside letters/digits/whitespace/punctuation. The English comparison only reads ASCII a-z though.

How are whitespace and control chars shown?

Space appears as ␠, tab as ⇥, newline as ↵, carriage return as ⏎. Other non-printable code points show as U+XXXX.

Why is my distribution flat?

Random text, encrypted ciphertext, base64, and hex all flatten the curve compared to natural language. A flat letter distribution is itself a strong signal that the text isn't English prose.

Related tools