Keyword Density Analyzer
Paste text or a URL to count words, find the most repeated terms and two-word phrases, and see a target keyword's density as a percentage.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the Keyword Density Analyzer?
The Keyword Density Analyzer counts how often words and phrases appear in a piece of text. Paste copy, upload a .txt file or analyse a URL, and it reports total words, characters, an estimated reading time, the top 20 single keywords, the top 15 repeated two-word phrases and, if you enter one, the frequency and density of a target keyword of any length.
Density is occurrences divided by total words, times 100. Words are lower-cased and split on anything that is not a letter or digit, in any script, with apostrophes inside words kept, so "Café" and "don't" count as single words. Common English stop words and words of one or two letters are left out of the top lists, and phrases are counted only from words that sit next to each other in the same sentence.
Text you paste is analysed in your browser. In URL mode the page is fetched through the public allorigins.win proxy, scripts and styles are removed, and the remaining visible text is analysed, so navigation, footer and cookie banner text count too.
- Word, character and reading-time counts
- Top 20 keywords and top 15 two-word phrases
- Target keyword density for phrases of any length
- Unicode-aware word splitting and an English stop word list
- Text stays in your browser; URL mode uses a public CORS proxy
Updated
How to use the Keyword Density Analyzer
- Choose Text Input and paste your copy, or use Upload .txt file. For a live page choose URL Analysis and enter the address.
- Optionally type a Target Keyword, such as "espresso machine". Phrases of any length work.
- Click Analyze Content.
- Read Content Overview for word count and reading time, Target Keyword Analysis for your phrase, then Top Keywords and Top 2-Word Phrases.
- Change the text or the target keyword and click Analyze Content again to compare.
Worked examples
Density on a short sentence
Input
coffee beans and coffee grinders for coffee lovers
Output
Total Words 8; coffee: 3 times, 37.50%
3 occurrences out of 8 words is 37.5 percent. Short samples always show high density, which is why the figure only means something on full-length copy.
A three-word target keyword
Input
Text containing "best espresso machine" twice, Target Keyword: Best Espresso Machine
Output
Frequency 2 times; density = 2 / total words x 100
Matching ignores case and works across any number of words, as long as they are adjacent and in the same sentence.
Phrases do not jump over stop words
Input
Bag of words. Bag of words. Words matter. Words matter.
Output
Top 2-Word Phrases: "words matter" (2 times)
"bag words" is not reported, because "bag" and "words" are never next to each other in the text.
Background and insight
Keyword density was a real ranking lever in the late 1990s, when engines leaned heavily on how often a term appeared on the page. That era produced keyword stuffing, and modern search engines treat it as spam: Google's spam policies name "keyword stuffing" explicitly. No search engine publishes an ideal density, and none has in years.
The number is still useful as a writing check. If a single non-topic word sits at 4 or 5 percent, the copy probably reads as repetitive to people. If the phrase you want a page to be found for never appears, or appears once in 2,000 words, the page may not be clearly about that thing. The analyzer's colour bands (warning above 2 percent for single words and 1 percent for phrases, red above 3 and 2) flag repetition; they are not targets.
Counting words is harder than it looks. Hyphenated terms split into parts, plurals and verb forms count separately ("analyse", "analysed" and "analysis" are three words), and languages written without spaces, such as Chinese or Japanese, cannot be split into words by spacing at all. Search engines handle synonyms and stems; a frequency counter does not, so read the numbers as a rough profile of the text.
Common use cases
Editing for repetition
Spot a word you lean on too often before publishing a post or product description.
Checking topical focus
Confirm the phrase a page is meant to rank for actually appears in the copy, in natural places.
Comparing with competing pages
Run a ranking page through URL mode to see which terms and phrases it covers.
Estimating reading time
Get word count and an estimate at 200 words per minute for a byline or newsletter.
Tips and limitations
- There is no correct density. Write for the reader, then use the numbers to catch accidental repetition.
- Variants count separately: "price", "prices" and "pricing" are three keywords. Read the top list with that in mind.
- URL mode includes menus, footers and banners. Paste just the article body for a cleaner picture.
- Words of one or two letters (AI, UX, JS) are left out of the top lists, but you can still measure them as a target keyword.
- Languages without spaces between words, such as Chinese and Japanese, are not split into words correctly.
Sources and further reading
- Spam policies for Google web search, Google Search Central. Defines keyword stuffing
- Creating helpful, reliable, people-first content, Google Search Central. Google's guidance on writing for readers rather than for search engines
Frequently asked questions
What is a good keyword density for SEO?
There is no good number. Google has never published a target density and treats keyword stuffing as spam. Use the measurement to catch repetition and to confirm the main topic appears naturally. If a phrase reads awkwardly when you say it aloud, it is used too often, whatever the percentage.
How is keyword density calculated?
Keyword density is the number of times the keyword appears divided by the total number of words in the text, multiplied by 100. In 400 words with 6 occurrences, density is 6 / 400 x 100 = 1.5 percent. This tool uses that formula for single words and for multi-word phrases.
Why is my target keyword not found when it is in the text?
The match is exact on lower-cased, adjacent words in the same sentence. A plural, a different word form, a hyphen ("e-mail" is two words) or punctuation between the words stops a match. Check the spelling, try the variant you actually used, and click Analyze Content again after changing the keyword.
Why are words like "the" and "and" missing from the results?
They are stop words: very common function words that would top every list and say nothing about the subject. The analyzer removes an English stop word list and words of one or two letters from the top keywords, but they still count toward the total word count used for density.
Does the URL mode see the same text as Google?
Not exactly. It fetches the server HTML through a proxy, removes scripts and styles, and counts all remaining text, including navigation and footers. It does not run JavaScript, so content loaded later is missing. Google renders JavaScript and weighs main content differently from boilerplate.
Is the reading time estimate accurate?
It is a rough guide based on 200 words per minute, rounded up to the next whole minute. Adult silent reading speed for non-fiction is often quoted at around 200 to 250 words per minute, and technical text with code or tables takes longer.
Is there an in-depth guide to the Keyword Density Analyzer?
Yes. “Keyword Density: What the Number Means and What It Does Not” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.