📝 Text

Word Frequency Counter

Paste or type your text below, see exactly how many times every single word appears, sorted from most to least frequent. No stopwords are filtered out.

0
Total Words
0
Unique Words
No words yet, start typing above.

About the Word Frequency Counter

Every word in your text gets counted and ranked from most to least frequent, right in your browser. Unlike an SEO keyword tool, nothing gets filtered out here, "the" and "and" show up in the results just like everything else, so you see the literal frequency of every word as it actually appears.

Counting with a Map avoids a real bug that a plain object would hit

Word counts are tallied in a JavaScript Map rather than a plain object, and that's a deliberate choice, not a stylistic preference. A plain object used as a counter (counts[word] = (counts[word] || 0) + 1) breaks on certain words, because every plain object inherits properties from Object.prototype — typing the actual English word "constructor" into the text box would collide with the inherited Object.prototype.constructor property, and instead of starting a fresh count at zero, the counter would read that inherited function reference, try to add 1 to it, and produce a garbled, non-numeric result instead of a real count. A Map has no inherited properties to collide with, so every word, including "constructor," "toString," or "hasOwnProperty," gets counted correctly like any other word.

A word can carry at most one apostrophe-linked suffix

The tokenizing pattern, /[a-z0-9]+(?:'[a-z0-9]+)?/g, allows one optional apostrophe-plus-letters group after the main word, which is enough for ordinary contractions like "don't" or "isn't" to be captured as a single token. But the ? at the end permits that group at most once, not repeatedly, so a double contraction like "y'all's" splits into two separate tokens instead of one: "y'all" as one token, and a lone "s" as a second, separate token, since the trailing apostrophe can't attach to anything once the first apostrophe group has already been used.

Numbers count as "words" too, since digits are part of the token pattern

The character class driving tokenization is [a-z0-9], letters and digits together, so a standalone number in your text, like a year or a quantity, gets counted and ranked in the frequency table exactly like any actual word would be. If your text has "2024" appearing several times, it'll show up as its own row with its own count and percentage, mixed in among the genuine vocabulary rather than filtered out as a non-word.

Words tied on frequency are ordered by first appearance, not alphabetically

Sorting is based purely on count, (a, b) => b[1] - a[1], with no secondary tiebreaker for words that appear the same number of times. Because JavaScript's array sort is required to be stable since ES2019, and a Map iterates its entries in the order they were first inserted, two words with identical counts end up ordered by whichever one appeared first in your original text, not alphabetically. That's different from how this site's Sort Lines by Length tool explicitly breaks ties alphabetically — here, a tie is broken implicitly by first-appearance order instead.

No stopword filtering, unlike the Word Cloud Generator

This tool deliberately shows every word exactly as it counts them, including "the," "and," "a," and every other extremely common word, without any option to filter them out. That's a different design choice from this site's Word Cloud Generator, which offers an "Exclude common words" checkbox specifically because a visual cloud gets cluttered and less useful when it's dominated by function words rather than meaningful vocabulary. For a raw, literal frequency count, showing everything unfiltered is the more useful default: you can see at a glance exactly how often every word, common or not, actually appears, and decide for yourself what to pay attention to further down the sorted list.

What this is actually useful for

A literal, unfiltered frequency count is genuinely useful in situations where filtering out common words would hide the exact thing you're checking for — verifying keyword density in a piece of SEO copy, spotting an overused word or phrase in a draft that a writer has fallen back on without noticing, checking for word repetition in dialogue or lyrics, or doing a basic linguistic analysis where the raw distribution of every word, function words included, is the actual point of the exercise rather than something to filter away.

Frequently Asked Questions

Does typing the word "constructor" break the word count?

No, and that's specifically because this tool counts words using a JavaScript Map rather than a plain object. A plain-object-based counter can produce a garbled result for words like "constructor" that collide with inherited object properties; a Map has no such inherited properties, so every word is counted correctly.

Does a word like "y'all's" get counted as one word?

No. The tokenizer allows only one apostrophe-linked suffix per word, which handles ordinary contractions like "don't" correctly, but a double contraction like "y'all's" splits into "y'all" and a separate "s" token instead of staying as one word.

Do numbers show up in the word frequency table?

Yes. The tokenizing pattern includes digits alongside letters, so a number like "2024" appearing multiple times in your text is counted and ranked just like any other word would be.

How are words with the same count ordered in the table?

By whichever one appeared first in your original text. Sorting is based purely on frequency count with no alphabetical tiebreaker, so ties are resolved by first-appearance order rather than being alphabetized.

Is my text sent to a server when I use this tool?

No. All counting happens locally in your browser as you type; nothing is uploaded anywhere.