Skip to main content

Keyword density analyzer

Measure term frequency, phrase occurrences, and density in text or HTML. Free local processing with no account required.

  • Clipboard

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Local analysis

Measure term frequency and phrase density in text or HTML without pretending there is a universal ideal SEO percentage.

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

  1. Paste the text or HTML

    Use the Text or HTML field; a complete page works too.

  2. Enter a phrase (optional)

    Type the keyword or phrase whose density you want to know.

  3. Run the analysis

    The Words, Unique terms, Occurrences and Phrase density counters appear.

  4. 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 bottle

Result

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

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

Tools similar or complementary to this one.

Works well with

Analyze key SEO signals in HTML locally.

Web & SEOFeaturedUse this tool

Preview a search result from a title and meta description.

Web & SEOFeaturedUse this tool

Create SEO, Open Graph and Twitter/X tags for a web page.

Web & SEOFeaturedUse this tool
TutorialBest practicesBeginner

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.

30 August 20264 min