Word Frequency Counter
Paste your text and pick a counting mode — Chinese characters, English words, two-character groups or three-character groups — to see the most frequent items with counts and percentages. Computed locally in your browser.
Frequency counting is the quickest way to see what a piece of text is actually about, and to check whether its keyword density looks natural: the text is split according to the chosen basis, occurrences and their share of the total are counted, and the leading items are ranked. When judging repetition or whether the subject has drifted, it is more dependable than scanning by eye.
Four bases are offered — single characters, words, two-character groups and three-character groups — and the split is mechanical, with no dictionary segmentation, so adjacent characters can form a group that is not a word in the language at all; that is the basis working as defined rather than an error. For English text, enable the stop-word filter (the, and, of), or the top of the ranking will be all function words and the subject will stay invisible.
Did this tool solve your problem?
Submitting sends the tool name, your input and the current result to the server. Please do not include ID numbers, phone numbers or other private data.
AI assistant It answers using your current input and result
Asking again sends your current input and result to the server once more. Please do not include private data.
How to use
- Paste the text.
- Choose the basis: characters, words, 2-grams or 3-grams.
- For English text, enable the stop-word filter.
- Read the ranked items with their counts and shares of the total.
How it works
Choosing among the four bases
For mixed Chinese-English usage habits choose "char & word frequency" — Chinese by single character, English and numbers by word; for English articles choose "English word frequency" (optionally ignoring function words like the/and/of); to find frequent Chinese two-character chunks choose "bigrams", which pairs adjacent characters and surfaces terms like compound interest, return or risk; "trigrams" better reveals fixed phrases of three characters.
How to read keyword density
Share = the item's count ÷ total items counted. In Chinese, functional characters like 的、了、是 naturally top the list — a high share signals nothing about writing quality, only that they're incompressible. What deserves attention is whether content words (nouns, verbs) concentrate: a content word above ~5% usually means a clear theme — or repetitive wording that needs synonyms.
Why Chinese isn't segmented into words
Chinese has no inter-word spaces, so true segmentation requires dictionaries or statistical models whose results differ from tool to tool and whose decisions are hard to explain. This tool instead offers four explicit, verifiable bases: characters, English words, bigrams and trigrams. They aren't segmentation, but they answer "which units keep recurring".
Counting rules: Chinese characters cover the Unicode Basic block (U+4E00–U+9FFF) and Extension A (U+3400–U+4DBF). Latin letters and digits are split on runs of alphanumerics, case-insensitively. Two- and three-character combinations use a sliding window inside segments split on punctuation, whitespace and digits — never across segments. Share = occurrences ÷ total counted units, and ties are ordered by character ascending. No synonym merging, no lemmatisation and no traditional/simplified normalisation.
Code example
JavaScript Character bigram counting
const bigrams = (s) => {
const cs = [...s].filter((c) => /[\u4e00-\u9fa5]/.test(c));
const out = [];
for (let i = 0; i + 1 < cs.length; i++) out.push(cs[i] + cs[i + 1]);
return out;
};
const top = (arr, n = 5) => {
const m = new Map();
arr.forEach((k) => m.set(k, (m.get(k) || 0) + 1));
return [...m.entries()]
.sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))
.slice(0, n);
};
top(bigrams('keyword density analysis'));
// [] — Latin text is not split into character bigrams; only CJK characters are
Shell Word frequency for English (command line)
# Lowercase, split into words, sort, count, take the top 10
tr -cs 'A-Za-z' '\n' < article.txt | tr 'A-Z' 'a-z' \
| sort | uniq -c | sort -rn | head -10
# Exclude common stop words first to see the topic words
tr -cs 'A-Za-z' '\n' < article.txt | tr 'A-Z' 'a-z' \
| grep -vE '^(the|and|of|to|in|is|are|for|on|that)$' \
| sort | uniq -c | sort -rn | head -10
FAQ
Why do odd bigrams like "品运" appear?
Bigrams are a sliding window over adjacent characters, with no word judgment. The phrase 产品运营 produces 产品, 品运 and 运营 — 品运 is a pseudo-pair across a word boundary. That's inherent to the basis, not a bug — the page notes "split on punctuation, whitespace and digits", which at least prevents cross-sentence pairs. Real words still dominate the top of the ranking.
When counts tie, who ranks first?
Ascending character (code-point) order — a deliberately deterministic basis: identical input must yield identical rankings, or two runs of the same text could differ and regression comparisons would be impossible. Chinese sorts by Unicode code point, so 世 precedes 界.
What keyword density is appropriate?
For Chinese content, keeping content-word share between 1% and 3% usually reads naturally; past 5% repetition becomes obvious. Importantly, modern search engines have no "hit the density threshold, rank higher" rule — density is for self-checking whether you're repeating yourself, not for stuffing keywords to hit a number.
What are English stop words, and what does ignoring them do?
Stop words are grammar-only words — the, a, and, of, to — that carry no content. They almost always top English rankings; ignoring them instantly reveals the real content words. About 45 common stop words are built in, active only in "English word frequency" and off by default — your choice governs.
Do punctuation, digits and English participate?
Punctuation and symbols don't (they're never counted as units); digits and English words do — consecutive alphanumerics form one word, so "2026" and "Python" each count as one, normalized by case (Python and python merge). Chinese and English punctuation, spaces and newlines never enter the statistics.
Why does the Chinese-character count differ from the word-counter tool?
Different bases: this page's character count covers only the CJK basic block and Extension A, excluding punctuation, digits, letters and emoji; the word counter distinguishes "with punctuation" and "without", and adds lines and paragraphs. For compliance checks (platform minimums like 300 characters), the word counter's basis is the safer reference.
Why does a digits-only text report nothing to count?
Bigrams and trigrams process Chinese characters only; pure digit or symbol text can't fill two adjacent characters within a segment, so there are no combinations. Switch to "char & word frequency" or "English word frequency" to count digit runs.
Is my pasted text uploaded or saved?
No. Statistics run locally in the browser — nothing is sent to a server or written to storage, and refreshing clears everything, with no history section. That's why this site computes such tools locally: the texts analyzed are often unpublished drafts.