Character Frequency Counter

Paste text to rank every letter, digit and symbol by count and percentage. The A to Z chart sets your letters beside normal English, so a shifted cipher shows up as the same pattern moved sideways.

Counts and the A to Z chart appear here once the box holds text.

What Load sample shows in 555 characters

Load sample fills the box with a short passage on Alfred Vail and the code he helped build for Samuel Morse. The space bar wins by a wide margin: 103 spaces, or 18.56% of everything counted. E follows with 67 hits, 12.07%.

Press Letters only and E climbs to 15.76%. Its count stays at 67. The spaces, digits and commas left the total, so every share rose. Check the line above the table before you quote a percentage, since the same text gives different shares under each view.

Against English, E runs three points high at 15.8%, T sits close at 8.9% against 9.1%, and X never appears. Those gaps are normal for 425 letters. A passage this short gives you a rough shape, not a fingerprint.

E tops the chart, then T, A and O

  1. E12.7%
  2. T9.1%
  3. A8.2%
  4. O7.5%
  5. I7.0%
  6. N6.7%
  7. S6.3%
  8. H6.1%
  9. R6.0%
  10. D4.3%
  11. L4.0%
  12. C2.8%
  13. U2.8%
  14. M2.4%
  15. W2.4%
  16. F2.2%
  17. G2.0%
  18. Y2.0%
  19. P1.9%
  20. B1.5%
  21. V1.0%
  22. K0.8%
  23. J0.15%
  24. X0.15%
  25. Q0.10%
  26. Z0.07%

Printers knew this order long before computers. Linotype keyboards ran their keys in rough frequency order, so the first two columns spelled ETAOIN SHRDLU. Operators fixed a bad line by running a finger down those keys to fill out the slug, and the nonsense sometimes reached the morning paper.

The chart uses the running text figures published in Robert Lewand's Cryptological Mathematics. A dictionary gives a different order. The Concise Oxford list puts A and R ahead of T, because T owes much of its rank to the word the, repeated thousands of times in real prose. Count a dictionary to study spelling. Count running text to study use.

Break a Caesar cipher with one chart

A Caesar cipher moves every letter the same distance along the alphabet. The letter shape survives the move, which is why Al-Kindi's ninth century method of counting letters still beats this cipher today. Try the steps below on the second sample.

  1. Press Load cipher sample. The box fills with a coded note of 388 characters.
  2. Read the chart in A to Z order. L stands tallest at 16.2%, while E, G, Q and X sit empty. English prose with no E is the first warning sign.
  3. Count from E to L: seven places. T moved the same seven places to A, the second tallest bar at 11.7%.
  4. Check the panel. Cipher check tests all 26 shifts with a chi-squared score, reports 7, and prints the opening lines shifted back.

Switch the chart to English rank on plain text and your bars should step down from left to right. On the cipher sample the same view looks like a broken comb, a quick tell before you read a single number.

The three numbers in Cipher check

ReadingMeasuresPlain EnglishRandom letters
Index of coincidenceOdds two letters drawn from the text matchAbout 0.067About 0.038
EntropyAverage bits per character in the current viewAbout 4.2 for A to Z4.70 for 26 equal letters
Caesar shiftThe move giving the closest match to English0No fit

Index of coincidence ignores which letter is which, so a Caesar shift leaves the score alone. The cipher sample reads 0.0761 even though every letter changed. French and German run higher than English, near 0.077.

A key changing the alphabet letter by letter flattens the spread. We ran both samples together through a Vigenère cipher with an eight letter key and the score fell to 0.0446, down toward random. A reading in that range means a single shift will not solve the text.

Entropy helps with generated strings. A random hex token should sit near 4.00 bits per character and random Base64 near 6.00. A password far below its alphabet's ceiling has repeats worth a closer look. On short strings the score reads low anyway, so judge tokens of 100 characters or more.

Why your total disagrees with another tool

Excel, JavaScript and Python each count something different. This page counts what a reader sees as one character, known as a grapheme cluster. A Python script or the LEN function in Excel will disagree on anything beyond plain English text.

TextThis pageExcel LEN, JS lengthPython lenUTF-8 bytes
é as one code point1112
é as e plus a combining accent1223
😀 grinning face1214
🇵🇰 flag1428
👩‍💻 woman at a laptop15311

The two forms of é look identical on screen and land in separate rows here, because their Unicode values differ. Ignore case joins É and é but leaves é apart from plain e. The Unicode column shows which form you have.

Jobs where a character count pays off

Find invisible junk

Text copied from Word or a PDF often hides no-break spaces and zero-width characters. The table names them in a tinted label with the code beside them, so a U+00A0 row explains why a search or a CSV import keeps failing.

Subset a web font

Paste a heading or menu, sort by Unicode order, and you have the exact glyphs a trimmed font file needs. Paste every page in your scope first, or a rare accent will fall back to the system font.

Check a pangram or lipogram

A pangram leaves no empty slot on the chart. A lipogram leaves one on purpose. Letters only with Ignore case gives you a row count to confirm 26 at a glance.

Plan a keyboard or word game

English Scrabble ships 12 E tiles and one each of J, K, Q, X and Z, a direct use of this table. Layout designers need more than letters, so count your own chat logs or code with All characters on and read the punctuation rows.

Work a Huffman tree by hand

Compression homework starts with a frequency table. Paste the string, keep Ignore case off, and copy the table into a spreadsheet as your starting weights.

The same count in code

Use a script when you have a folder of files. Python's Counter and the shell line both split on code points, so emoji sequences break apart.

Python

from collections import Counter
text = open("draft.txt", encoding="utf-8").read().lower()print(Counter(text).most_common(10))

Shell

grep -o . draft.txt | sort | uniq -c | sort -rn | head

Excel or Google Sheets

This formula counts the letter e in cell A1, in either case.

=LEN(A1)-LEN(SUBSTITUTE(LOWER(A1),"e",""))

Where the counts mislead

Character frequency questions

Spaces, case, bytes and privacy.

How do I count how many times a letter appears in my text?

Paste the text and read the row for your letter. The Count column gives the total and Share gives the percentage. Pick Unicode order from the Sort menu to find a letter faster in a long table.

Does the count include spaces?

All characters includes spaces and line breaks. No spaces drops all whitespace and Letters only drops digits and punctuation too. Shares recalculate each time, while the counts stay the same.

Are capital and lowercase letters counted together?

Yes, by default. Uncheck Ignore case to split A and a into separate rows. The A to Z chart always merges case, since the English baseline does too.

What is the most common letter in English?

E, at about 12.7% of letters in running text, followed by T at 9.1%, A at 8.2% and O at 7.5%. Z is the rarest at about 0.07%.

Is a character the same as a byte?

No. In UTF-8 a plain English letter takes one byte, an accented letter two, and most emoji four. This page counts what you see on screen, so the comparison table above shows how far the two drift apart.

Is my text sent anywhere?

No. Counting happens in your browser and nothing reaches Toolexe. The one exception is Copy link, which writes your text into the link for you to share.