Charging Cost Calculator

SEO Content Analyzer Tool

Paste your content below to analyze word count, keyword density, and SEO readability scores instantly.

Analysis Results

Word Count
0
Keyword Density
0%
SEO Score
0/100
function analyzeSEOContent() { var content = document.getElementById('seoContent').value; var keyword = document.getElementById('targetKeyword').value.toLowerCase(); var resultDiv = document.getElementById('seoResult'); if (!content) { alert('Please enter some content to analyze.'); return; } var words = content.trim().split(/\s+/).filter(function(w) { return w.length > 0; }); var wordCount = words.length; var kwCount = 0; if (keyword) { var regex = new RegExp('\\b' + keyword + '\\b', 'gi'); var matches = content.match(regex); kwCount = matches ? matches.length : 0; } var density = wordCount > 0 ? ((kwCount / wordCount) * 100).toFixed(2) : 0; var score = 0; var feedback = "Optimization Suggestions:
    "; // Logic for Score and Feedback if (wordCount > 600) { score += 40; feedback += "
  • Good length! Long-form content tends to rank better.
  • "; } else if (wordCount > 300) { score += 20; feedback += "
  • Decent length, but consider adding more depth to reach 600+ words.
  • "; } else { feedback += "
  • Content is too thin. Aim for at least 300 words.
  • "; } if (density >= 1 && density <= 2.5) { score += 40; feedback += "
  • Great keyword density! You are in the SEO sweet spot.
  • "; } else if (density > 2.5) { score += 10; feedback += "
  • Keyword density is too high (" + density + "%). Watch out for keyword stuffing.
  • "; } else if (keyword && density < 1) { score += 10; feedback += "
  • Keyword density is low. Try mentioning your keyword more naturally.
  • "; } if (content.length > 0) score += 20; feedback += "
"; // Update UI document.getElementById('wordCount').innerText = wordCount; document.getElementById('kwDensity').innerText = density + '%'; document.getElementById('seoScore').innerText = score + '/100'; document.getElementById('seoFeedback').innerHTML = feedback; resultDiv.style.display = 'block'; }

Leave a Comment