String Occurrence Counter
Free online string occurrence counter, count how many times a substring appears in text
About Text String Count
Text String Count counts how many times a search string occurs inside your input text. It scans for non-overlapping occurrences, supports a case-sensitive toggle, and reports the total count plus the lengths of the input and the search string.
How to Use
1. Paste your text into the Input area. 2. Enter the Search String you want to count. 3. Toggle Case Sensitive on to match exact case, or off (default) for case-insensitive matching. 4. The large number in the Result card shows the occurrence count and updates live as you type. 5. Click Copy to copy the count to the clipboard.
Counting Rules and Metrics
Occurrences are counted as non-overlapping matches: after a hit at position p, scanning resumes at p + search.length. With Case Sensitive off, both input and search are lowercased before matching, so "The" in input matches a search of "the". The Result card also reports Input Length (raw character count of the input) and Search String Length, so you can confirm the strings being compared. If either field is empty, the count is 0.
▶Are overlapping matches counted?
▶Is the match case-sensitive by default?
▶Why does the count show 0 when I have text in the input?
▶What does Copy copy?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee