Keyword Density Checker
Analyze keyword density and frequency in any text.
About the Keyword Density Checker
The Keyword Density Analyzer counts how often each word appears in your content and reports the top keywords by frequency and density percentage. Density is calculated as the keyword's count divided by total words — a 2% density means the keyword appears twice per 100 words. This metric, once heavily weighted by search engines, remains a useful sanity check for content writers who want to verify they are actually mentioning the topic they think they are writing about.
Modern SEO has moved away from keyword density as a direct ranking factor. Google's algorithms use natural language processing (BERT, MUM) to understand topic relevance without needing exact keyword repetition. However, density analysis is still valuable for: catching accidental over-optimization (a 5% density on any single keyword looks spammy and risks a penalty), confirming that your secondary keywords actually appear, and identifying the dominant topics in a competitor's ranking page that you are trying to outrank.
The tool lets you filter out stopwords (the, a, and, of, etc.) so the keyword list reflects meaningful content words rather than function words. You can also set a minimum word length to exclude trivial tokens like “is” or “to.”
How It Works
The analyzer tokenizes your text by lowercasing it and splitting on non-alphanumeric characters using the regex /[a-z0-9']+/g. The lowercase normalization ensures “SEO” and “seo” are counted as the same keyword. Apostrophes are preserved within tokens so contractions like “don't” are counted as a single word rather than split into “don” and “t.”
After tokenization, the tool filters out words shorter than your specified minimum length and (optionally) words in a built-in stopword list. The stopword list contains about 70 common English function words: articles, conjunctions, prepositions, pronouns, and auxiliary verbs. This is the same list used by most text-analysis libraries.
The remaining words are counted using a hash map (counts[w] = (counts[w]||0)+1). The hash map is then converted to an array of [word, count] pairs, sorted descending by count, and the top N entries are displayed as a table with their density percentage. Density is calculated as (count / total_words) * 100 — note that the denominator is the total word count, not the filtered count, so density reflects the keyword's share of the entire content.
Worked Examples
The default text about SEO produces about 50 total words. Without stopword stripping, the top keyword is “seo” at roughly 12% density (it appears 6 times in ~50 words). Other high-frequency words include “traffic” (4 occurrences, ~8%), “search” (3 occurrences), and “the” (3 occurrences, but only because stopword stripping is off by default).
Toggle stopword stripping and “the” disappears from the list, leaving only content words. The density percentages increase because the denominator stays the same but the displayed keywords are now the meaningful ones. This is the view most useful for SEO analysis.
Paste a longer article — say, a 1,500-word blog post about sourdough bread — and you would expect to see “sourdough,” “bread,” “flour,” “starter,” and “fermentation” in the top 5. If “sourdough” appears 30 times in 1,500 words, the density is 2%, which is reasonable. If it appears 75 times (5%), the content may read as keyword-stuffed, and you should consider rewriting for natural flow.
When to Use This Tool
- Auditing your own blog posts for keyword over-optimization before publishing.
- Analyzing a competitor's ranking page to identify which keywords they emphasize.
- Verifying that your target keyword actually appears in your content (surprisingly often, writers forget).
- Detecting which topics dominate a long-form piece to ensure topical balance.
- Comparing keyword usage between two versions of a landing page during A/B testing.
- Extracting the most common terms from customer feedback or survey responses.
- Checking that secondary keywords appear frequently enough to signal topical depth.
Limitations & Disclaimer
This tool performs single-word (unigram) frequency analysis only — it does not detect keyword phrases or n-grams. The stopword list is English-only and modest in size; multilingual content or specialized domains (medical, legal) may need a custom stopword list. Density percentages do not account for keyword stemming (so “optimize” and “optimization” are counted separately). The tool does not assess semantic relevance, search intent, or topical authority — for full SEO analysis, combine with a tool like Ahrefs, SEMrush, or Google Search Console. See our disclaimer for full terms.
Frequently Asked Questions
What is the ideal keyword density for SEO?
There is no single ideal number, but most SEO practitioners recommend 1-2% for the primary keyword and lower for secondary keywords. Densities above 3-4% risk looking like keyword stuffing, which Google's algorithms may flag as spam. Focus on natural writing rather than hitting a specific density target.
Does Google still use keyword density as a ranking factor?
No, not directly. Modern Google algorithms use natural language processing to understand topical relevance without requiring exact keyword repetition. However, density analysis remains useful for catching accidental over-optimization and confirming your topic is actually present in the content.
Should I strip stopwords?
Usually yes. Stopwords (“the,” “a,” “and,” etc.) dominate any natural-language text but tell you nothing about the topic. Stripping them gives you a clearer view of the content-bearing words. The exception is when you are analyzing writing style rather than topic.
Why does the tool show density as a percentage of total words, not filtered words?
Because that is the standard definition used by SEO tools. A 2% density means the keyword appears in 2 out of every 100 words of the original content, which is what readers and search engines see. Using filtered words as the denominator would inflate the percentages and make them less comparable to other tools' reports.
Does the tool handle bigrams or phrases like 'search engine optimization'?
No, this tool counts single words (unigrams) only. For phrase analysis, you would need an n-gram analyzer that counts adjacent word pairs or triplets. Many SEO platforms offer this as a separate feature, often called “phrase density” or “topic analysis.”
Is my content uploaded anywhere?
No. The analysis runs entirely in your browser using JavaScript. Your unpublished drafts, confidential product descriptions, and competitor research notes never leave your device.
Last updated: July 21, 2026 · Author: HT99 Tools Editorial Team · Reviewed by: HT99 Tools Editorial Team