Analyze your content, discover frequently used keywords, and check how often your target phrase appears. Your text is analyzed in your browser.
Tip: Copy the main text of your page. Navigation menus and footers can affect the results if included.
Separate words with commas.
Total Words0
Unique Words0
Characters0
Reading Time0 min
Target Keyword Analysis
Exact word or phrase matches in your text.
No target set
Enter a target keyword above and analyze your content to see its results.
Occurrences0
Density0%
Words in Phrase0
Approx. Share of Text0%
Density = exact phrase occurrences ÷ total words × 100. Approximate share counts every word in the matching phrase; overlapping matches can affect this estimate. These metrics are descriptive, not Google ranking thresholds.
Top Keywords
Single words ranked by frequency, with common stop words excluded.
Repeated 2-Word Phrases
Commonly repeated adjacent word pairs.
Repeated 3-Word Phrases
Commonly repeated adjacent three-word phrases.
Export Your Results
Download a report to review or share.
Results are generated locally. Your pasted content is not sent to a server by this tool.
(function () {
const root = document.getElementById('db-kdc');
if (!root || root.dataset.ready === '1') return;
root.dataset.ready = '1';const $ = id => root.querySelector('#db-kdc-' + id);
const stopWords = new Set((
'a an the and or but if then than so because as of at by for from in into on onto ' +
'to up with without is am are was were be been being do does did have has had ' +
'i me my we our you your he she it they them this that these those not no yes ' +
'can could should would will just also very more most some any all each other ' +
'about over under after before between during through out off again further once ' +
'here there when where why how what which who whom whose while both few many ' +
'much own same such only too s t d ll m re ve y www com https http'
).split(/\s+/));let report = null;function tokenize(text) {
const matches = text.toLocaleLowerCase().match(/[\p{L}\p{N}]+(?:['’][\p{L}\p{N}]+)*/gu);
return matches || [];
}function countPhrases(tokens, size, exclusions) {
const counts = new Map();
for (let i = 0; i exclusions.has(w))) continue;
const phrase = phraseWords.join(' ');
counts.set(phrase, (counts.get(phrase) || 0) + 1);
}
return [...counts.entries()]
.filter(([, count]) => count >= 2)
.sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))
.slice(0, 20);
}function escapeHTML(value) {
return String(value).replace(/[&"']/g, ch => ({
'&':'&', '':'>', '"':'"', "'":'''
})[ch]);
}function percent(value) {
return (Math.round(value * 100) / 100).toFixed(2) + '%';
}function renderTable(container, rows, firstHeading) {
if (!rows.length) {
container.innerHTML = '
No repeated terms found for this section.
';
return;
}
container.innerHTML =
'
' + firstHeading + '
Occurrences
Density
' +
rows.map(row =>
'
' + escapeHTML(row[0]) + '
' + row[1] +
'
' + percent(row[1] / report.wordCount * 100) + '
'
).join('') + '
';
}function analyze() {
const text = $('text').value.trim();
if (!text) {
$('status').textContent = 'Paste some content before analyzing.';
$('results').hidden = true;
return;
}const tokens = tokenize(text);
if (!tokens.length) {
$('status').textContent = 'No readable words were found. Try adding plain text.';
$('results').hidden = true;
return;
}const customWords = $('exclude').value.toLocaleLowerCase()
.split(/[\s,;]+/).filter(Boolean);
const exclusions = new Set([...stopWords, ...customWords]);
const counts = new Map();
tokens.forEach(word => {
if (!exclusions.has(word)) counts.set(word, (counts.get(word) || 0) + 1);
});const keywords = [...counts.entries()]
.sort((a,b) => b[1] - a[1] || a[0].localeCompare(b[0]))
.slice(0, 30);const bigrams = countPhrases(tokens, 2, new Set(customWords));
const trigrams = countPhrases(tokens, 3, new Set(customWords));
const target = tokenize($('target').value);
let occurrences = 0;if (target.length) {
for (let i = 0; i tokens[i + j] === word)) occurrences++;
}
}report = {
wordCount: tokens.length,
uniqueCount: new Set(tokens).size,
characters: text.length,
readingMinutes: Math.max(1, Math.ceil(tokens.length / 200)),
target: target.join(' '),
targetWords: target.length,
occurrences,
keywords, bigrams, trigrams
};$('words').textContent = report.wordCount.toLocaleString();
$('unique').textContent = report.uniqueCount.toLocaleString();
$('chars').textContent = report.characters.toLocaleString();
$('reading').textContent = report.readingMinutes + ' min';$('target-label').textContent = target.length ? report.target : 'No target set';
$('target-empty').hidden = !!target.length;
$('target-data').hidden = !target.length;if (target.length) {
$('occurrences').textContent = occurrences.toLocaleString();
$('density').textContent = percent(occurrences / tokens.length * 100);
$('phrasewords').textContent = target.length;
$('share').textContent = percent(occurrences * target.length / tokens.length * 100);
}renderTable($('keywords'), keywords.map(([word, count]) => [
word, count
]), 'Keyword');
renderTable($('bigrams'), bigrams, '2-word phrase');
renderTable($('trigrams'), trigrams, '3-word phrase');$('results').hidden = false;
$('status').textContent = 'Analysis complete. ' + report.wordCount + ' words analyzed.';
}function csvCell(value) {
return '"' + String(value).replace(/"/g, '""') + '"';
}function downloadCSV() {
if (!report) return;
const rows = [
['Section','Keyword or phrase','Occurrences','Density'],
...report.keywords.map(([word,count]) => ['Single keyword',word,count,percent(count/report.wordCount*100)]),
...report.bigrams.map(([phrase,count]) => ['2-word phrase',phrase,count,percent(count/report.wordCount*100)]),
...report.trigrams.map(([phrase,count]) => ['3-word phrase',phrase,count,percent(count/report.wordCount*100)])
];
if (report.target) {
rows.splice(1, 0, ['Target keyword',report.target,report.occurrences,
percent(report.occurrences/report.wordCount*100)]);
}
rows.push([]);
rows.push(['Total words',report.wordCount]);
rows.push(['Unique words',report.uniqueCount]);
rows.push(['Characters',report.characters]);
rows.push(['Estimated reading time',report.readingMinutes + ' minutes']);const csv = '\uFEFF' + rows.map(row => row.map(csvCell).join(',')).join('\r\n');
const url = URL.createObjectURL(new Blob([csv], {type:'text/csv;charset=utf-8;'}));
const link = document.createElement('a');
link.href = url;
link.download = 'design-blast-keyword-density-report.csv';
document.body.appendChild(link);
link.click();
link.remove();
setTimeout(() => URL.revokeObjectURL(url), 1000);
}function summaryText() {
if (!report) return '';
return [
'Keyword Density Checker - Design Blast',
'Total words: ' + report.wordCount,
'Unique words: ' + report.uniqueCount,
'Characters: ' + report.characters,
'Estimated reading time: ' + report.readingMinutes + ' min',
report.target ? 'Target keyword: ' + report.target :
'Target keyword: not set',
report.target ? 'Occurrences: ' + report.occurrences : '',
report.target ? 'Density: ' + percent(report.occurrences/report.wordCount*100) : '',
'',
'Top keywords:',
...report.keywords.slice(0,10).map(([word,count]) =>
word + ' — ' + count + ' occurrences (' + percent(count/report.wordCount*100) + ')')
].filter(line => line !== '').join('\n');
}async function copySummary() {
if (!report) return;
const value = summaryText();
try {
if (navigator.clipboard && navigator.clipboard.writeText) {
await navigator.clipboard.writeText(value);
} else {
const temp = document.createElement('textarea');
temp.value = value;
temp.style.position = 'fixed';
temp.style.opacity = '0';
root.appendChild(temp);
temp.select();
const ok = document.execCommand('copy');
temp.remove();
if (!ok) throw new Error('Copy unavailable');
}
$('status').textContent = 'Summary copied.';
} catch (err) {
$('status').textContent = 'Copy was blocked by your browser. Use the CSV download instead.';
}
}$('analyze').addEventListener('click', analyze);
$('csv').addEventListener('click', downloadCSV);
$('copy').addEventListener('click', copySummary);$('sample').addEventListener('click', function () {
$('text').value =
'Design Blast provides SEO services in Mumbai to help businesses improve search visibility. ' +
'Our SEO services in Mumbai include technical SEO, keyword research, on-page SEO and content strategy. ' +
'With a clear SEO strategy, businesses can improve their website content and attract relevant visitors. ' +
'Design Blast helps businesses improve website performance, search visibility and organic growth. ' +
'Our SEO services in Mumbai focus on useful content, relevant keywords and a better website experience.';
$('target').value = 'SEO services in Mumbai';
analyze();
});$('reset').addEventListener('click', function () {
$('text').value = '';
$('target').value = '';
$('exclude').value = '';
$('results').hidden = true;
$('status').textContent = '';
report = null;
});
})();