Skip to content

Word Frequency and Keyword Density Checker

Mode
Top keyword or density —
Total words
—
Different words
—

Keyword density is the number of exact matches of a keyword divided by the total word count, times 100. If apple appears 2 times in an 8-word text, density is 2 ÷ 8 × 100 = 25%. Paste your text, pick Keyword density, type the keyword, and the checker shows the percentage, the match count and the total words.

About this tool

Writers editing a blog post, students checking a draft for a repeated pet word, and developers who want to compare their own word frequency counter output all need the same thing: a list of which words appear and how often. This checker has three views. Word frequency lists the 20 most used single words with their share of the text, optionally skipping fillers such as the, and and of. Keyword density counts exact whole-word matches of one word or phrase and turns them into a percentage. Phrases counts repeated runs of two to five words, which catches stock expressions a single-word list hides. Matching ignores capital letters but not word forms, so run and running are counted apart; stemming is not applied.

How to use it

  1. Paste or open text

    Paste into the box or open a .txt, .md, .csv or .html file from your device.

  2. Pick a view

    Choose Word frequency, Keyword density or Phrases at the top of the widget.

  3. Set the option

    Tick Skip common words, type a keyword, or set how many words make a phrase.

  4. Read the table

    The table lists each word or phrase with its count and its percentage of all words.

Examples

Counting a short rhyme

Mode
Word frequency
Your text
The cat and the hat and the bat.
Skip common words (the, and, of…)
No

Result Top keyword or density: the
Total words: 8
Different words: 5

  1. Split the text into 8 words and lower-cased them.
  2. Counted 5 distinct words; 2 appear more than once.
  3. Share = count ÷ 8 total words × 100.

With common words kept, the leads with three of eight words (37.5%); turn on Skip common words to see the real keywords.

Density of one keyword

Mode
Keyword density
Your text
Apple pie. Apple tart. Banana bread. Cherry pie.
Keyword or phrase
apple

Result Top keyword or density: 25%
Total words: 8
Different words: 6

  1. Total words = 8; exact matches of "apple" = 2.
  2. Density = 2 ÷ 8 × 100 = 25%.

Two matches of apple in an eight-word menu give a density of 25%, far above what reads naturally in an article.

Repeated two-word phrases

Mode
Phrases
Your text
To be or not to be
Words per phrase
2

Result Top keyword or density: to be
Total words: 6
Different words: 4

  1. Split the text into 6 words and lower-cased them.
  2. Counted 4 distinct 2-word phrases; 1 appear more than once.
  3. Share = count ÷ 6 total words × 100.

Six words give five overlapping pairs; to be is the only pair that repeats.

How it is calculated

density % = keyword matches ÷ total words × 100; share % = count ÷ total words × 100

keyword matches
places where the keyword's words appear in the same order as whole words, ignoring case
total words
runs of Unicode letters or digits, with internal apostrophes and hyphens kept

The text is split into words by Unicode rules and lower-cased. Frequency mode tallies each word in a dictionary-style map and sorts by count, then alphabetically for ties. Phrase mode slides a window of n words across the text, so six words give five overlapping pairs. Density mode walks the same word list and counts positions where the keyword sequence matches. Every share uses the full word total as the denominator, including common words that frequency mode may hide.

Use from code or an AI agent Free API · MCP

The same calculation is a free JSON API. No key needed. The answer is in result.stats.primary.

curl -X POST https://api.tools-directory.workers.dev/v1/tools/word-frequency-and-keyword-density-checker \
  -H 'Content-Type: application/json' \
  -d '{"inputs":{"mode":"frequency","text":"The cat and the hat and the bat.","skip_common":false}}'

When not to use it

  • Search engines do not publish a target density, so treat the percentage as a repetition check, not a ranking score.
  • For text locked in a PDF, copy it out first; this checker reads plain text only.

Common mistakes

  • Expecting plurals or verb forms to be merged; shoe and shoes are counted as separate words.
  • Comparing densities from tools that divide by different totals, such as words after removing stop words.
  • Pasting navigation menus and footers with the article, which inflates brand and menu terms.

Frequently asked questions

Do I need a keyword density checker extension for Chrome?

Not for pasted text. A browser extension reads the live page for you, while this checker works on any text you paste or open from a file, and the counting runs in your browser. Copy the article body only, without menus and footers, for a cleaner figure.

Does Google have a recommended keyword density?

No. Google has never published a target percentage, and its spam guidance warns against keyword stuffing rather than naming a number. Many editors treat anything above about 3% for one keyword as a sign the text reads repetitively, which is why the checker flags values over that line.

Why do SEO review tools and other checkers show a different density?

Tools differ in what they count as the total. Some remove stop words first, some multiply matches by the number of words in the phrase, and some include headings or alt text from a live page. This checker uses exact matches divided by all words in the pasted text.

How do I build a word frequency counter in Python?

Split the lower-cased text into words with a regular expression such as re.findall(r"\w+(?:['-]\w+)*", text), then pass the list to collections.Counter and call most_common(20). That is the same dictionary tally this page runs. Paste the same text here to check your program's counts.

How do I write a word frequency counter in Java?

Lower-case the text, split it on non-letter characters, and add each word to a HashMap of String to Integer with merge(word, 1, Integer::sum). Sort the entries by value to get the top words. Compare your output with this page's Word frequency view on the same input.

Can I count word frequency in a PDF?

Copy the text out of the PDF in your reader and paste it into the box. Watch for broken hyphenation and running headers that repeat on every page, since they add extra words to the counts.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, December 1). Word Frequency and Keyword Density Checker. Tools Directory. Retrieved December 4, 2026, from https://directory.milunir.com/text-tools/word-counters/word-frequency-and-keyword-density-checker/

MLA

Tools Directory Editorial Team. “Word Frequency and Keyword Density Checker.” Tools Directory, 1 Dec. 2026, https://directory.milunir.com/text-tools/word-counters/word-frequency-and-keyword-density-checker/. Accessed 4 Dec. 2026.

Chicago

Tools Directory Editorial Team. “Word Frequency and Keyword Density Checker.” Tools Directory. Last modified December 1, 2026. Accessed December 4, 2026. https://directory.milunir.com/text-tools/word-counters/word-frequency-and-keyword-density-checker/.

Link<a href="https://directory.milunir.com/text-tools/word-counters/word-frequency-and-keyword-density-checker/">Word Frequency and Keyword Density Checker – Tools Directory</a>