📊 Word Density Analyzer

Analyze word frequency, density percentage, and TF-IDF weight. Supports Chinese/English tokenization and stopword filtering.

Zero Dependencies · Works Offline

📝 Input Text

📈 Analysis Results

#WordCountDensityTF-IDFDistribution

What Can the Word Density Analyzer Do?

The Word Density Analyzer is a free online tool that helps SEO professionals, content creators, and text analysis researchers count word frequency, density percentage, and TF-IDF weight in any text. It supports automatic Chinese/English tokenization, stopword filtering, and multiple sorting methods — an essential tool for SEO keyword optimization and text content analysis.

Core Features

How to Use

1. Enter or paste your article content in the text area

2. Adjust analysis settings (stopword filter, min word length, display count)

3. Choose sorting method (by frequency/density/TF-IDF)

4. Review the analysis table for keyword distribution

5. Click "Copy Results" or "Download CSV" to export data

Use Cases

Case 1: SEO Keyword Optimization

SEO professionals analyze keyword density to ensure core keywords fall within the ideal 1%-3% range, avoiding keyword stuffing penalties from search engines.

Case 2: Content Quality Analysis

Content editors analyze vocabulary distribution to evaluate whether content revolves around core topics, detecting off-topic or repetitive word usage.

Case 3: Academic Text Research

Researchers use TF-IDF analysis to identify core topic words in documents, aiding literature classification and topic modeling research.

Extended Knowledge

Keyword Density is a core SEO concept referring to the frequency of target keywords in page text. Early SEO relied heavily on keyword density for ranking, but modern search engines use more sophisticated semantic analysis. TF-IDF (Term Frequency-Inverse Document Frequency) is a classic information retrieval algorithm where TF measures word frequency in a document and IDF measures word rarity. Words with high TF-IDF values are typically the document's core keywords. Chinese tokenization is a fundamental NLP task, with common methods including dictionary-based matching and statistical sequence labeling (HMM, CRF).

FAQ

What is keyword density?
Keyword density is the percentage of times a keyword appears in text relative to the total word count. SEO best practices suggest 1%-3% density. Higher density may be seen as keyword stuffing by search engines.
What is TF-IDF?
TF-IDF (Term Frequency-Inverse Document Frequency) evaluates how important a word is to a document. TF measures frequency in the document, IDF measures rarity. Higher TF-IDF means the word is more significant.
How does Chinese tokenization work?
This tool uses a dictionary-based forward maximum matching algorithm for Chinese tokenization with a built-in dictionary. For specialized text, accuracy may be limited.
What does stopword filtering do?
Stopwords (the, is, a, , is, etc.) appear frequently but carry little meaning. Filtering them makes keyword analysis more accurate by highlighting truly valuable terms.
Is my text uploaded to any server?
No. This tool runs entirely in your browser. All text analysis is done client-side with no data uploaded to any server.

Word Density Analyzer | No Signup, Client-Side · No Server Uploads

Feedback: dexshuang@google.com

`;}).join(''); document.getElementById('summary').textContent=`Total words: ${total} | Unique words: ${totalTypes} | Lexical diversity: ${(totalTypes/total*100).toFixed(1)}%`; } function setSort(type,btn){currentSort=type;document.querySelectorAll('.toggle-btn').forEach(b=>b.classList.remove('active'));btn.classList.add('active');analyze();} function loadExample(){document.getElementById('input-text').value='Search engine optimization (SEO) is the process of improving the quality and quantity of website traffic from search engines. SEO targets unpaid traffic rather than direct traffic or paid traffic. Keyword research is the foundation of SEO, analyzing user search behavior to find valuable keywords. On-page optimization includes title tags, meta descriptions, URL structure, and content quality. Link building is an important method for increasing website authority. Technical SEO focuses on site speed, mobile optimization, structured data, and other technical factors. Content marketing and SEO are inseparable — high-quality content is the foundation of search rankings. Search optimizeis network inSearchResultinvisibleproperty heavytomanualsegment,aboutkeyword isSEO base ,highQualitycontentissort rootlocal。';analyze();} function clearInput(){document.getElementById('input-text').value='';analyze();} function copyResults(){const text='Rank\tWord\tCount\tDensity\tTF-IDF\n'+lastResults.map((r,i)=>`${i+1}\t${r.word}\t${r.count}\t${r.density.toFixed(2)}%\t${r.tfidf.toFixed(4)}`).join('\n');navigator.clipboard.writeText(text).then(()=>{const t=document.getElementById('copy-toast');t.classList.add('show');setTimeout(()=>t.classList.remove('show'),2000);});} function downloadCSV(){const csv='Rank,Word,Count,Density,TF-IDF\n'+lastResults.map((r,i)=>`${i+1},"${r.word}",${r.count},${r.density.toFixed(2)}%,${r.tfidf.toFixed(4)}`).join('\n');const blob=new Blob([csv],{type:'text/csv'});const a=document.createElement('a');a.href=URL.createObjectURL(blob);a.download='word-density-analysis.csv';a.click();} function toggleFaq(el){el.parentElement.classList.toggle('open');} document.addEventListener('keydown',function(e){if(e.ctrlKey&&e.key==='Enter'){analyze();e.preventDefault();}if(e.ctrlKey&&e.shiftKey&&e.key==='C'){copyResults();e.preventDefault();}if(e.ctrlKey&&e.shiftKey&&e.key==='X'){clearInput();e.preventDefault();}}); analyze();