This tool counts how many times a word, phrase or pattern appears in a block of text. It is useful for checking keyword frequency, auditing repeated terms, tallying log entries, or verifying find-and-replace coverage. You can match case-insensitively, restrict to whole words, or switch on full regular-expression matching for custom patterns, with the count updating live as you type.
How it works
The tool builds a global regular expression from your search term. For a literal search, special regex characters are escaped so the term is matched exactly; turning on regex uses your input as a pattern directly. Whole-word mode wraps the term in \b word boundaries so substrings inside longer words are excluded, and case-insensitive mode adds the i flag. It then counts the non-overlapping matches in your text.
Example
In the text “the cat sat on the mat with the hat”:
| Search | Mode | Count |
|---|---|---|
the | substring | 3 |
at | substring | 4 (cat, sat, mat, hat) |
at | whole word | 0 |
the | whole word | 3 |
So searching at as a substring finds 4 matches inside other words, but whole-word mode finds none, since “at” never appears alone. Everything runs in your browser — nothing is uploaded.