Skip to main content

Substring Counter — Find How Many Matches

Count overlapping or non-overlapping occurrences of a needle substring inside your haystack text.

No sign up requiredStays in your browser100% free

How it works

  1. 1Paste or type your text in the input field
  2. 2Click "Count Occurrences" — processing happens in your browser
  3. 3Copy the result or download as a text file

What to do next

About Substring Counter

Substring Counter is a text tool that runs in your browser. Count overlapping or non-overlapping occurrences of a needle substring inside your haystack text. The page you are reading is the same workspace you will use to do the work: pick a file or paste your input, choose the options that matter to you, and the tool produces the result on your device.

Architecturally, Substring Counter is a single-page client. The processing layer is standard browser APIs; the UI is a thin React shell on top. Inputs flow through the engine and the output is returned to the browser as a Blob you can save or copy. The 0 MB cap is the only hard limit and it exists to keep memory usage stable on every device.

The execution path is auditable from the page itself: open developer tools, switch to the Network tab, run a job. The requests you see are static-asset GETs for the engine and the page resources. The actual work is JavaScript code running against the bytes already in your tab's memory.

Anyone who works with text processing on a casual basis — students formatting essays, researchers normalising scraped text, translators aligning bilingual passages — finds Substring Counter a quick way to get the result. The page loads in under a second, the controls are visible from a single screen, and the result downloads or copies in one click.

Substring Counter works well as a bookmarked utility you reach for when you need it. The first visit shows you what the tool does; the second is when you realise it is a low-friction option for the task and worth keeping in your tab list.

The 0 MB ceiling on input size is the only fixed limit. Output files are produced in standard formats that every common viewer recognises, and the tool runs the same way regardless of how many times you have used it during the session.

Substring Counter fits naturally next to several adjacent tools. Common companions include Keyword Density Checker, String Length Checker, Most Frequent Words, and String Splitter — combine them when the job needs more than one transformation. After running Substring Counter, many users move on to Keyword Density Checker and String Length Checker. Each tool is a separate page so you can compose the exact pipeline you need.

Substring Counter is built around steady iteration on a small set of options rather than feature creep. Every additional setting attracts a slightly different audience, but a long settings panel makes the common case slower for everyone. The current controls reflect what users of the tool actually use.

Substring Counter returns the result as a download. If you are running multiple jobs, the output names will not collide as long as the input names differ. You can re-run with different settings as many times as you like; each run produces a fresh file with no caching trickery in between.

A short note on how Substring Counter came to look the way it does: every iteration started by watching how someone unfamiliar with the tool actually used it, then removing whatever got in their way. That is why the upload area dominates the screen, the run button is bigger than the secondary controls, and the result panel is unmissable when the job finishes.

If you also use a command-line tool for substring counter, Substring Counter is a convenient alternative for the times you are on a different machine or helping someone who is not comfortable in a terminal. The output is a standard file in the format documented above.

Pro tip: Substring Counter works just as well in a private/incognito window as in a normal one, which is occasionally useful when you want zero browser-history footprint of the job. Another tip: if the tool ever feels slow, it is almost always because the browser tab is competing for CPU with another tab — pausing or closing the heavy ones gives the engine room to work.

When something goes wrong, the cause is usually one of three things: a malformed input, a browser that is out of memory, or a corporate proxy that is interfering with the page's static assets. The first two are easy to diagnose; the third typically requires asking your IT team to allow standard browser APIs to load.

Substring Counter is intentionally narrow in scope so the common case is fast and the result is predictable. If you ever need a variation it does not cover, browse the rest of the catalog — there is a good chance an adjacent tool already exists, and switching between tools is just a matter of opening another tab.

How it works

  1. 1Open the Substring Counter workspace above. The interface is a single page, so there is nothing to navigate.
  2. 2Add your text input by dropping it onto the page or browsing for it.
  3. 3Pick any non-default settings you need. Most users leave the defaults alone for the first run and only revisit if the result needs tuning.
  4. 4Trigger processing. standard browser APIs reads your input, applies the transformation, and writes the result back into the page.
  5. 5Grab the output as soon as the run completes. You can also copy the result instead of downloading if the next tool in your workflow accepts pasted input.
  6. 6Run additional jobs as needed. The same controls and defaults apply on every run.

Common use cases

  • Translate plain text into Markdown for a static-site post using Substring Counter.
  • Convert a column of names into a comma-separated list for a script.
  • Diff two drafts of a document side by side.
  • Reformat a JSON blob copied from a log into something readable.
  • Find and replace dozens of variants of a phrase in one pass.
  • Count the words in a draft to check it fits a brief.
  • Generate a slug from a long article title.
  • Re-case a title from ALL CAPS to Title Case.

FAQ

What is overlapping vs non-overlapping count?

In “aaa”, overlapping search for “aa” finds two starts at positions 0 and 1; non-overlapping often finds only one match then skips ahead.

Is counting case sensitive?

Many tools offer a toggle; default is often case-sensitive literal matching.

Do regex special characters need escaping?

If the tool is literal-only, parentheses are normal characters; if regex mode exists, escape metacharacters or disable regex.

Can I count multiline substrings?

Unless dotall or multiline regex is supported, paste as a single line or enable multiline options if available.

Is my haystack uploaded?

No — scanning happens client-side.

Why is my count zero when I see the phrase?

Invisible characters, different hyphen kinds, or NBSP vs space can prevent exact matches — try pasting from a hex-friendly editor.

Can I use Substring Counter offline?

Once the page is loaded, Substring Counter can complete jobs without an active internet connection — the engine is bundled with the page, so there is no per-job network call. The initial page load does require a connection (to fetch the static assets), but after that you can disconnect entirely and the tool will still work. This is a side-effect of the local-first architecture, not a deliberate "offline mode" feature.

Can I use Substring Counter with formats other than the defaults?

The accepted formats are listed in the upload area on the tool itself. If your input is in a format that is not directly supported, convert it first using one of Favtoo's converter tools — every Favtoo converter outputs a file that is a clean input to the next tool in the chain.

Does Substring Counter upload my file to a server?

Your file is processed inside your browser by standard browser APIs. The engine reads the file's bytes from your tab's memory, computes the result, and writes the result back into the tab. You can confirm what the page does by opening developer tools and watching the Network tab during a run — the requests you see are for the tool's static assets only.

Are there any hidden fees with Substring Counter?

Substring Counter is free to use. The processing runs in your browser, which keeps the per-user cost low enough that the tool can be offered openly. The download is the same file the engine produced — you can use it for as many runs as you need.

How accessible is the Substring Counter interface?

Substring Counter uses native HTML controls wherever possible, which means keyboard navigation, focus rings, and screen-reader labels work the way the platform expects. The drop zone accepts files via the keyboard-accessible file picker as well as drag-and-drop, and result downloads use standard browser download flows. If you spot an accessibility gap, Favtoo treats it as a bug worth fixing.

What does Substring Counter do that command-line tools do not?

Desktop apps usually have more advanced features but require installation, maintenance and (often) a licence. Paid online tools are convenient but route your file through their servers and gate downloads behind accounts. Substring Counter sits in between: free, instant, and private, but intentionally narrow in scope. For one-off jobs and the common text processing operations, it is usually the lowest-friction choice; for highly specialised work, a dedicated app is still the right answer.

Is there a programmatic version of Substring Counter?

Substring Counter is a browser-only tool by design and does not expose a hosted API. The reason is the same as the privacy story: there is no Favtoo backend doing the work, so there is no service to call. If you need to script the same transformation, the underlying engine (standard browser APIs) is open-source and can be used directly from your own code.

String Length Checker

Measure character and byte-style counts for strings, including grapheme awareness where supported.

Palindrome Checker

Test whether text reads the same forwards and backwards after normalizing spaces and case.

Anagram Checker

Verify whether two strings are anagrams using the same multiset of letters.

String Splitter

Split text into fields or lines using delimiters, regex, or fixed widths for quick restructuring.

String Joiner

Join lines or tokens with a custom delimiter to build CSV rows, paths, or SQL lists.

Truncate String

Truncate text with hard cut or word-boundary mode and a selectable ellipsis string.

Pad String

Left-pad or right-pad a string with a chosen character to a target length from presets.

Word Counter

Count words, characters, sentences, and paragraphs.

View all Text Tools