Word Counter

Paste or type your text below to instantly count words, characters, sentences, paragraphs and get reading time.

Advertisement
0
Words
0
Characters
0
Chars (no spaces)
0
Sentences
0
Paragraphs
1 min
Reading time

Top words

Advertisement

Tips for using the word counter

This tool is perfect for checking essay word limits, article lengths, social media posts, and assignment requirements. The reading time estimate is based on an average reading speed of 200 words per minute.

Related tools

function countWords(text) { const words = text.trim() === '' ? 0 : text.trim().split(/\s+/).filter(w => w.length > 0).length; const chars = text.length; const charsNS = text.replace(/\s/g,'').length; const sentences = text.split(/[.!?]+/).filter(s => s.trim().length > 0).length; const paragraphs = text.split(/\n\s*\n/).filter(p => p.trim().length > 0).length || (text.trim().length > 0 ? 1 : 0); const readMin = Math.max(1, Math.ceil(words / 200)); const readSec = words < 20 ? `${Math.ceil(words * 0.3)}s` : `${readMin} min`; document.getElementById('s-words').textContent = words.toLocaleString(); document.getElementById('s-chars').textContent = chars.toLocaleString(); document.getElementById('s-chars-ns').textContent = charsNS.toLocaleString(); document.getElementById('s-sentences').textContent = sentences; document.getElementById('s-paragraphs').textContent = paragraphs; document.getElementById('s-reading').textContent = readSec; // Top words if (words > 0) { const wordArr = text.toLowerCase().match(/\b[a-z]{3,}\b/g) || []; const freq = {}; wordArr.forEach(w => freq[w] = (freq[w]||0)+1); const stopWords = ['the','and','for','that','this','with','have','from','they','will','been','are','was','were','had','but','not','you','all','can','her','him','his','its','our','out','who']; const top = Object.entries(freq).filter(([w]) => !stopWords.includes(w)).sort((a,b)=>b[1]-a[1]).slice(0,8); document.getElementById('density-list').innerHTML = top.map(([w,c]) => `${w} (${c})` ).join(''); document.getElementById('density-wrap').style.display = 'block'; } else { document.getElementById('density-wrap').style.display = 'none'; } } function clearText() { document.getElementById('text-input').value = ''; countWords(''); } document.addEventListener('DOMContentLoaded', () => { const related = TOOLS.filter(t => t.category==='writing' && t.slug!=='word-counter').slice(0,4); document.getElementById('related-grid').innerHTML = related.map(buildToolCard).join(''); });