Count Occurrences - Word & Phrase Counter

Count how many times a word or phrase appears in text. Case-sensitive or insensitive search. Free occurrence counter, no signup.

🔒 Your text stays in your browser - nothing is sent to our servers
Text to search
How to Use

Three steps to get started

1

Paste your text

Paste the text you want to search through into the input area.

2

Enter a search term

Type the word or phrase to count. Enable regex mode for pattern matching, or case-sensitive for exact matches.

3

See the count and contexts

The occurrence count updates instantly, along with matching context snippets showing where each match appears.

About This Tool

Counting text occurrences: more useful than it sounds

An occurrence count is the number of times a specific word, phrase, or pattern appears inside a body of text. It sounds mundane, but it is the measurement behind keyword density in SEO, term frequency in search ranking, and most quick verification tasks that would otherwise mean scrolling and hoping.

The counting itself is straightforward - the tool runs JavaScript's matchAll and reports the length - but two decisions change the answer substantially. The first is word boundaries. Searching the literal string cat also matches "concatenate", "category", and "scattered", which is why a naive count can be several times too high. Switch to regex mode and wrap the term as \bcat\b to count only the standalone word. The second is overlap: matches are found left to right and non-overlapping, so searching aa in aaaa returns 2, not 3. If you need overlapping counts, use a zero-width lookahead such as (?=aa), which advances one character at a time.

Use cases

  • SEO writing - check keyword density without over-optimizing ("is my focus keyword used 3–5 times?")
  • Academic editing - find overused words like "however", "therefore", or a specific proper noun
  • Code review - count how many times a function or variable name appears across pasted code
  • Data validation - verify that a CSV column contains a certain value the expected number of times
  • Legal documents - confirm a defined term is used consistently throughout a contract

Regex mode for advanced searches

Enabling regex mode unlocks powerful pattern matching. Count all sentences that start with "The" (^The\s), all email addresses ([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}), or all numbers in a document (\d+). Context snippets help you verify each match is what you intended.

A few patterns earn their keep repeatedly: \b\w+ly\b to audit adverb use in a draft, [A-Z]{2,} to find undefined acronyms in a spec, \bTODO\b|\bFIXME\b across pasted source, and (\b\w+\b) \1 to catch the duplicated-word typo that spellcheckers miss.

A note on keyword density

If you are counting for SEO, treat the number as a sanity check rather than a target. Google's search advocates have said for years that there is no ideal keyword density, and its spam policies explicitly name keyword stuffing as a violation. The useful signal is the opposite direction: a count of zero means your topic is never stated plainly, and a count far above what the sentence flow supports reads as manipulation to both readers and ranking systems. Counting synonyms and related terms usually tells you more than counting the exact phrase.

Everything - matching, counting, and snippet extraction - is computed by JavaScript in this tab. Your text is never uploaded, so pasting an unpublished draft or an internal document carries no exposure.

FAQ

Frequently Asked Questions

Related Tools