Count Occurrences

Count how many times a word or pattern appears.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

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”:

SearchModeCount
thesubstring3
atsubstring4 (cat, sat, mat, hat)
atwhole word0
thewhole word3

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.

Ad placeholder (rectangle)