Text

Word/Character Frequency Counter

Frequency analysis of text: how many times each word or character appears, sorted by count.


                        
                    

This tool counts how many times each word or character appears in a text and sorts the result by count — something that's practically impossible to tally by hand in a long piece of text.

How to use it

Common uses

Things to keep in mind

Frequency analysis is case-sensitive by default in many implementations — "Word" and "word" can count as different entries unless the text is normalized to one case first.

Classical substitution ciphers (ROT13, the Caesar cipher) don't change the frequency distribution of letters, only the mapping — which is exactly why frequency analysis is the classic way to break them without trying every key.

Article about this tool: Text frequency analysis: why count how often words repeat

Frequently asked questions

What's the difference between Words and Characters mode?

Words mode counts how many times each word appears in the text, while Characters mode counts the occurrence of each individual character, including punctuation.

What do the "Case-insensitive" and "Ignore spaces" options do?

"Case-insensitive" merges occurrences that only differ by upper/lower case, and "Ignore spaces" excludes spaces from the count in character mode; results are then sorted by descending occurrence count.

Is the analyzed text sent to a server?

No, frequency analysis runs entirely in your browser in JavaScript — nothing is transmitted online.

What is Zipf's law?

In natural languages, a word's frequency is inversely proportional to its frequency rank: the most common word occurs roughly twice as often as the second most common, three times as often as the third, and so on. A significant deviation from this pattern is a signal that the text may be artificially generated or keyword-stuffed spam.

Can frequency analysis be used to break a simple cipher?

Yes, for classical substitution ciphers (like ROT13 or the Caesar cipher), which don't change the frequency distribution of letters — they just rearrange the mapping. By comparing the frequency distribution of the ciphertext to the known distribution of the original language, you can recover the character mapping without trying every possible key.

Articles: Text

Case Converter: why different naming styles exist

Why one project writes variables in camelCase but files in kebab-case, and where these rules came from.

Text Diff: how algorithms find the difference between two texts

How a diff algorithm finds the minimal set of changes between two versions of a text.

Regular expressions: basic syntax and common patterns

How to read a regular expression, and how greedy matching differs from lazy matching.

Sorting and deduplicating lines: why it matters

Why numeric sorting putting "10" before "9" is a mistake, and how to avoid it.

String Escape: why the same text needs escaping differently

Why the same quote character gets escaped differently in a JS string, JSON, and a shell command.

CRLF vs LF: why line ending characters still matter

Why a file written on Windows can show as "entirely changed" in git on Linux.

Counting characters and words: why it's not always trivial

Why an emoji or an accented character can count as several characters at once.

Lorem Ipsum: where the placeholder text came from and why it exists

Why designers deliberately use "nonsense" text instead of real content in mockups.

Slugify: turning arbitrary text into a URL

How a title like "Hello, World!" turns into a URL-safe string like hello-world.

Markdown: why plain-text syntax beat rich text editors

Why developers choose to write documentation in Markdown instead of a rich text editor.

Whitespace and invisible characters: the hidden cause of weird bugs

Why two strings that look identical can fail to match because of an invisible character.

Text Reverse: why "reversing text" is harder than it sounds

Why a naive string reversal can turn an emoji into unusable bytes.