Keyword density analyzer
Measure term frequency, phrase occurrences, and density in text or HTML. Free local processing with no account required.
- Clipboard
Local analysis
Measure term frequency and phrase density in text or HTML without pretending there is a universal ideal SEO percentage.
Local analysis: verify the result in the target environment before using it in production.
Result
Was this tool useful?
On this page
How does this tool work?
This analyser counts the words in a text or HTML page, ranks the most frequent terms and measures the density of a specific phrase. It helps spot excessive repetition or, on the contrary, a key phrase that is never used, without promising an “ideal” density: no search engine publishes one.
If you paste HTML, tags, scripts and styles are removed and entities such as & are decoded, so only visible text is counted.
The text is lowercased and split into words; inner apostrophes are kept (don’t counts as one word) while hyphens split words.
Every word counts towards the total. Single-letter terms are left out of the ranking, which lists the 20 most frequent terms with their count and density.
For the phrase you enter, the tool counts exact word sequences and calculates its density by multiplying the occurrences by the number of words in the phrase.
How to use this tool
Paste the text or HTML
Use the Text or HTML field; a complete page works too.
Enter a phrase (optional)
Type the keyword or phrase whose density you want to know.
Run the analysis
The Words, Unique terms, Occurrences and Phrase density counters appear.
Read the ranking
The result lists the most frequent terms with their count and density.
Density formulas
Density relates a number of occurrences to the total number of words in the text.
Term density
Density = term occurrences ÷ total words × 100
Calculated for each term in the ranking.
Phrase density
Phrase density = occurrences × words in the phrase ÷ total words × 100
A three-word phrase found twice accounts for six words of the text.
- n_t
- Term occurrences
- N
- Total number of words
- o
- Phrase occurrences
- m
- Number of words in the phrase
Use cases
Review a product page
Check that the product name is not repeated in every sentence to the point of sounding artificial.
Compare with a competing page
See which terms appear most on a page that ranks well for the same query, to spot a subtopic missing from yours.
Check AI-written copy
Catch verbal tics and over-used words before publishing.
Examples
Short paragraph about a bottle
2 occurrences × 2 words ÷ 19 words = 21.05%: in such a short text a single repetition drives density up, which shows the limits of the metric.
Input
Text or HTML: The steel bottle keeps water cold. A steel bottle is easy to clean and a bottle lasts for years. · Keyword or phrase: steel bottleResult
Words: 19 · Unique terms: 14 · Occurrences: 2 · Phrase density: 21.05 %
term count density
bottle 3 15.79%
steel 2 10.53%
and 1 5.26%
…Tips and best practices
- There is no ideal density: Google advises writing for readers and treats keyword stuffing as spam.
- Function words (the, a, and) often top the ranking; focus on the nouns and verbs that carry meaning.
- Analyse a text of realistic length: over a few sentences, each repetition swings the percentages a lot.
- Synonyms and variants (steel bottle, insulated flask) are not grouped; enter them separately to measure them.
Sources and references
- Spam policies for Google web search (opens in a new tab), Google Search CentralPage in English
Frequently asked questions
What keyword density should I aim for?
No value is official. An important phrase should appear naturally, especially in the title and first paragraphs; if it comes back in almost every sentence, the text reads poorly and may look over-optimised.
How is phrase density calculated?
The number of exact occurrences is multiplied by the number of words in the phrase, then divided by the total words in the text. Two occurrences of “steel bottle” in 19 words give 21.05%.
Does the phrase have to match exactly?
Yes, word for word and in the same order, ignoring capitals. “steel bottles” in the plural or “bottle made of steel” do not count as “steel bottle”.
Are menus and footers counted?
Yes, if you paste a full HTML page: all visible text is included. To measure the article only, paste just its content.
Is my text sent to a server?
No. The counting runs in your browser and the text is not stored.
Related tools
Keep going with these tools
Tools similar or complementary to this one.
Works well with
Analyze key SEO signals in HTML locally.
Preview a search result from a title and meta description.
Create SEO, Open Graph and Twitter/X tags for a web page.
Read next
SEO pre-publish audit: sitemap, links, redirects and structured data
A practical workflow to review SEO changes before publishing: sitemap, link relationships, redirects, keyword usage and structured data.
How to optimize 50 images for the Web at once
Resize a batch of images, convert them to WebP and remove metadata with one reusable Pipeline.
Optimize images for the Web without losing quality
Resize, compress and choose between WebP, AVIF and other formats with a practical workflow that reduces file size without unnecessary visual loss.
Is local browser processing replacing traditional online tools?
WebAssembly, browser APIs and faster devices enable more processing locally. How far can this approach replace services that upload files to servers?