The Keyword Density Analyzer Bookmarklet is a powerful tool for SEO analysis and content optimization.
With one click, this bookmarklet analyzes the current webpage and shows you the density of the most frequently used words.
Perfect for quick SEO analysis and content optimization. No more complex tools or manual counting - just click and analyze!
javascript:!function(){const e=document.body.innerText.toLowerCase().match(/\b\w+\b/g)||[],n=e.length,t={};e.forEach((e=>{e.length>3&&(t[e]=(t[e]||0)+1)}));const o=Object.entries(t).sort((([,e],[,n])=>n-e)).slice(0,10).map((([e,t])=>({word:e,count:t,percentage:(t/n*100).toFixed(2)}))).map((({word:e,count:n,percentage:t})=>`${e}: ${n} occurrences (${t}%)`)).join("\n");alert("Top 10 Keywords by Density:\n\n"+o)}();
This tool streamlines your content analysis by:
- Analyzing all text content on the page
- Showing top 10 most frequent words
- Displaying word count and percentage
- Ignoring short words (3 letters or less)
- Providing instant keyword density insights
Why Use the Keyword Density Analyzer? #
This essential tool makes keyword density analysis effortless. Perfect for SEO professionals, content writers, and anyone who needs to optimize their content for search engines. Simply click the bookmarklet to instantly see the most frequently used words and their density percentages. Helps you quickly identify overused or underused keywords and optimize your content accordingly.
Features #
- Analyzes all text content on the page
- Shows top 10 most frequent words
- Displays word count and percentage
- Ignores short words (3 letters or less)
- Works on any webpage
How to Use #
- Click the bookmarklet
- A popup will show the top 10 keywords with their:
- Number of occurrences
- Percentage of total words
Code #
javascript:(function(){
const text = document.body.innerText;
const words = text.toLowerCase().match(/\b\w+\b/g) || [];
const wordCount = words.length;
const wordFreq = {};
words.forEach(word => {
if (word.length > 3) { // Ignore short words
wordFreq[word] = (wordFreq[word] || 0) + 1;
}
});
const sortedWords = Object.entries(wordFreq)
.sort(([,a], [,b]) => b - a)
.slice(0, 10);
const density = sortedWords.map(([word, count]) => ({
word,
count,
percentage: ((count / wordCount) * 100).toFixed(2)
}));
const result = density.map(({word, count, percentage}) =>
`${word}: ${count} occurrences (${percentage}%)`
).join('\n');
alert('Top 10 Keywords by Density:\n\n' + result);
})();
Use Cases #
- SEO optimization
- Content analysis
- Keyword research
- Content quality assessment
- Previous: Highlight Links
- Next: Let it Snow